Click here to Skip to main content
15,912,072 members
Please Sign up or sign in to vote.
3.67/5 (3 votes)
See more:
I have a gridvies like this

ASP.NET
<asp:TemplateField HeaderText="EXECUTION DATE">
              <ItemTemplate>
                           <%#Eval("EXECUTIONDATE")%>
             </ItemTemplate>
              </asp:TemplateField>
              
              <asp:TemplateField HeaderText="SLIPNO">
              <ItemTemplate>
                           <%#Eval("SLIPNO")%>
             </ItemTemplate>
              </asp:TemplateField>
              
              <asp:TemplateField HeaderText="ACCOUNTNO">
              <ItemTemplate>
                           <%#Eval("ACCOUNTNO")%>
             </ItemTemplate>
              </asp:TemplateField>


How can i get its cell values on buttton click
Posted
Updated 5-Jan-12 17:09pm
v2
Comments
Karthik Harve 5-Jan-12 23:09pm    
[Edit] pre tags added.

Try using the GridView.SelectedIndex value to point to the selected row.

Then use the GridView1.Rows[SelectedIndex].Cells[1].Text to get the
value inside the cell.
 
Share this answer
 
v2
try this
C#
gvwRequest.Rows[0].Cells[0].Text;

you get first row and first cell value.
 
Share this answer
 
v2
This[^] should help you out.
 
Share this answer
 
v2

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