I have one grid that has two bands.
How to determine which band is being selected or band row being selected
Basically, I want to write some logic that saids
If( Band[1] Is active or any row is selected)
{"do nothing, at the moment I careless about band[1], it there for visual at the moment."}
else if (Band[0] is selected or row is selected)
{"get data"}
Hey,
With the UltraGrid.Selected you can retrieve what is selected.
Example:retrieve the band index of the first selected row: UltraGrid.Selected.Rows(0).Band.Index retrieve the band index of the first selected cell: UltraGrid.Selected.Cells(0).Band.Index
If no cell, row or column is selected, I'm not sure if any band is selected and as such I don't think you'll be able to retrieve that.
Kind regards,
Michael
So are you telling me if 5 rows of Band[0] and each band has relative Band[1]
if I click on any of the 5 Band[1] rows it would jump in the else statement below?
if
(ultraGrid1.Rows[0].Band.Index == 0)
{
do something
}
else
do nothing