[CLOSED] RecordID in GridPanel

  1. #1

    [CLOSED] RecordID in GridPanel

    Hi
    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
  2. #2

    RE: [CLOSED] RecordID in GridPanel

    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

  3. #3

    RE: [CLOSED] RecordID in GridPanel

    Yes
    Thanks, as easy as that! It works great!

    Best regards
    Mikael Jürke

Similar Threads

  1. Replies: 1
    Last Post: Jun 08, 2011, 3:11 AM
  2. [CLOSED] CheckSelectionModel is not showing selected RecordId
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Feb 23, 2011, 3:14 PM
  3. [CLOSED] Selected Row Value not returning value from RecordID
    By Christopher Istvan in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 01, 2009, 10:21 PM
  4. [CLOSED] RowSelectionModel.UpdateSelection() breaks RecordID
    By alexp in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Apr 14, 2009, 12:38 PM

Posting Permissions