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 |
| } |
| } |
| <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> |
| <div style="width: 100%;"> |
| <Telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" |
| AllowSorting="True" ShowStatusBar="true" GridLines="None" ShowGroupPanel="True" > |
| <PagerStyle Mode="NextPrevAndNumeric" /> |
| <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True"> |
| <Resizing AllowColumnResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True" /> |
| <Scrolling AllowScroll="True" ScrollHeight='400px' UseStaticHeaders="True" SaveScrollPosition="True" /> |
| <Selecting AllowRowSelect="True" /> |
| </ClientSettings> |
| <MasterTableView Width="100%" TableLayout='Fixed' AllowMultiColumnSorting="true"> |
| <ItemStyle Wrap='true' /> |
| <HeaderStyle Width='100px' /> |
| <AlternatingItemStyle Wrap='true' /> |
| </MasterTableView> |
| <SortingSettings SortedBackColor="Azure" /> |
| </Telerik:RadGrid> |
| </div> |
<telerik:GridTemplateColumn DataField="Download" HeaderText="" UniqueName="Download">
<ItemTemplate>
<asp:LinkButton CommandName="Download" ForeColor="#2176D3" ID="lbDAR_Download" runat="server"
Text="Download"></asp:LinkButton>
</ItemTemplate>
</telerik:GridTemplateColumn>
In the Item Command of that grid i'm calling a function to download the file from the server.
Response.ClearHeaders()
Response.Clear()
Response.ContentType =
"application/pdf"
Response.AddHeader(
"Content-Disposition", "attachment; filename=" + AppDomain.CurrentDomain.BaseDirectory & sourceFile)
Response.WriteFile(AppDomain.CurrentDomain.BaseDirectory & sourceFile)
it works fine. But if i implement the ajax for this grid with the help of RadAjaxManager, the downloading is not working.
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid6">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid6" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Vista" />
- please provide me the solution.
-thanks,
-Saravana.