Hi to all,
in my szenario i use in a Grid a RadToolBar with a RadComboBox to filter (clientside) dataitems in the Grid. This works well!
Now i would like to go through to all DataItems which are Visible = true (x.get_visible()) and find the RadComboBoxes named "rcbCategory" to change the value and the text.
How can i get an instance to change value and the text.
Here is the JavaScript, where i would like to find the RadComboBox in the Grid:
| function DecisionExecute() { |
| // GetRegisteredServerElement('ddlCategory'); |
| var DataItems = $find("<%=rdgWI.ClientID %>").get_masterTableView().get_dataItems(); |
| for (i = 0; i < DataItems.length; i++) { |
| //HERE I NEED TO FIND THE RADCOMBOBOX |
| } |
| } |
Here is the ASCX:
| <table cellpadding="0" cellspacing="0" border="0" width="100%"> |
| <tr> |
| <td> |
| <telerik:RadToolBar ID="rdtbWl" runat="server" Style="display: block; float: none" Visible="false" |
| Width="100%"> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| <Items> |
| <telerik:RadToolBarButton Value="rtbWTypes" Text="rtbWTypes"> |
| <ItemTemplate> |
| <telerik:RadComboBox ID="rcbWTypes" |
| runat="server" |
| CssClass="DefaultText" |
| OnClientSelectedIndexChanged="OnClientSelectedIndexChanged" |
| DataTextField="Stext" |
| DataValueField="Stext" |
| HighlightTemplatedItems="True"> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| </telerik:RadComboBox> |
| </ItemTemplate> |
| </telerik:RadToolBarButton> |
| <telerik:RadToolBarButton Value="rtbColumnDecision" Text="rtbColumnDecision"> |
| <ItemTemplate> |
| <telerik:RadComboBox ID="rcbColumnDecision" |
| runat="server" |
| CssClass="DefaultText" |
| OnClientItemsRequested="ItemsLoaded" |
| OnItemsRequested="rcbColumnDecision_ItemsRequested"> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| </telerik:RadComboBox> |
| </ItemTemplate> |
| </telerik:RadToolBarButton> |
| <telerik:RadToolBarButton Text="Execute" Value="Execute" runat="server"> |
| <ItemTemplate> |
| <asp:Button ID="btnColumnDecisionExecute" runat="server" Text="Execute" OnClientClick="ColumnDecisionExecute()" /> |
| </ItemTemplate> |
| </telerik:RadToolBarButton> |
| </Items> |
| </telerik:RadToolBar> |
| </td> |
| </tr> |
| <tr> |
| <td width="100%"> |
| <telerik:RadGrid ID="rdgWI" |
| runat="server" |
| AutoGenerateColumns="False" |
| GridLines="None" |
| AllowPaging="False" |
| onneeddatasource="rdgWI_NeedDataSource" |
| PageSize="8" |
| AllowSorting="true"> |
| <HeaderContextMenu> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| </HeaderContextMenu> |
| <ClientSettings> |
| <Scrolling AllowScroll="True" UseStaticHeaders="true" /> |
| <ClientEvents OnGridCreated="GetGridObject"></ClientEvents> |
| </ClientSettings> |
| <MasterTableView ClientDataKeyNames="RhText" ShowHeadersWhenNoRecords="true" AllowSorting="True" ShowHeader="true" runat="server"> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridBoundColumn DataField="WiId" UniqueName="WiId" Visible="false"> |
| </telerik:GridBoundColumn> |
| <telerik:GridTemplateColumn HeaderText="Category" SortExpression="" UniqueName="Category" Visible="false"> |
| <ItemTemplate> |
| <telerik:RadComboBox ID="rcbCategory" DataSource='<%# GetDdlCategoryDataSource(Eval("RhTask")) %>' DataValueField="Description" DataTextField="Stext" runat="server"></telerik:RadComboBox> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| </Columns> |
| </MasterTableView> |
| <FilterMenu> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| </FilterMenu> |
| </telerik:RadGrid> |
| </td> |
| </tr> |
| </table> |
Thanks in advance