View Full Version : [CLOSED] RecordID in GridPanel

Oct 08, 2008, 8:29 AM
I have a gridpanel with CheckboxSelectionModel, and when i get the selected rows, I use the RecordID, but i dont know what this ID reflects. Im my case it returns 1101 for the first row and 1102 for the second. I thougt that the first row would be 1 and the second 2.
Can I control what value that will be in the RecordID property?

RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel;
foreach (SelectedRow row in sm.SelectedRows)
result.Append(row.RecordID + ";");
lblError.Text = result.ToString();

Best Regards
Mikael Jürke

Oct 08, 2008, 8:44 AM
Hi Mikael,

Did you set ReaderID in Reader object of Store? The ReaderID must contains the name of the id field. If you don't set the ReaderID the the store will be use auto generated id for maintenance internal state (the autongenerated ids don't have a sense on server side).

If you don't used ids then you can use RowIndex with RowSelectionModel

Oct 08, 2008, 9:02 AM
Thanks, as easy as that! It works great!

Best regards
Mikael Jürke