473,396 Members | 2,033 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.

Gridview Datakey value

Stu
Hiya,

Im sure this is one of those easy if you know how type
basically i have a dataview and i want to bind it to a gridview
grdResults.DataSource=objDataSet.Tables["results"].DefaultView;
grdResults.DataBind();

However i want to set the key like in the old datagrid so i can access it on
arow by row basis
Ive tried grdResults.DataKeyNames = "idKey" but nothing happens

TIA

Stu
Oct 22 '06 #1
0 1366

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

Similar topics

0
by: mike | last post by:
how can i get datakey value of GridView ??????? protected void BookGridView_RowDataBound(object sender, GridViewRowEventArgs e) { int tableId = int.Parse( BookGridView.DataKeys.ToString() ); ...
1
by: Mark Richards | last post by:
I posted this earlier, and got no response. Basically I need to be able to grab a value from one of the fields in a gridView to populate a dropdown in another column of the gridview: I have a...
5
by: NH | last post by:
How do I find out the row index selected in the gridveiw row command method? I have an imageButton in a gridview cell and its corresponding code in the row command method needs to know the row...
1
by: Steven Blair | last post by:
Here is my problem: I have a GridView with a Select column. Once the user clicks the Select button the following things need to happen. 1. Need to store the DataKey of the selectedindex 2....
1
by: ram_kri | last post by:
Hi Guys, Here is a uncommon scenario that I had to work on.. I have a GridView which is associated to a DataSource. But I have a couple of columns (item-templates while the rest of the columns...
3
by: denvercr | last post by:
Hi how do i possibly get the value of a hidden column (id) of a gridview binded in sqldatasource? i have this code in C# usng GridViewRow and DataKey Classes to retrieve it, I also set the...
7
by: =?Utf-8?B?V2FubmFiZQ==?= | last post by:
Is there a way to use a gridview in a timecard application, and if so, how? I was looking at using a gridview to display a person's hours worked in a week. To do this, many different data records...
2
by: DC | last post by:
Hi, I am using a GridView to present data in a DataTable, which I store only in ViewState and when the user hits the "OK" button the rows in the DataTable will be used to execute transactions. ...
3
by: =?Utf-8?B?V2FubmFiZQ==?= | last post by:
I have a gridview that has a label field and a checkbox field in it. I have the checkbox set to autopost when changed. How can I get the datakey value that is assigned to that row when a checkbox...
6
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have a gridview control with a template column that has a textbox and when the control is bound to the datasource the textbox is filled ok. I then change what is in the textbox in the gridview...
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...
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
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...

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.