[ADDED] [V0.6] SelectionModel Request

  1. #1

    [ADDED] [V0.6] SelectionModel Request

    Hello,

    Would it be possible to have an additional property set for working with SingleSelect ? Would be nice to just say:

    
    MySelectionModel.SelectedIndex = 20;
    
    or
    
    MySelectionModel.SelectedValue = "PK";
    Would be absolutely brilliant :)

    Cheers,
    Timothy
  2. #2

    RE: [ADDED] [V0.6] SelectionModel Request

    Good idea. We're implementing this feature. Should be available later today.

    Geoffrey McGill
    Founder
  3. #3

    RE: [ADDED] [V0.6] SelectionModel Request

    Great, thank you very much ;)

    Just reply here when it's available and I'll start using it

    Cheers,
    Timothy
  4. #4

    RE: [ADDED] [V0.6] SelectionModel Request



    Hi Timothy,

    The .SelectedIndex and .SelectedRecordID properties have been added to the RowSelectionModel.

    The following code sample demonstrates setting both properties.

    Example

    RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel;
    // Set either the RecordID for the Store
    sm.SelectedRecordID = "Caterpillar Inc.";
    
    // Or, the index of the record
    sm.SelectedIndex = 3;
    The following sample demonstrates getting the .SelectedIndex or .SelectedRecordID.

    Example

    protected void Button1_Click(object sender, AjaxEventArgs e)
    {
        RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel;
        // Get the RecordID
        this.Label1.Text = "Selected: " + sm.SelectedRecordID;
    
        // Or, the index of the selected row.
        this.Label1.Text = "Selected: " + sm.SelectedIndex.ToString();
    }
    Hope this helps.
    Geoffrey McGill
    Founder
  5. #5

    RE: [ADDED] [V0.6] SelectionModel Request

    Awesome,

    Cheers,
    Timothy

Similar Threads

  1. Replies: 4
    Last Post: Aug 08, 2012, 6:28 PM
  2. Replies: 12
    Last Post: Jun 04, 2012, 11:18 AM
  3. SelectionModel with end row
    By Kai_it in forum 1.x Help
    Replies: 2
    Last Post: Oct 23, 2011, 10:53 AM

Posting Permissions