Datagrid

G

Geoff Jones

Hi All

What event do I need to capture when a user changes the column width in a
datagrid?

Geoff
 
C

Chris, Master of All Things Insignificant

This is the code that does it. There may be a better way, but I haven't
found it yet (nor have I looked) What I normally do so that I don't have
to do this addhandler all the time is to make a class that inherits from
DataGridColumnStyle.

Dim DGCS As DataGridColumnStyle
DGCS = DataGrid1.TableStyles(0).GridColumnStyles(0)
AddHandler DGCS.WidthChanged, AddressOf ColumnChanged

Hope it helps
Chris
 
G

Geoff Jones

Thanks Chris

Chris said:
This is the code that does it. There may be a better way, but I haven't
found it yet (nor have I looked) What I normally do so that I don't have
to do this addhandler all the time is to make a class that inherits from
DataGridColumnStyle.

Dim DGCS As DataGridColumnStyle
DGCS = DataGrid1.TableStyles(0).GridColumnStyles(0)
AddHandler DGCS.WidthChanged, AddressOf ColumnChanged

Hope it helps
Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top