Muthu
Muthu

Reputation:

grid selected row

Hi iam using infragistics ultrawebgrid in this how to get the selected row index in the button click event

Upvotes: 0

Views: 2604

Answers (1)

auujay
auujay

Reputation: 588

Is the "button click event" the ClickCellButton event or some other Infragistic event that is passing in a CellEventArgs? If so you can grab it directly from that.

private void grid_ClickCellButton(object sender, CellEventArgs e)
{
    int rowIndex = e.Cell.Row.Index;
}

As you can see, once you have the cell object you can move along to the row and even the others cells (via e.Cell.Row.Cells) you want to.

If you are using an event that is passing in RowEventArgs you can do that same thing.

private void grid_AfterRowUpdate(object sender, RowEventArgs e)
{
    int rowIndex = e.Row.Index;
}

Upvotes: 1

Related Questions