Hi,i have a webgrid with several columns ID,.., DetailsThe column Details has the Columntyp Button with the text "Details"If i click on "Details" ClickCellButton is fired and i can get the value ofDetails (e.Cell.Value.ToString) which is "Details"..Is there a possibility to get the value of the first Column (ID)? ->e.cell...Thanks fo helpingTorsten
Is something along the alines of the sample code below helpful?
protected void UltraWebGrid1_ClickCellButton(object sender, CellEventArgs e) { object value = e.Cell.Row.Cells[0].Value; }
Basically, using the Row property of the cell clicked to get to the parent row and then access the cell you need by index. Or alternatively, using the FromKey method, e..
object value = e.Cell.Row.Cells.FromKey("someKey").Value;
How to change value or button caption in "ClickCellButton"?
I am doing following and it doesn't work?
If e.Cell.Value = "Accept Quote" Then
e.Cell.Row.Cells("Action").bu.Value = "Unselect this item"
ElseIf e.Cell.Value = "Unselect this item" Then
e.Cell.Row.Cells("Action").Value = "Accept Quote"
End If
End Sub
moved to Wingrid Forum