The following steps create this issue: 1. Use html 4 2. Use telerik AJAX (For consistency) 3. Set a radgrid with some columns that reach beyond the extent of its element (such that it requires horizontal scrolling). Use at least four columns. One being the GridClientSelectColumn. 4. Have the following settings: Control Settings: AllowPaging=true,AllowSorting=true,AllowFiltering=true,AllowFilteringByColumn=true,AllowMultiRowSelection=true Control Events Used: NeedDataSource,OnItemDataBound Client Settings: EnablePostBackOnRowClick=false,Resizing AllowColumnResize=true, Selecting AllowRowSelect=true,UseClientSelectColumnOnly=false,Scrolling,AutoGenerateColumns=false,AllowScroll=true,UseStaticHeaders=true Important note: Retain data on the server, rebind, and, on item databound, select the previously selected rows. Set up a button to perform some action on the selected rows and have this action use AJAX such that this action depends on the currently selected rows in the RadGrid. 5. Scroll away from the selection checkboxes 6. Select some rows in your RadGrid 7. Perform your action with AJAX If all was set up correctly, your grid should have been rebound with the previously selected rows re-selected. The RadGrid should still be scrolled to its previous position. 8. Perform your action with AJAX again. Here's the bug, the grid states that it has no selected items; however, the client shows that there are items selected in the UI. This may be related to "RadGrid's last selected item index is not persisted correctly when two or more postbacks are triggered from external controls."
For keyboard users who don't have a specific Context Menu key (see https://en.wikipedia.org/wiki/Menu_key), they typically need to use the Windows standard SHIFT+F10 hotkey to trigger a contextmenu event. For example: 1. In IE, load http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/context-menu/defaultcs.aspx 2. Tab to a column header link 3. Press SHIFT+F10 (standard Windows/IE hotkey to open context menu) 4. Notice the context menu displays, however, the focus is really on the IE menubar. IE supports F10 to open the menubar, but is also seeing SHIFT+F10 too. Or 1. In FireFox, load http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/context-menu/defaultcs.aspx 2. Tab to a column header link 3. Press SHIFT+F10 (standard Windows/IE hotkey to open context menu) then press down arrow 4. Notice the context menu displays, however, the focus is really on FireFox's application system menu in the upper left. Chrome does not have this issue - it opens the grid context menu only. We need IE and FireFox to also only open the grid's context menu, and not trigger default browser behavior. According to https://yuilibrary.com/yui/docs/event/contextmenu.html, it is possible to correct this behavior by calling event.preventDefault() when SHIFT+F10 is pressed, but then trigger a synthetic contextmenu event anyway. As a workaround, we know users can press Escape to close the browser's default menu and bring focus back into the HTML document (and thus the grid's context menu), but this throws off the user experience and becomes a training issue.
Hidden columns are shown on resize when the static headers and frozen column are used. Video: https://www.screencast.com/t/4Lwuvbp7 Possible workarounds: - Hide the column with Visible="False", instead of Display="False" - Hide the column on the client-side: function gridCreated(sender, args) { var masterTableView = sender.get_masterTableView(); columnIndex = masterTableView.getColumnByUniqueName("ShipName").get_element().cellIndex; setTimeout(function () { masterTableView.hideColumn(columnIndex); }, 2); } Steps to reproduse: <telerik:RadGrid RenderMode="Lightweight" HeaderStyle-Width="200px" AutoGenerateColumns="false" ID="RadGrid1" OnNeedDataSource="RadGrid1_NeedDataSource" Width="100%" runat="server"> <ClientSettings> <Scrolling AllowScroll="True" UseStaticHeaders="true" FrozenColumnsCount="2"></Scrolling> </ClientSettings> <MasterTableView AutoGenerateColumns="false"> <Columns> <telerik:GridBoundColumn DataField="SongID" HeaderText="SongID" FilterControlWidth="50px" HeaderStyle-Width="50px"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="SongTitle" HeaderText="Song Title" FilterControlWidth="200px"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CollectionName" HeaderText="Collection Name" FilterControlWidth="200px"></telerik:GridBoundColumn> <telerik:GridBoundColumn FilterControlWidth="50px" DataField="VersionID" HeaderText="VersionID" Display="false"></telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid> Code Behind: protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { (sender as RadGrid).DataSource = GetData(); } private DataTable GetData() { DataTable dt = new DataTable(); dt.Columns.Add("SongID"); dt.Columns.Add("SongTitle"); dt.Columns.Add("CollectionName"); dt.Columns.Add("VersionID"); for (int i = 0; i < 20; i++) { dt.Rows.Add(i, i + 1, i + 2, i + 3); } return dt; }
When trying to batch edit cell values of the Grid via e.g., RadEditor (GridHTMLEditorColumn or RadEditor in EditItemTemplate of GridTemplateColumn) the cell value always result to a plain text.
In GridTableView.cs, you provide a function protected virtual GridTableView CreateTableView() (Line 7828). This function can be overloaded to return derived classes from GridTableView. But, this is not overloadable completely. Because you create a GridTableView directly in protected void BuildDetailTablesFromDataSource() (Line 8808), too. There you would have to call a virtual creator function, too. This is necessary, because I have a lot of Trouble with your DataBind which I was able to fix with an overload. It is much to hard to make this bug visible for you, I really tried to do so already, but I had to fix this that way, because your GridTableView without my derivation fails in our szenario. The call stack for that problem, I'd had to fix, is always like: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.IndexOutOfRangeException: Cannot find column CheckSum. at System.Data.DataTable.ParseSortString(String sortString) at System.Data.DataView.set_Sort(String value) at Telerik.Web.UI.GridEnumerableFromDataView.PerformTransformation() at Telerik.Web.UI.GridEnumerableFromDataView.TransformEnumerable() at Telerik.Web.UI.GridTableView.GetEnumerator(Boolean useDataSource, GridEnumerableBase resolvedDataSource, ArrayList dataKeysArray, Boolean shouldClearDataKeys) at Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) at Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) at Telerik.Web.UI.GridTableView.PerformSelect() at Telerik.Web.UI.GridTableView.DataBind() at Telerik.Web.UI.GridItemBuilder.BindDetailTable(GridDataItem parentItem, GridTableView cloned) at Telerik.Web.UI.GridItemBuilder.BindDetailTables(GridDataItem parentItem, GridNestedViewItem detailItem) at Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) at Telerik.Web.UI.GridTableView.CreateItems(IEnumerator enumerator, GridColumn[] columns, ControlCollection controls) at Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) at Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) at Telerik.Web.UI.GridTableView.PerformSelect() at Telerik.Web.UI.GridTableView.DataBind() In that, your DataTableView gets an invalid sort Expression string. Therefore, I overwrote DataBind. But this is not possible in all cases, if you create GridViewTable() objects on your own. Best regards
System.ArgumentOutOfRangeException
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
This error seems to happen if there is a GridTemplateColumn that has the Exportable property set to False.
Have built-in option to do LIKE filtering on grids.
I have added Listview in Header template in Template column, its showing the data on the grid as expected. When I am exporting to Excel or PDF its not exporting the header. Header you see in headertemplate.jpg is not exporting to PDF Thanks
Using CommandItemTemplate (Grid - Command Item) for Editing DetailTable records and selecting an item after filtering or from another page, one item from the first page is put for editing instead. Open the attached GIF animation (EditSelectedEditWrongItem.gif) to see it in action.
Currently the workaround we offer is to handle the EditSelected command manually for all the DetailTables Except for the Master.
Grid markup:
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" Width="100%" PageSize="3"
OnItemCommand="RadGrid1_ItemCommand"
OnDetailTableDataBind="RadGrid1_DetailTableDataBind"
OnNeedDataSource="RadGrid1_NeedDataSource">
<MasterTableView Name="MasterTable" AutoGenerateColumns="true" DataKeyNames="OrderID">
<DetailTables>
<telerik:GridTableView Name="ChildTable" DataKeyNames="OrderID" AutoGenerateColumns="true" CommandItemDisplay="Top">
<CommandItemTemplate>
<asp:LinkButton ID="btnEditSelected" runat="server" CommandName="EditSelected" CssClass="btn btn-default">Edit Selected</asp:LinkButton>
</CommandItemTemplate>
</telerik:GridTableView>
</DetailTables>
</MasterTableView>
<ClientSettings>
<Selecting AllowRowSelect="true" />
</ClientSettings>
</telerik:RadGrid>
C# - ItemCommand
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
// Logic applies for all the tables (detail tables) which are not named "MasterTable"
if(e.Item.OwnerTableView.Name != "MasterTable" && e.CommandName == RadGrid.EditSelectedCommandName)
{
e.Canceled = true;
GridTableView detailTable = e.Item.OwnerTableView;
if (detailTable.OwnerGrid.SelectedIndexes.Count == 0)
{
return;
}
foreach (GridDataItem selectedItem in detailTable.OwnerGrid.SelectedItems)
{
selectedItem.Edit = true;
}
detailTable.Rebind();
}
}
VB - ItemCommand
Protected Sub RadGrid1_ItemCommand(ByVal sender As Object, ByVal e As GridCommandEventArgs)
If e.Item.OwnerTableView.Name <> "MasterTable" AndAlso e.CommandName = RadGrid.EditSelectedCommandName Then
e.Canceled = True
Dim detailTable As GridTableView = e.Item.OwnerTableView
If detailTable.OwnerGrid.SelectedIndexes.Count = 0 Then
Return
End If
For Each selectedItem As GridDataItem In detailTable.OwnerGrid.SelectedItems
selectedItem.Edit = True
Next
detailTable.Rebind()
End If
End Sub
I skipped the 3rd quarter 2016 update (2016.3.1027) for my copy of Telerik UI for ASP.NET.AJAX, since we were in code lock down at that time. Later i installed the 4th quarter version (2016.4.1021.0) Now, I still get a notice to install the previous version (2016.3.1027) that I skipped. That's annoying, and probably not possible. Right? Is there anything we can do about this situation? Thanks in advance Tommy Heath theath@teamenders.com
Currently the Width of the Edit controls inside the inline Edit form of the Grid can be set only in pixels. In order to be able to implement a responsive layout the developer has to be able to set the width of these controls in percentage.