|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Get Datakey Value from Gridview/sqldatasourceI need to get the unique datakeynames value from a query that is populating
the gridview and detailsview. Example, I have a sqldatasource setup that is using a store procedure. I have the results from it populating a gridview. However, I need the unique id of the datakey to use for other objects on the web page. How do I get that key? Thanks KT You can use the datakey values anywhere in the page. You can do this by
gridview.DataKeys[rowindex].Values["Id"]. Regards RT Show quoteHide quote "KT" <kt***@hotmail.com> wrote in message news:ue8sK2nDHHA.3520@TK2MSFTNGP04.phx.gbl... >I need to get the unique datakeynames value from a query that is populating >the gridview and detailsview. > > Example, I have a sqldatasource setup that is using a store procedure. I > have the results from it populating a gridview. However, I need the > unique id of the datakey to use for other objects on the web page. How do > I get that key? > > Thanks > KT > Thanks. How do you use a return from a function with gridviews,
detailviews, etc. KT Show quoteHide quote "Ranga" <ranga.tiru***@gmail.com> wrote in message news:70EB9A6B-16E7-4DE2-AB62-F20756131BE8@microsoft.com... > You can use the datakey values anywhere in the page. You can do this by > gridview.DataKeys[rowindex].Values["Id"]. > > Regards > > RT > > "KT" <kt***@hotmail.com> wrote in message > news:ue8sK2nDHHA.3520@TK2MSFTNGP04.phx.gbl... >>I need to get the unique datakeynames value from a query that is >>populating the gridview and detailsview. >> >> Example, I have a sqldatasource setup that is using a store procedure. I >> have the results from it populating a gridview. However, I need the >> unique id of the datakey to use for other objects on the web page. How >> do I get that key? >> >> Thanks >> KT >> >
GridView DDL and Label
getting the current page from inside a web control TreeNodePopulate - InvalidCastException zorder problem with menu and combobox Control Position How to render HTML in a textbox? GridView Border Creating a Dynamic Checkbox in a Repeater Checkbox Lists - Retrieving Selected Entry asp:menu only show children |
|||||||||||||||||||||||