473,404 Members | 2,137 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,404 software developers and data experts.

INSERT for DataGridView

http://msdn2.microsoft.com/en-us/lib...0f(VS.80).aspx
Can anyone help me with how to use this?

I am not sure whre to place the C# code they specify?

THanks
CM

Apr 3 '07 #1
4 7933
Hello Chris,

please send me your code or describe your needs more detailed

regards

frank
http://msdn2.microsoft.com/en-us/lib...0f(VS.80).aspx Can
anyone help me with how to use this?

I am not sure whre to place the C# code they specify?

THanks
CM

Apr 4 '07 #2
I don't know if sending any code will help. I have a databound grid and I
need to find a way to "insert" a new row in a specified location within that
grid of data. I am not sure if it is even possible with a databound grid but
I am trying.

I saw this link but I do not know how to use it.
THanks

"Frank Werner" wrote:
Hello Chris,

please send me your code or describe your needs more detailed

regards

frank
http://msdn2.microsoft.com/en-us/lib...0f(VS.80).aspx Can
anyone help me with how to use this?

I am not sure whre to place the C# code they specify?

THanks
CM


Apr 4 '07 #3
I tried this and apparently you cannot use when data-bound
scriptDataGridView.Rows.Insert(2, 1);

So, I am in trouble. I may have to redesign the entire project to unbound
mode.

"Frank Werner" wrote:
Hello Chris,

please send me your code or describe your needs more detailed

regards

frank
http://msdn2.microsoft.com/en-us/lib...0f(VS.80).aspx Can
anyone help me with how to use this?

I am not sure whre to place the C# code they specify?

THanks
CM


Apr 4 '07 #4
correct, you cannot insert rows between other rows via the DataGridView.Rows.Insert
method when it is bound.
You should try to insert the row in the datasource, probably the datatable
and revresch the view

eg.

yourDataRow= yourDataTable.NewRow();
yourDataRow["columname"] = "content";
yourDataTable.Rows.Add(yourDataRow);

Hope this helps

regards

Frank
I tried this and apparently you cannot use when data-bound
scriptDataGridView.Rows.Insert(2, 1);

So, I am in trouble. I may have to redesign the entire project to
unbound mode.

"Frank Werner" wrote:
>Hello Chris,

please send me your code or describe your needs more detailed

regards

frank
>>http://msdn2.microsoft.com/en-us/lib...0f(VS.80).aspx Can
anyone help me with how to use this?

I am not sure whre to place the C# code they specify?

THanks
CM

Apr 4 '07 #5

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

Similar topics

0
by: Dave | last post by:
I have a table with 3 fields of which the primary key is a autonumber. I have created my dataadapter, dataset and datagridview using a wizard. However, in the datagrid, the update and delete...
1
by: Dave | last post by:
I have a table with 3 fields of which the primary key is a autonumber. I have created my dataadapter, dataset and datagridview using a wizard. However, in the datagrid, the update and delete...
0
by: None | last post by:
Hi, I'm using DataGridView in my Windows Forms project. I need to know how we can insert an image into the specified cell . I tried with the following code.
2
by: Marc Solé | last post by:
Hello, I want to insert an image to a specific column of a dataGridWiew. I explain what I'm doing: - I define the ColumnType as a DataGridViewImageColumn. - I select the image (an icon of...
4
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
how do you insert a new row to a databound datagridview? It won't allow this action.
4
by: =?Utf-8?B?UmljaA==?= | last post by:
On a form - I have a datagridview which is docked to the entire form. The datagridview allows users to Delete and/or Add Rows. On the Form_Load event I Fill the datagridview source table with a...
0
by: Andrus | last post by:
I tried to edit data in DataGridView. Insert and delete operations in grid are not saved to database. Updating works OK. How to force grid to save Insert and Delete operations also ? Andrus....
0
by: KA NMC | last post by:
I have a table and a view. My view pulls all new items which needs to be updated and my table has all the new items that already has been updated. What I'm trying to do in a windows application...
0
by: dcollier9 | last post by:
Hi ! I need to embed a text box in a footer of a GridView's boundfield column to get data prior to a row insert. The textbox is usable and showing up in the web page source using View
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.