Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
535
Simple clickcellbutton question
posted

Hi,

i have a webgrid with several columns ID,.., Details
The column Details has the Columntyp Button with the text "Details"
If i click on "Details" ClickCellButton is fired and i can get the value of
Details (e.Cell.Value.ToString) which is "Details"..
Is there a possibility to get the value of the first Column (ID)? ->
e.cell...

Thanks fo helping

Torsten

Parents
  • 28464
    posted

     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; 

Reply Children