We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Selecting the Current row with code

I am ussing the following code when a page loads to select the desired row:

Record rec = this.grdLocations.Table.Records[Convert.ToInt32(lblDisplayOrder.Text) - 1];
rec.SetCurrent();
rec.SetSelected(true);

It works great is the row is on the first page. If the row is on a different page the it just sets the selected to record 1.

5 Replies

RA Ramu Syncfusion Team August 22, 2006 02:05 AM UTC

Hi Greg,

We are looking into it and will update you as soon as possible.

Thanks,
Ramu.K


SI Sivakumar Syncfusion Team August 22, 2006 11:41 PM UTC

Hi Greg,

The issue you are facing is because of we now don''t have any support for preventing the selection of first record row when the page loads. so when the currently selected record is not visible it considers the first record as selected.

To overcome this issue We decided to make a bool property called EnsureSelection which if false, we can prevent this behavior.

we have logged a FR reg this and you can see the progress of the issue here:

http://www.syncfusion.com/support/features/grid/Default.aspx?ToDo=view&questId=1119

Sorry for the inconvenience caused

Thanks,
A.Sivakumar


GM Greg Mills August 23, 2006 05:43 PM UTC

I would also like the ability to switch to a particular page of the grid during the load of the Page.


RA Ramu Syncfusion Team August 23, 2006 09:37 PM UTC

Hi Greg,

You con directly load the second page in Grid by using the following code in Init method.

Source Code:
[C#]

this.GridGroupingControl1.CurrentPage = 2;

Hope this solves your problem.

Thanks,
Ramu.k


GR GregMills August 30, 2006 11:40 PM UTC

This has been resolved.

Thanks for the help

Loader.
Live Chat Icon For mobile
Up arrow icon