473,569 Members | 2,459 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 7939
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
scriptDataGridV iew.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.Ro ws.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.N ewRow();
yourDataRow["columname"] = "content";
yourDataTable.R ows.Add(yourDat aRow);

Hope this helps

regards

Frank
I tried this and apparently you cannot use when data-bound
scriptDataGridV iew.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
2113
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 operation work but the Insert will not work. I know I to make changes to code but it does not seem to work. portion of the error reads: The following...
1
6933
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 operation work but the Insert will not work. I know I to make changes to code but it does not seem to work. portion of the error reads: The following...
0
2384
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
16653
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 open folder). When I accept, in the design form, appears in the ImageColumn the typical red cross of an image not found.
4
39745
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
4846
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 sql DataAdapter (da) da.SelectCommand.CommandText = "Select * from Servertbl1" da.Fill(ds, "tbl1") so far, so good. If I add a row to the...
0
2118
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. Northwind db = CreateDB(); var list = new BindingList<Customer>(db.GetTable<Customer>().ToList() );
0
1640
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 is: Pull all the new items from the view and place them into a datagridview (which is already done). Then have a user update those items and then on...
0
3011
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
7618
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8132
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7678
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5222
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3656
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.