Click here to Skip to main content
12,449,911 members (45,418 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
plz help me with the gridview ..
i'm having two buttons in my gridview..
so when i click on "approve button" then the "reject button" should get hidden and label with approve data should display..
plz help with the coding....

<asp:TemplateField HeaderText="Status" >

<asp:Button ID="BtnApprove" Text="Approve" runat="server" />
<asp:Label ID="StatusResult" runat="server" Visible="false" />
<asp:Button ID="btnRejct" runat="server" Text="Reject" />
Posted 1-Feb-13 1:38am
Updated 1-Feb-13 1:39am
v2

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Write this code in your button click event
(Button)GridView1.Rows[i].FindControl("Button1").Visible=False;
(Label)GridView1.Rows[i].FindControl("Label1").Visible=True;
It's very easy if you got any doubt ping me I'll sure help you out from this problem.
  Permalink  
Comments
Member 9467059 2-Feb-13 2:50am
   
ganesh i have tryd your coding
but still i'm getting error's with the code..
K. Ganesh Kumar 3-Feb-13 2:40am
   
what above I written is in C# try to write it in your own source code language.
Where Button1, Label1 are the control names it may vary. According to your controls change the names

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 1 Feb 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100