D
DraguVaso
Hi,
I'm having an error that I didn't really expected:
I have a DataGrid, to which I added a (empty) TableStyle like this:
dbgMulti.TableStyles.Clear()
Dim tbsTableStyle As New DataGridTableStyle
dbgMulti.TableStyles.Add(tbsTableStyle)
When I Want to use afterwuths the GridColumnStyles it doesn't work:
I got this:
?dbgmulti.TableStyles(0).GridColumnStyles.Item(0).HeaderText
Run-time exception thrown : System.ArgumentOutOfRangeException - Index was
out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Although, when I use something liek this: ?me.TableStyles(0).BackColor this
doesn't throw an exception. When I look to my DataSource on that moment I
see that it does have columns.
I just can't find out why I do have TableStyle, but no GridColumnStyles
although there are Columns in the DataGrid.
Does anybody knwo the reason for this problem and a solution?
Thanks in advance,
Pieter
I'm having an error that I didn't really expected:
I have a DataGrid, to which I added a (empty) TableStyle like this:
dbgMulti.TableStyles.Clear()
Dim tbsTableStyle As New DataGridTableStyle
dbgMulti.TableStyles.Add(tbsTableStyle)
When I Want to use afterwuths the GridColumnStyles it doesn't work:
I got this:
?dbgmulti.TableStyles(0).GridColumnStyles.Item(0).HeaderText
Run-time exception thrown : System.ArgumentOutOfRangeException - Index was
out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Although, when I use something liek this: ?me.TableStyles(0).BackColor this
doesn't throw an exception. When I look to my DataSource on that moment I
see that it does have columns.
I just can't find out why I do have TableStyle, but no GridColumnStyles
although there are Columns in the DataGrid.
Does anybody knwo the reason for this problem and a solution?
Thanks in advance,
Pieter