I have a RadGrid (along with a RadAjaxManager). The version is 2010.1.415.35
There is a 'Refresh' button on the page, which eventually calls __doPostBack.
Everything was working fine until I upgraded the website from .NET 3.5 to 4.0.
But now, after the AJAX call sender.get_masterTableView() returns null in the GridDestroying function.
Is there a fix for this version?
Attila
There is a 'Refresh' button on the page, which eventually calls __doPostBack.
Everything was working fine until I upgraded the website from .NET 3.5 to 4.0.
But now, after the AJAX call sender.get_masterTableView() returns null in the GridDestroying function.
Is there a fix for this version?
Attila
<telerik:RadGrid ID="grid" CellPadding="1" CellSpacing="0" EnableEmbeddedSkins="false" AlternatingItemStyle-Height="20" ItemStyle-Height="20" ShowFooter="True" AllowSorting="False" runat="server" EnableEmbeddedBaseStylesheet="false" AutoGenerateColumns="false" AllowMultiRowEdit="true" GridLines="None" Width="100%" ExportSettings-FileName="Summary" ExportSettings-Excel-FileExtension="xls" ExportSettings-Excel-Format="HTML" ExportSettings-OpenInNewWindow="true" ExportSettings-ExportOnlyData="true" ExportSettings-IgnorePaging="true"> <ClientSettings> <Scrolling AllowScroll="True" UseStaticHeaders="true" /> </ClientSettings> <HeaderContextMenu EnableEmbeddedSkins="False"></HeaderContextMenu> <MasterTableView ClientDataKeyNames="ROW_ID" DataKeyNames="ROW_ID" EditMode="InPlace" CommandItemDisplay="Bottom" AllowMultiColumnSorting="False" > <EditFormSettings> <EditColumn InsertImageUrl="Update.gif" UpdateImageUrl="Update.gif" EditImageUrl="Edit.gif" CancelImageUrl="Cancel.gif"> </EditColumn> </EditFormSettings> <CommandItemTemplate> <asp:Button ID="btnSave" runat="server" OnClientClick="AddNew();return false;" Text="Add" /> </CommandItemTemplate> </MasterTableView> <ClientSettings> <ClientEvents OnRowCreated="RowCreated" OnGridCreated="GridCreated" OnRowClick="RowClick" OnRowContextMenu="showMenu" OnColumnContextMenu="showHeaderMenu" OnCommand="RadGrid1_Command" OnGridDestroying="GridDestroying" /> </ClientSettings> </telerik:RadGrid>
protected override void RaisePostBackEvent( IPostBackEventHandler source, string eventArgument ) { base.RaisePostBackEvent( source, eventArgument ); if ( source == this. ) { if ( eventArgument.IndexOf( "Refresh" ) != -1 ) { grid.Rebind(); } } }
function GridDestroying(sender, eventArgs) { for (var i = 0; i < sender.get_masterTableView().get_dataItems().length; i++) { var curRow = sender.get_masterTableView().get_dataItems()[i]; for (var j = 0; j < curRow.get_element().cells.length; j++) { var cell = curRow.get_element().cells[j]; if (cell) { $clearHandlers(cell); } } } }