I have the following Telerik RadGrid.
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="true" AllowSorting="true"
PageSize="50" HeaderStyle-Height="20" ShowStatusBar="true" AllowCustomPaging="True"
OnNeedDataSource="RadGrid1_NeedDataSource" OnSortCommand="RadGrid1_SortCommand"
OnPageSizeChanged="RadGrid1_PageSizeChanged" OnPageIndexChanged="RadGrid1_PageIndexChanged"
OnItemCommand="RadGrid1_ItemCommand" OnItemDataBound="RadGrid1_ItemDataBound">
<clientsettings>
<Selecting AllowRowSelect="True" />
<Resizing EnableRealTimeResize="true" />
</clientsettings>
<exportsettings filename="list">
</exportsettings>
<mastertableview datakeynames="ID" autogeneratecolumns="false">
<PagerStyle AlwaysVisible="true" PagerTextFormat="{4} {5} item(s) in {1} page(s)" />
<Columns>
<telerik:GridBoundColumn DataField="Contract" HeaderStyle-Width="20%" HeaderText="Contract Title"
UniqueName="Contract" SortExpression="Contract"> </telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Customer" HeaderStyle-Width="20%" HeaderText="Vendor"
UniqueName="Vendor" SortExpression="Customer"> </telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Contractor" HeaderStyle-Width="20%" HeaderText="Contractor"
UniqueName="Contractor" SortExpression="Contractor"></telerik:GridBoundColumn>
**<telerik:GridBoundColumn DataField="Name" HeaderText="Service"
UniqueName="Name" SortExpression="Name" Resizable="true"> </telerik:GridBoundColumn>**
</Columns>
</mastertableview>
</telerik:RadGrid>
I want to make only the last column (Name) resizable. I used Resizable="true" but it is not working. Is there any other way for it?
You need to add AllowColumnResize="True" on RadGrid and you can disable other column's resize properties by using Resizable="False".
Related
I'm using CommandItemSettings with ShowExportToExcelButton = true to have a button to export to Excel in the RadGrid's MasterTableView.
The Export button is displayed when I have at least 10 records or after Paging event if the next page has less than 10 records.
However, when I do a search and the resulting grid has less than 10 records, the Export button is not displayed.
<telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" LoadingPanelID="RadAjaxLoadingPanel2" PostBackControls="btnExport" ClientEvents-OnRequestStart="requestStart" >
<telerik:RadGrid
...all the settings are defined here
>
<MasterTableView AllowNaturalSort="false" CommandItemDisplay="Bottom">
<CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false" />
<CommandItemStyle HorizontalAlign="Right" />
<PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" PageSizes="10,25,50,100" />
<Columns>
<telerik:GridBoundColumn DataField="Moss2 MID" HeaderText="MOSS2 MID" AllowSorting="false" DataFormatString="{0:#}"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DBA" HeaderText="DBA" HeaderStyle-Width="250px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Original MID" HeaderText="ORIGINAL MID" AllowSorting="false" DataFormatString="{0:#}"></telerik:GridBoundColumn>
<telerik:GridBoundColumn
DataField="BoardingDate"
DataType="System.DateTime"
HtmlEncode="false"
DataFormatString="{0:MM/dd/yyyy}"
SortExpression="BoardingDate"
UniqueName="BoardingDate"
HeaderText="BOARDING DATE"
HeaderStyle-Width="170px"
ShowFilterIcon="false"
/>
<telerik:GridBoundColumn DataField="Status" HeaderText="STATUS" AllowSorting="false"></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</telerik:RadAjaxPanel>
RadGrid is defined inside of RadAjaxPanel as I showed above and Search button is defined in its own RadAjaxPanel as well with a calendar controls to search by date:
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
.
.
.
Calendar controls are going here....
.
.
.
<telerik:RadButton RenderMode="Lightweight" runat="server" Text="Search" ID="btnSearch" OnClick="btnSearch_Click"/>
</telerik:RadAjaxPanel>
And I use RadAjaxmanager where I hook the Search button with the grid:
<telerik:RadAjaxManager ID="RadAjaxManager" runat="server" EnableAJAX="true" OnAjaxSettingCreated="RadAjaxManager1_AjaxSettingCreated">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btnSearch">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="grdMoss2Merchants" LoadingPanelID="RadAjaxLoadingPanel2"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
What am I doing wrong here?
I've been trying to solve that for the past 2 days with no luck.
Using just JSF, can I do this ? Or do I need to add in more layers and functionality to the program?
This is what I have so far with it:
<tr:form usesUpload="true">
<trh:tableLayout width="100%" cellPadding="10" borderWidth="0"
id="Table">
<trh:rowLayout>
<trh:cellFormat columnSpan="4">
<ocau:inlineMessage />
</trh:cellFormat>
</trh:rowLayout>
<tr:panelBox styleClass="roundedPanelPrimary">
<trh:rowLayout halign="center">
<trh:cellFormat halign="center">
<tr:inputText styleClass="tabdata" contentStyle="normalContent"
label="Account Number"
value="#{fraudSearch.fraudCustomerReqtUIModelBean.accountNumber}"
accessKey="13"
>
</tr:inputText>
</trh:cellFormat>
<trh:cellFormat halign="left">
<tr:commandButton text="Search" id="Search"
action="#{fraudSearch.getIBSNotesData}" styleClass="Button"
halign="center"
>
</tr:commandButton>
</trh:cellFormat>
</trh:rowLayout>
</tr:panelBox>
<tr:panelBox styleClass="roundedPanelPrimary"
rendered="#{fraudSearch.displaySearchResults}">
<trh:tableLayout cellPadding="10" borderWidth="0" id="Table"
width="100%">
<trh:rowLayout>
<tr:panelTabbed position="above" inlineStyle="width:auto">
<tr:showDetailItem text="IBS Data Extract" id="IBSDataExtract"
immediate="true">
<ui:include
src="/pages/recovery/fraud/displayFraudRPAIBSDataExtract.jspx">
</ui:include>
</tr:showDetailItem>
<!--
<tr:showDetailItem text="Non-Monetary Data" id="IBSNonMonData"
immediate="true">
<ui:include
src="/pages/recovery/fraud/displayFraudRPANonMonetaryData.jspx">
</ui:include>
</tr:showDetailItem>
-->
</tr:panelTabbed>
</trh:rowLayout>
</trh:tableLayout>
</tr:panelBox>
</trh:tableLayout>
</tr:form>
So far, I have attempted to add the access key to both the text box and the button, but it doesn't appear to work. Any point in the right direction would be appreciated.
Trinidad provides a defaultCommand within it's formtag, with wich you should be able to do, what you want. See here: tr:form
Here is my code:
<p:selectOneListbox id="columnName"
widgetVar="columnName"
value="#{dataTransformBean.column}">
<f:selectItems id="itemDrop"
value="#{dataTransformBean.columnList}"
var="item" itemValue="#{item}" />
<p:ajax update="textarea" />
</p:selectOneListbox>
<p:inputTextarea id="textarea" rows="6" cols="33" />
<p:selectOneListbox id="function"
widgetVar="function"
value="#{dataTransformBean.function}">
<f:selectItems value="#{dataTransformBean.functionValNames}" />
</p:selectOneListbox>
<p:draggable for="columnName" revert="true" helper="clone"></p:draggable>
I want to drag only selected item of <p:selectOneListBox> in <p:inputTextarea> for which for="id" which drags whole list box..How can I drag only selected item from list.
There is a "Drag & Drop - Custom" example in the showcase
http://www.primefaces.org/showcase/ui/dnd/custom.xhtml
In this example, it defines the class ".ui-treenode-leaf" to be draggable and class ".ui-datatable .droppoint" to be droppable.
(I guess) In the case of p:selectOneListBox, you can try to define "ui-selectlistbox-item ui-corner-all ui-state-highlight" as draggable. So only the selected (highlight'ed) selectlistbox item will be draggable. Of course you should also define p:inputTextarea as your droppable and create p:remoteCommands with necessary action listeners in the bean.
I would like to align the button of the right, but keep the content tabs on the left. This is my code:
<ext:TabPanel ID="TabPanel1" runat="server" Height="295" Plain="true" DeferredRender="false" meta:resourcekey="TabPanel1Resource1">
<TabBar>
<ext:Button runat="server" Icon="ArrowOut" meta:resourcekey="fullscreenResource1">
<DirectEvents>
<Click OnEvent="edit_fullOpenAdd" />
</DirectEvents>
</ext:Button>
</TabBar>
<Defaults>
<ext:Parameter Name="autoScroll" Value="true" Mode="Raw" />
</Defaults>
<Items>
......the content ......
</Items>
</ext:TabPanel>
Any Ideas?
Thank you!
Edit: I was told to try tabCls: 'right-tab', but I do not know how to implement this.
Use TabStrip control.
Please see this example: http://examples.ext.net/#/TabPanel/TabStrip/Overview/
I have custom button in lead ribbon. The custom button should be hidden when lead is qualified. How can I do that? Can any one please explain. I appreciate.
You can actually accomplish this entirely with built-in DisplayRule functionality. When a Lead is qualified, the StatusCode property is set to "Qualified", which translates into an OptionSet value of "3". You can check for the value of this property in a ValueRule and display/hide the control appropriately. I can think of two ways to achieve this:
Erik Pool's Visual Ribbon Editor
RibbonXml
<RibbonDiffXml>
<CustomActions>
<CustomAction Id="CompanyName.Form.lead.MainTab.Actions.Sample.CustomAction" Location="Mscrm.Form.lead.MainTab.Actions.Controls._children" Sequence="41">
<CommandUIDefinition>
<Button Id="CompanyName.Form.lead.MainTab.Actions.Sample" Command="CompanyName.Form.lead.MainTab.Actions.Sample.Command" Sequence="29" ToolTipTitle="$LocLabels:CompanyName.Form.lead.MainTab.Actions.Sample.LabelText" LabelText="$LocLabels:CompanyName.Form.lead.MainTab.Actions.Sample.LabelText" ToolTipDescription="$LocLabels:CompanyName.Form.lead.MainTab.Actions.Sample.Description" TemplateAlias="isv" />
</CommandUIDefinition>
</CustomAction>
</CustomActions>
<Templates>
<RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
</Templates>
<CommandDefinitions>
<CommandDefinition Id="CompanyName.Form.lead.MainTab.Actions.Sample.Command">
<EnableRules />
<DisplayRules>
<DisplayRule Id="CompanyName.Form.lead.MainTab.Actions.Sample.Command.DisplayRule.ValueRule" />
</DisplayRules>
<Actions>
<Url Address="http://www.bing.com" />
</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules>
<DisplayRule Id="CompanyName.Form.lead.MainTab.Actions.Sample.Command.DisplayRule.ValueRule">
<ValueRule Field="statuscode" Value="3" />
</DisplayRule>
</DisplayRules>
<EnableRules />
</RuleDefinitions>
<LocLabels>
<LocLabel Id="CompanyName.Form.lead.MainTab.Actions.Sample.LabelText">
<Titles>
<Title languagecode="1033" description="Sample" />
</Titles>
</LocLabel>
<LocLabel Id="CompanyName.Form.lead.MainTab.Actions.Sample.Description">
<Titles>
<Title languagecode="1033" description="Sample Description" />
</Titles>
</LocLabel>
</LocLabels>
</RibbonDiffXml>