Hello, Telerik Team,
I have a question about your RadGrid control.
I have a Hierarchical RadGrid with two levels, the markup of the grid looks like this:
The refreshGrid Javascript function looks like this:
I have a RadWindow where another page is loaded where I can add/delete/modify columns and I have a "sunny day" scenario when the columns in the outer level are changed: the grid is rebinded and the new columns appear nicely. However, when I modify/delete/add columns in the inner levels the grid is rebinded, but the column set in the inner levels is not refreshed. I've debugged the server-side code and everything is fine there, but on the client side I have the old column setup. Is there a solution to my problem, or should I wait for a new version of Telerik?
Note: I've done a temporary hack to hide this anomality from the users where the refreshGrid function only rebinds if the column modification/deletion/insertion happened in the outer layer. Elseway the page is reloaded. I know this is an ugly hack, but I don't see any alternatives.
I appreciate any help.
Sincerely Yours,
Lajos Arpad.
I have a question about your RadGrid control.
I have a Hierarchical RadGrid with two levels, the markup of the grid looks like this:
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="true" AllowCustomPaging="true" AllowMultiRowSelection="true"> <MasterTableView DataKeyNames="ID" ClientDataKeyNames="ID" InsertItemPageIndexAction="ShowItemOnCurrentPage"> <Columns> <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/Icons/Edit.png" CommandName="Edit" Text="Edit" UniqueName="EditColumn"> </telerik:GridButtonColumn> <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/Icons/Delete.png" CommandName="DeleteShift" ConfirmText="Do you want to delete this Shift?" ConfirmDialogHeight="150" ConfirmTitle="Confirmation" ConfirmDialogType="RadWindow" Text="Delete" UniqueName="DeleteColumn"> </telerik:GridButtonColumn> <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/Icons/AddRecord.png" CommandName="AddJob" Text="Add Job" UniqueName="AddJob"> </telerik:GridButtonColumn> <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/Icons/ExportCSV.png" CommandName="ExportJobsCSV" Text="Export Jobs" UniqueName="ExportJobsCSV"> </telerik:GridButtonColumn> <telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID" Visible="False"> </telerik:GridBoundColumn> </Columns> <DetailTables> <telerik:GridTableView Width="100%" runat="server" DataKeyNames="ID" ClientDataKeyNames="ID" AllowFilteringByColumn="false" AllowPaging="false" ItemStyle-BackColor="#DCD9C5" AlternatingItemStyle-BackColor="#C0BDAE" AllowSorting="false"> <%--<ParentTableRelation> <telerik:GridRelationFields DetailKeyField="ShiftID" MasterKeyField="ID" /> </ParentTableRelation>--%> <Columns> <%-- <telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="~/Images/Icons/Edit.png" HeaderStyle-Font-Size="Smaller" HeaderStyle-Width="34px" HeaderText="Edit" UniqueName="EditColumn" />--%> <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/Icons/Edit.png" CommandName="EditJob" UniqueName="EditColumn" Text="Edit"> </telerik:GridButtonColumn> <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/Icons/Delete.png" CommandName="DeleteJob" ConfirmTitle="Confirmation" ConfirmText="Are you sure you want do delete this Job?" ConfirmDialogHeight="150" ConfirmDialogType="RadWindow" Text="Delete" UniqueName="DeleteColumn" /> </Columns> </telerik:GridTableView> </DetailTables> <CommandItemTemplate> <div class="cmdItem"> <asp:LinkButton ID="btnAddShift" runat="server" CommandName="Add Shift" OnClientClick="javascript:lastTableView=null;"> <img alt="" src="../../Images/Icons/AddRecord.png" />Add Shift</asp:LinkButton> <asp:LinkButton ID="btnExportCSV" runat="server" CommandName="Export CSV" OnClientClick="return exportGrid('CSV');"><img alt="" src="../../Images/Icons/ExportCSV.png" />Export to CSV</asp:LinkButton> <asp:LinkButton ID="btnManageShiftColumns" runat="server" CommandName="Manage Shift Columns"> <img alt="" src="../../Images/Icons/Columns.png" />Manage Shift Columns</asp:LinkButton> <asp:LinkButton ID="btnManageJobColumns" runat="server" CommandName="Manage Job Columns"> <img alt="" src="../../Images/Icons/Columns.png" />Manage Job Columns</asp:LinkButton> <%--<asp:LinkButton ID="btnDetailedExportCSV" runat="server" CommandName="Export CSV Detailed" OnClientClick="return exportGrid('CSVDetailed');"><img alt="" src="../../Images/Icons/ExportCSV.png" />Detailed Export to CSV</asp:LinkButton> <asp:LinkButton ID="btnExportPDF" runat="server" CommandName="Export PDF" OnClientClick="return exportGrid('PDF');"><img alt="" src="../../Images/Icons/ExportPDF.png" />Export to PDF</asp:LinkButton> --%> </div> </CommandItemTemplate> </MasterTableView> <ClientSettings> <ClientEvents OnCommand="gridCommand" /> <Selecting AllowRowSelect="True" UseClientSelectColumnOnly="true" /> </ClientSettings></telerik:RadGrid>The refreshGrid Javascript function looks like this:
function refreshGrid(sender) { $find("<%= RadGrid1.ClientID %>").get_masterTableView().rebind(); showScrollBars();}I have a RadWindow where another page is loaded where I can add/delete/modify columns and I have a "sunny day" scenario when the columns in the outer level are changed: the grid is rebinded and the new columns appear nicely. However, when I modify/delete/add columns in the inner levels the grid is rebinded, but the column set in the inner levels is not refreshed. I've debugged the server-side code and everything is fine there, but on the client side I have the old column setup. Is there a solution to my problem, or should I wait for a new version of Telerik?
Note: I've done a temporary hack to hide this anomality from the users where the refreshGrid function only rebinds if the column modification/deletion/insertion happened in the outer layer. Elseway the page is reloaded. I know this is an ugly hack, but I don't see any alternatives.
I appreciate any help.
Sincerely Yours,
Lajos Arpad.