DataGrid - New row event???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Douglas Buchanan

    DataGrid - New row event???

    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?
  • smith

    #2
    Re: DataGrid - New row event???

    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


    "Douglas Buchanan" <dbuchanan52@ho tmail.com> wrote in message
    news:7217f9ea.0 411132241.2939d f1a@posting.goo gle.com...[color=blue]
    > 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?[/color]


    Comment

    • Douglas Buchanan

      #3
      Re: DataGrid - New row event???

      Smith,
      [color=blue]
      > Would it be possible for you to work with the source data object
      > events rather than the GUI grid?[/color]
      [color=blue]
      > Maybe the DataTable ColumnChanged event would be worth looking into.[/color]

      Thank you for that tip!

      BTW Thank you. I have downloaded the controls. They look promising.
      Now I have to learn their functionality.

      -- Doug

      "smith" <rcsTAKEOUT@smi thvoiceTAKEOUT. com> wrote in message news:<uTDld.261 16$KJ6.21440@ne wsread1.news.pa s.earthlink.net >...[color=blue]
      > 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
      >
      > "Douglas Buchanan" <dbuchanan52@ho tmail.com> wrote in message
      > news:7217f9ea.0 411132241.2939d f1a@posting.goo gle.com...[color=green]
      > > 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?[/color][/color]

      Comment

      Working...