DataGrid - New row event???

  • Thread starter Thread starter Douglas Buchanan
  • Start date Start date
D

Douglas Buchanan

Some say there is no new row event for the VB.Net DataGrid. Hard to
believe! Is that really true?

I want to create a GUID in a hidden ID column when the user begins to
enter data into a new row.

The only way around I can think of is to test if the ID column is null
any time a cells in a row is being edited, but it seems like the wrong
way about it to perform that test for any edit in any row.

Any suggestions?
 
Since it'a datagrid can we assume that it's bound to a datatable (or
dataset?). Would it be possible for you to work with the source data object
events rather than the GUI grid? Maybe the DataTable ColumnChanged event
would be worth looking into.


Just as a tip, take it as you will, the datagrid and flexgrid controls that
ship with Visual Studio are really freeware and crippled versions of the
ComponentOne TrueDBGridPro and FlexGrid Pro (as is the print preview
control). Once you move to the full versions you get a heck of a lot more
power.

Personally, many many years ago I used TrueDBGrid (then from APEX) but then
I discovered FlexGridPro from Videosoft and once it supported databinding I
never found a significant reason to go back. A few years ago APEX and
Videosoft merged and became ComponentOne. Both of these fine grids now are
part of the ComponentOne Studio Suite.

Here's the thing: http://msdn.microsoft.com/vbasic/vbrkit/default.aspx

If you don't have this important free download from Microsoft (which gives
you distribution rights to these controls), you should get it before they
take it away because it gives you the real, full TrueDBGrid and, even
better, FlexGrid Pro .. no more limitations and no more silly DataGrid
hacks.

Robert Smith
Kirkland, WA
www.smithvoice.com
 
Back
Top