I have a RadGrid hooked up to a RadAjaxManager so that it is "ajaxified." On the grid, I have both ClientSettings-EnableRowHoverStyle=true and Client-Settings-Selecting-AllowRowSelect=true. After I change pages by clicking one of the arrows in the pager, the functionality associated with these two settings stops working (i.e. the rows no longer show the row hover style, and I can no longer select a row).
5 Answers, 1 is accepted
0
Rippa
Top achievements
Rank 1
answered on 12 Mar 2008, 01:29 AM
We are having a similar issue:
Our grid is a custom grid inherited from the RadGrid,
we do not overload anything from the RadGrid we just add
some extra properties/methods/functions to enable
automatic binding and column generation from our custom
data collections.The grid is created at run time in the Page.Init() as
shown in the code below. After paging or sorting, we can
no longer doubleclick rows, select rows or group by column
headers. Simplified code is given below.
override protected void OnInit(EventArgs e) { // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent(); base.OnInit(e); RecordsCollection thisRecordsColl = new RecordsCollection(); //load the records CustomGrid thisGrid = new CustomGrid(); thisGrid.CustomDataSource = thisRecordsColl; //specify the datasource thisGrid.GenerateGrid(); // this generates columns based on fields in thisGrid.CustomDataSource and adds them to the MaterTable // Define the Grid // A lot of this will be moved into GenerateGrid() as default behaviour thisGrid.ShowFooter = true; thisGrid.ShowHeader = true; thisGrid.AutoGenerateColumns = false; thisGrid.Skin = "Office2007"; thisGrid.ShowStatusBar = true; thisGrid.PageSize = 10; thisGrid.AllowSorting = true; thisGrid.AllowMultiRowSelection = false; thisGrid.AllowPaging = true; thisGrid.GridLines = GridLines.None; thisGrid.EnableViewState = true; thisGrid.AllowFilteringByColumn = false; thisGrid.AllowAutomaticDeletes = false; thisGrid.AllowAutomaticInserts = false; thisGrid.AllowAutomaticUpdates = false; thisGrid.GroupingEnabled = true; thisGrid.ShowGroupPanel = true; thisGrid.MasterTableView.NoMasterRecordsText = "There are no records to be displayed"; thisGrid.MasterTableView.NoDetailRecordsText = "There are no details to display"; thisGrid.MasterTableView.AllowCustomSorting = true; thisGrid.MasterTableView.DataKeyNames = "RecordID".Split(','); thisGrid.MasterTableView.ClientDataKeyNames = "RecordID,RecordNumber".Split(','); thisGrid.MasterTableView.Name="Records"; thisGrid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None; thisGrid.MasterTableView.HierarchyLoadMode = GridChildLoadMode.ServerOnDemand; thisGrid.ClientSettings.ReorderColumnsOnClient = true; thisGrid.ClientSettings.AllowDragToGroup = true; thisGrid.ClientSettings.AllowColumnsReorder = true; thisGrid.ClientSettings.AllowColumnHide = true; thisGrid.ClientSettings.AllowKeyboardNavigation = false; thisGrid.ClientSettings.Selecting.AllowRowSelect = true; thisGrid.ClientSettings.Resizing.AllowRowResize = false; thisGrid.ClientSettings.Resizing.AllowColumnResize = true; thisGrid.ClientSettings.Resizing.ResizeGridOnColumnResize = false; thisGrid.ClientSettings.ClientMessages.DragToGroupOrReorder = "Drag and drop a column header here to group"; // We add some detail tables here… but they are removed for clarity. Functionality does not change. Double click still doesn’t fire after paging/sorting. thisGrid.ClientSettings.ClientEvents.OnRowDblClick = "EditGrid"; // Without these next 2 lines RowDblClick never worked… dummy does not exist thisGrid.ClientSettings.ClientEvents.OnRowCreated = "dummy"; thisGrid.ClientSettings.ClientEvents.OnRowCreating = "dummy"; thisGrid.PagerStyle.Mode = GridPagerMode.NextPrevNumericAndAdvanced; thisGrid.SortingSettings.SortToolTip = "Click to Sort"; PlaceHolder1.Controls.Add(thisGrid); thisGrid.NeedDataSource += new GridNeedDataSourceEventHandler(OnNeedDataSource); thisGrid.SortCommand += new GridSortCommandEventHandler(thisGrid _SortCommand); }
0
Hi guys,
I tried to recreate the issues you depicted using the latest release of RadGrid/RadAjax Prometheus but unfortunately to no avail (see the attached project). Note that there should be no difference whether you instantiate the grid statically or programmatically as long as you create the control dynamically in par with the concepts outlined in this topic.
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I tried to recreate the issues you depicted using the latest release of RadGrid/RadAjax Prometheus but unfortunately to no avail (see the attached project). Note that there should be no difference whether you instantiate the grid statically or programmatically as long as you create the control dynamically in par with the concepts outlined in this topic.
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
rcbarth
Top achievements
Rank 1
answered on 14 Mar 2008, 11:43 PM
Further details to help diagnose the problem: my page is in a masterpage/client page scenario and I have a .net ScriptManager control on the masterpage, however, the Telerik RadAjaxManager is on the client page.
Another annoying behavior is that if any of the parameters passed to the ObjectDataSource change, the grid adds the pager and/or some blank boxes at the bottom of the grid. Very ugly. If I do a very simple refresh (meaning, just do the simple call to the server via the AjaxManager can call .Rebind() on the grid), it redraws itself correctly.
Unfortunately, I can't put together a sample with these errors in it at this time because the page is rather complicated, hooked up to a 3-tier back-end system with SQL as the DB, and I have a release to QA Monday morning. Maybe I can put something together that demonstrates this problem after that.
Another annoying behavior is that if any of the parameters passed to the ObjectDataSource change, the grid adds the pager and/or some blank boxes at the bottom of the grid. Very ugly. If I do a very simple refresh (meaning, just do the simple call to the server via the AjaxManager can call .Rebind() on the grid), it redraws itself correctly.
Unfortunately, I can't put together a sample with these errors in it at this time because the page is rather complicated, hooked up to a 3-tier back-end system with SQL as the DB, and I have a release to QA Monday morning. Maybe I can put something together that demonstrates this problem after that.
0
Hello rcbarth,
Can you reproduce the issues by modifying the sample application attached to my previous post? Then send the updated version of the example attached to a formal support ticket. I will debug it locally and will do everything possible to provide straight-to-the-point explanation/fix. Thank you in advance for your cooperation.
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Can you reproduce the issues by modifying the sample application attached to my previous post? Then send the updated version of the example attached to a formal support ticket. I will debug it locally and will do everything possible to provide straight-to-the-point explanation/fix. Thank you in advance for your cooperation.
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Susan Hessler
Top achievements
Rank 1
answered on 06 Mar 2009, 10:28 PM
I had the same problem. Removing the following line from my web.config (not sure how it got there), fixed the problem.
<xhtmlConformance mode="Legacy"/>