This is a migrated thread and some comments may be shown as answers.

Scroll and select to last row of radgrid in c# code

1 Answer 390 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matteo
Top achievements
Rank 1
Matteo asked on 02 Jun 2016, 08:46 AM
How do I go to the last row of the RadGrid? the line must be visible and selected. I did so but it does not work (Prerender event):
                int c = rdg.Items.Count;
                GridDataItem item = rdg.Items[c - 1];

                rdg.ClientSettings.Scrolling.AllowScroll = true;
                item.Font.Bold = true;
                item.Selected = true;
                item.Display = true;
                item.Visible = true;

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 07 Jun 2016, 08:41 AM
Hi Matteo,

You can achieve this requirement only on client-side. Select the last item using the OnCreated event handler or Page_Load or $(document).ready:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/client-side-programming/gridtableview-object/methods/selectitem

Then, you can use the scrolling logic demonstrated in the attached web site sample.

Regards,
Eyup
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Grid
Asked by
Matteo
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or