Click here to Skip to main content
15,908,907 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ASP.NET
<asp:BoundField DataField="ItemNbr" HeaderText="Item Number" ReadOnly="true" Visible="false"/>

my aspx page is as above
may i retrieve its value to textbox on EDIT command of gridview..
plz Help.
Posted
Updated 6-Sep-11 2:07am
v2

1 solution

Marking the field as Visible=False, this wont render in your web page and there is no need to use it as BoundField. Why you are not using ItemNumber as DataKeys and access them as
gv.DataKeys[e.SelectedIndex].Values["ItemNbr"];

For more details,
Code Project - Frequently Asked Questions Series 1: The ASP.Net GridView[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900