Imitating a Webform in a Winform

G

Guest

Hi;

Can you add a column of button controls to a winform datagrid ?

I have a form with three independant grids.

I would like to add buttons i.e. update, add buttons at the end of each row.

Is this possible in a WINFORM in vb.net 2003 ?

I wish that i could use a Webform but I can't access IIS.

Thanks
 
S

Steven Nagy

yes you can do this. In fact you can use any control in VS as a control
in your data grid.
this is quite common, although most examples will show you how to use a
date time picker in a data grid. By default a datagrid supports textbox
and checkbox controls, but you can inherit from a specific column class
and create your own quite easily.

I just can't remember what that class is! I'm sure a good google will
find you answers... I have to go home now though
 
G

Guest

Are you sure about this in a Windows form, using VS 2003 ? I know that you
can use a dataviewgrid control in the new version of VS and it has a lot more
programmable features.



I
 
S

Steven Nagy

Are you sure about this in a Windows form, using VS 2003 ?

Yes I am sure. I have not moved to VS2005 yet and have implemented more
than a few applications that use many different controls from buttons
to drop down lists and more in a datagrid.

And there are other options also besides using buttons. You could add a
context menu that offered 3 menu options (Add, Edit, Delete). You can
be much more creative in win forms. Perhaps you could have the whole
row automatically editable on a mouse over and then have the row
automatically save when the mouse leaves that particular row.

This is what a quick google for "C# datagrid column button" revealed:
http://www.xmlfox.com/CSsamples.htm#6

That has EXACTLY what you want to do.
 

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