It seems the datagrid in windows form is not powerful, even for format. Is
it the only way to create a rich formatting datagrid that using dynamically
created controls in a panel? sounds a lot of work.
Btw, how to capture the insert/delete/update event when using datagrid?
(because I need customized sql statement to access the database.
It does take significant coding to vary cell by cell the fonts and colors
used in the Windows Forms DataGrid. The upcoming VS2005 release has a
DataGridView class that is much easier to use.
Here is a link that shows how you can use a derived column style to vary
things now.
http://www.syncfusion.com/faq/winforms/search/927.asp
To catch the insert/delete/update, you can subscribe to the
CurrencyManager.ListChanged event.
CurrencyManager cm = (CurrencyManager)
this.dataGrid1.BindingCOntext[this.dataGrid1.DataSource,
this.dataGrid1.DataMember];
cm.ListChanged += new ListChangedEventHandler(cm_ListChanged);
=============================
Clay Burch, .NET MVP
Visit www.syncfusion.com for the coolest tools
> It seems the datagrid in windows form is not powerful, even for format. Is
> it the only way to create a rich formatting datagrid that using
> dynamically created controls in a panel? sounds a lot of work.
>
> Btw, how to capture the insert/delete/update event when using datagrid?
> (because I need customized sql statement to access the database.
nick - 18 Sep 2004 23:28 GMT
Thanks, any example? Still not clear to figure out how "insert", "delete" be
triggered by the ListChangedEventHandler....
> It does take significant coding to vary cell by cell the fonts and colors
> used in the Windows Forms DataGrid. The upcoming VS2005 release has a
[quoted text clipped - 23 lines]
>> Btw, how to capture the insert/delete/update event when using datagrid?
>> (because I need customized sql statement to access the database.