Posted 21 February 2019, 4:20 am EST
Hello folks,
I have a inherited class, based on FlexGrid. Because the user can add/delete/move columns i have serveral times code (VB.NET) like this.
Dim colWork as integer = 0
while colWork < [b]me.cols[/b].count
....
colWork += 1
End While
Unfortunabley i get often a null pointer exception and visual Studio points to ‘me.cols’. It seems to me, that the ColumnList ‘cols’ is null in that moment.
I use (a lot of) try-Statements as a workaround, but I’am wondering about this behavour. What happend here? I expect this property not null all over the time.
Is there a other (saver) way to get the number of cols/rows (fixed/frozen/total) as my code above?
Thank in advance for any help.
Niels