In ext.net, how do I align a tabpanel button to the right? - ext.net

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/

Related

ShowExportToExcelButton is not displayed in Telerik RadGrid with less than 10 records

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.

How to make a single column in Telerik Radgrid Resizable?

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".

Ext:BooleanColumn,when editing ,it shows true or false value

I have a grid and there is ext:BooleanColumn inside it,and I put a combobox for editing boolen colum.everything works fine ,except of this one .when I click boolen colum to edit,it shows false or true inside it,
I added a image what I trying to say.
how I can avoid this .thank you
and here is the my code :
<ext:BooleanColumn ID="BooleanColumn1" runat="server" DataIndex="BorcOdendimi" TrueText="odendi" Text="ödenme durumu"
FalseText="odenmedi" >
<Editor>
<ext:ComboBox runat="server" Text="odendi durumu" Editable="false">
<Items>
<ext:ListItem Text="Odendi" Value="1" />
<ext:ListItem Text="Odenmedi" Value="0" />
</Items>
</ext:ComboBox>
</Editor>
</ext:BooleanColumn>
To get it working the Values of the ComboBox's Items should match the values of a BooleanColumn. Currently, true/false (BooleanColumn's values) doesn't match 1/0 (ComboBox Items' values).
You can replace the existing ComboBox's Items with:
<ext:ListItem Text="Odendi" Value="true" Mode="Raw" />
<ext:ListItem Text="Odenmedi" Value="false" Mode="Raw" />
Answered in the Ext.NET forums thread.

Get selected values from MultiCombo in Ext.NEt via JS

I am using Ext.Net I have a form with a ComboBox which I have just changed to a MultiCombo.
Previously I used "SelectEnquiry.getValues()" to retrieve the selected item and pass it into a parameter used with a Button Direct Event.
How do I get the selected values when using the MultiCombo?
Combo Box Bit
<ext:MultiCombo runat="server" ID="SelectEnquiry" FieldLabel="Enquiry" AnchorHorizontal="95%" Editable="false" ValueField="Id" DisplayField="ProviderName" TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" EmptyText="Select Enquiry" ValueNotFoundText="Select Enquiry" ItemSelector="div.list-item" SelectOnFocus="true" AllowBlank="false">
Button form submit bit
<ext:Button runat="server" ID="ButtonEmailTaskAccept" Text="OK">
<Listeners>
<Click Handler="if (PanelUnlinked.isVisible() && !$form.validate( [SelectProject, SelectEnquiry])) return false;">
</Click>
</Listeners>
<DirectEvents>
<Click Url='<%# Url.Action("CompleteEmailTask") %>' AutoDataBind="true"
Success="window.$messageBus.publish('task-admin', 'inbox-changed');
window.$messageBus.publish('task-admin', 'task-changed');
WindowAssignEmail.close()" Failure="$shell.requestFailedHandler(response, null)"
Json="true">
<EventMask ShowMask="true"></EventMask>
<ExtraParams>
<ext:Parameter Name="emailResponseId" Value="<%# Model.EmailResponse.Id %>" Mode="Value"
AutoDataBind="true" />
<ext:Parameter Name="enquiryId" Value="SelectEnquiry.getValues()" Mode="Raw" />
<ext:Parameter Name="documentList" Value="buildSelectionList()" Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
With <ext:MultiCombo> you can just call .getValue() to return an Array of selected values. I'll look into adding .getValues() as well, so it's consistent with the <ext:ComboBox> api.
Edit
It appears the ComboBox does not have a client-side .getValues() function, so we won't be adding to the MultiCombo. Just use .getValue(), which is standardised across all Form Fields.
The problem seemed to be that it could not locate the control I was try to get the value from.
So managed to solve it by doing:
#{SelectEnquiry}.getSelectedValues()

Ribbon button should be hidden based on lead status - CRM 2011

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>

Resources