How to insert, delete and edit data in a datagrid in runtime

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All

How can I select a particular row in a datagrid.Where when the user double clicks the data in that row should appear in the corresponding text boxes in runtime
And how can the user insert,delete and edit fields in a datagrid at runtime
Please be kind enough to help me

Thanks
Rameshika
 
Hi,
How can I select a particular row in a datagrid.Where when the user
double clicks the data in that row should appear in the corresponding text
boxes in runtime.

You should bind the text boxes to the same datasource and datamember the
datagrid is bound to. The same CurrencyManager instance will then be used to
track the current data row for the grid as well as for the text boxes.
And how can the user insert,delete and edit fields in a datagrid at
runtime.

Not sure what do you mean here. The data grid enables in-place editing, as
well as deleting existing rows and inserting new ones.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Rameshika said:
Hi All,

How can I select a particular row in a datagrid.Where when the user
double clicks the data in that row should appear in the corresponding text
boxes in runtime.
 
Hello

What I meant was If the user needs to insert a record, delete a record and update a record
How should I program this in such a way that this can be done on runtime

Thanks
Rameshika
 
It is still unclear to me though. If the user needs to add a record, s/he
clicks on the row marked with asterisk and starts typing new data. If s/he
needs to edit existing cells, he clicks on a cell and starts editing its
content.

You obviously mean something different, but I still can't get what exatcly.
 
Back
Top