Hey,
I have a requirement like after load of the xam grid I have to set a row as selected row depending on a pre-set variable. Now as the grid content are hugh, so only some initial rows are getting created initially, and later are getting created as we scroll further. So if I have to select a row which is almost at the bottom, when I finished creating the grid, that time those rows are not at all created or some thing sort of that. The selection works fine if it is for upper rows.
Any way out for that..
Hello Mike,
I have created a sample project for you, using the code I have provided I my previous post, and everything seems to work as expected. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior, and send it back to me for further investigation.
Looking forward for your reply.
Stefan,
This was really helpful that you answered this guy's question as I came into this thread by searching google.
I did set the Records property, but the row is never highlighted. How do I do that?
Thanks.
Mike
Hello,
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post and I suggest you use the following code in your XamDataGrid’s Loaded event:
xamDataGrid1.Records[i].IsSelected = true;
which will selects the Record with Index equals to “ i “, even the XamDataGrid’s RecordContainerGenarationMode is set to Recycle, which is its default value, and the Record is not in the viewable area at the beginning.
Feel free to write me if you have further questions.
I believe one of the settings you can set for the grid is have it load all of the data in the grid at load time. Or you can load only what can be viewed at load time. I think the latter is the default.
Bryan K