Showing results for 
Search instead for 
Did you mean: 

Dialog table control This.SelRow returns wrong value when Table.Rows.Count = 1

I am using DIAdem 2021.  I have a dialog with a table control named 'Table1'. 


When the table has more than one row (Table1.Rows.Count = 2), then event Table1_OnSelChange(This) returns This.SelRow = 0 when a column is selected, and This.SelRow = (row #) when a cell is selected.  This is the correct behavior.


When the table has one row (Table1.Rows.Count = 1), then event Table1_OnSelChange(This) returns This.SelRow = 1 when a column is selected, and This.SelRow = 1 when a data cell in row #1 is selected.  This is incorrect.  This.SelRow = 0 is what is expected when an entire table column is selected.


Because of this issue, it is impossible to differentiate when a user selects and entire column, or just a data cell row #1 when Table1.Rows.Count = 1.  Note also that This.SelectedCells.Count doesn't help to differentiate the two conditions either. 





0 Kudos
Message 1 of 1