NicoVB Posted July 3, 2003 Posted July 3, 2003 I have a datagrid filled with data from a database. I want to add a handler to all textboxes in the columns of my datagrid. Dim Textcol As DataGridColumnStyle For Each Textcol In GridEx1.TableStyles("KON").GridColumnStyles AddHandler Textcol.MouseDown, New MouseEventHandler(AddressOf TextBoxMouseDownHandler) AddHandler Textcol.DoubleClick, New EventHandler(AddressOf TextBoxDoubleClickHandler) Next But these code doens't seem to work. How do you do this???? Nico Quote Visit http://www.nico.gotdns.com Now ONLINE!
Mehyar Posted July 3, 2003 Posted July 3, 2003 These won't work because DatagridColumnStyles do not have a MouseDown and a DoubleClick events. You can : Declare a class that inherits DatagridTextBoxColumn and then declare events in this class and handle those events Check this URL it will help you a lot http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp Go to question 5.53 Good Luck Quote Dream as if you'll live forever, live as if you'll die today
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.