| | |
How come I can't very my primary key in DataGridView
Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved |
Hello,
I have a DataGridView that displays all the columns in the DataGridView Column from my database.
The problem I am having is that my Row_id column, which is the primary key of the table, will not display the data within the Row_id column.
Is there a way to retrieve the primary key of a record and display it in the DataGridView. Like I said, I have all of the other columns being properly displayed, but just can't seem to get this one.
Here is some other info regrading Row_id.
In SQL Server 2008 I set Identity Specification to "yes" with Identity Increment to "1" and Identity Seed to "1".
I need this primary key in order to do call stored procedures to delete and update.
Thanks a lot in advance.
I have a DataGridView that displays all the columns in the DataGridView Column from my database.
The problem I am having is that my Row_id column, which is the primary key of the table, will not display the data within the Row_id column.
Is there a way to retrieve the primary key of a record and display it in the DataGridView. Like I said, I have all of the other columns being properly displayed, but just can't seem to get this one.
Here is some other info regrading Row_id.
In SQL Server 2008 I set Identity Specification to "yes" with Identity Increment to "1" and Identity Seed to "1".
I need this primary key in order to do call stored procedures to delete and update.
Thanks a lot in advance.
in your select statement are you retrieving that value? if yes verify you have autogeneratecolumns to false you have to create a bound column manually for the primary field and also you can set the visible property to false if you do not want people look at it, in the background you still can reference that column.
If your already resolved your issue, flag it as solved.
José Bisonó
José Bisonó
![]() |
Similar Threads
- change primary key (MS SQL)
- generate unique primary key (MySQL)
- Need HELP IN returning an auto incriment primary key to zero (PHP)
- Need Help Accessing a Primary key MS Access in SQL to print out informatio. (MS Access and FileMaker Pro)
- HELP! Need someone that Knows SQL to tell Me How to Access a Primary Key (C)
- Need to make program access a data base primary key number entered by user (C)
- Primary Key Issue (Visual Basic 4 / 5 / 6)
Other Threads in the C# Forum
- Previous Thread: Testing Excel Option Button C#
- Next Thread: how can i sum the sum of fields in crystal report C#
| Thread Tools | Search this Thread |
.net access algorithm array backup barchart bitmap box broadcast buttons c# check checkbox client combobox control conversion csharp custom database databasesearch datagrid datagridview datagridviewcheckbox dataset datetime degrees development draganddrop drawing dynamiccreation encryption enum equation event excel file form format formatting forms function gdi+ hospitalmanagementsystems httpwebrequest image index input install interface java label list listbox mandelbrot math mouseclick mysql namevaluepairs operator path photoshop picturebox pixelinversion post powerpacks programming property radians regex remote remoting resource restore richtextbox server sleep soap socket sql statistics stream string table text textbox thread time timer update usercontrol validation visualstudio wait webbrowser windows winforms working wpf xml





