Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
web:grid2 [2019/11/19 23:36]
agcyphers [Common Problems]
web:grid2 [2019/12/12 23:03] (current)
agcyphers [Examples]
Line 161: Line 161:
 End Sub</​code>​ End Sub</​code>​
  
 +=== Retrieving Value from Selected Row ===
 +This is done by reading the SelectedRows array:
 +<code xojo>Sub SelectionChanged() Handles SelectionChanged
 +  if me.SelectedRows.Ubound >= 0 then
 +    dim selRow as GraffitiWebGridRow = me.SelectedRows(0)
 +    dim firstColumn as GraffitiWebGridColumn = me.Column(0)
 +    dim rowColumnValue as String = selRow.Cell( firstColumn )
 +    '// Do something with rowColumnValue here. Note that GraffitiWebGridRow.Cell
 +    ' ​  ​returns a variant which matches the data type of that column, so String
 +    ' ​  may not be the correct data type depending on what you're project is
 +    ' ​  ​doing.
 +  end if
 +  End Sub</​code>​
 ==== Notes ==== ==== Notes ====
 === Column Direct Modification === === Column Direct Modification ===