473,396 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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
Nov 15 '05 #1
3 2444
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" <an*******@discussions.microsoft.com> wrote in message
news:F6**********************************@microsof t.com... 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


Nov 15 '05 #2
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
Nov 15 '05 #3
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.

--
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" <an*******@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
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


Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Christopher | last post by:
I AM GETTING A SYSTEM.DATA.SQLCLIENT.SQLEXCEPTION ERROR WHEN ATTEMPTING TO INSERT DATA INTO A SINGLE TABLE THROUGH A GRID //If this is due to a spelling error, i will //inflict a ritual...
3
by: Ryan Liu | last post by:
Hi there, I got a NullReferenceException when delete last row in a datagrid. I had hard time to solve since it does not occur in my own code. I put a datagrid in my inherited user control,...
1
by: simon | last post by:
In dataGrid you have UPDATE,DELETE and EDIT command. What about INSERT command? I need somehow also to insert new data, but I don't want to create a new page for that. I would like something...
2
by: Mark | last post by:
I have a repetitive task where I need to edit a table in SQL Server through a web page. Nothing fancy, just populate a datagrid and use the commands Insert/Update/Delete/Cancel. Is there a...
4
by: DrData | last post by:
I'm working on an ASP.Net application written in C#. On one page, there are several datagrid controls used to display, edit and delete detail records relating to the master record also displayed on...
0
by: Suzanne | last post by:
I'd like to know how can I put up a confirmation question when the user tries to delete a row in the datagrid by clicking on the row header and pressing the Delete key? I have found this code on...
1
by: Ganesh | last post by:
Hi There, I use detailView to edit, insert and delete data. It gets value from datagrid.selectedvalue. How can i insert a record initially. If there is not any record in the grid, still i would...
0
by: Michael | last post by:
I know I am missing something simple, but I am stuck. When I submit the following for the employee info gets stored in scale1 and scale1 shows the employee number. Can someone show me my...
0
by: bgreer5050 | last post by:
I know I am missing something simple, but I am stuck. When I submit the following for the employee info gets stored in scale1 and scale1 shows the employee number. Can someone show me my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.