Home  |  Index  |  Dotnet4all Snippets  |  Submit resources
About  |  Mail us  
Dotnet4all Logo

  Help with Datagrid events please. (Thursday, December 23, 2004)




Found the following interesting discussion in the Newsgroups:

Help with Datagrid events please.
by:Lars Netzel

I have a datagrid, datasource is a dataset that contains no items... I place
the cursor in the first cell in the datagrid and start typing values.. after
I have filled in all the "mandatory" fields a new row is created in the
bottom of the grid (with a * character as the rowheader).... I need to
capture that Event when that happens so I can do other stuff depending on
the info I just entered on the first row, but I need to know that that row
is okay first.

I tried Datasource Changed but that did'nt give anything!

Besr regards/
Lars Netzel


 Reply:
by:Ken Tucker [MVP]

 Hi,

Maybe this will help.
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q823q

Ken


 Reply:
by:Lars Netzel

 Thankx but no, not really, it did'nt help me.

I need to capture a RowChange (or datasource row change) and what I need in
that Event is info from the row I came from!

/Lars


 Reply:
by:Cor Ligthert

 Hi Lars,

When that * appears the data is written in the dataset or better in the
datatable.

Did you already look if the datatable events can do something for you.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDataDataTableEventsTopic.asp

If you want it before that you will need the datagrid currentcell changes a
problem however I thought that did not fire when you acknowledge the row and
the * appears.

This is a known problem you often see in this newsgroup, when you go
searching for it watch especially for messages/answers from CJ Taylor who
often talks about this problem as well, there seems even to be even a
difference with this between dotnet 1.0 and dotnet 1.1

I hope this helps anyhow?

Cor








0 Comments:

Post a Comment

 
Previous Posts
    - Quotes within a text string
    - Set the default "initial" value of a ComboBox
    - Re: Restrict keys in textbox w/o KeyAscii?
    - Returning values FROM window form
    - Make multithreading do only X threads at a time.
    - Is it possible to execute an iSeries program from ...
    - Datagrid columns
    - XML?, INI File?, How do I do this?
    - character selection in a string
    - Split function not working.....

Archives
    - 10/03/2004 - 10/10/2004
    - 10/10/2004 - 10/17/2004
    - 10/17/2004 - 10/24/2004
    - 10/24/2004 - 10/31/2004
    - 10/31/2004 - 11/07/2004
    - 11/21/2004 - 11/28/2004
    - 11/28/2004 - 12/05/2004
    - 12/05/2004 - 12/12/2004
    - 12/12/2004 - 12/19/2004
    - 12/19/2004 - 12/26/2004
    - 12/26/2004 - 01/02/2005
    - 01/23/2005 - 01/30/2005
    - 01/01/2006 - 01/08/2006
    - 09/24/2006 - 10/01/2006

Disclaimer & Terms of Use  | DotNet4All.Com concept & © 2004 - 2007 by  Zelders²  - Holland