Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Visit http://www.nico.gotdns.com

 

Now ONLINE!

Posted

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

Dream as if you'll live forever, live as if you'll die today

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...