Click here to Skip to main content
15,884,237 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have one gird .in that two link button i.e Accept ,Reject..
when i click on accept then i want to do reject linkbutton visible false of that perticular row...
not for all row so how can i do???
plz help me..

my code is below:-

C#
LinkButton lb = (LinkButton)e.CommandSource;
       if (e.CommandName.Equals("accept"))
       {
           string[] commandArgs = e.CommandArgument.ToString().Split(new char[] { ',' });
           int profileid = Convert.ToInt32(commandArgs[0]);
           int friendID = Convert.ToInt32(commandArgs[1]);

           SysATGlobal.DB.ExecuteSelectQuery("update DSMailBox.HDR_GROUP set ACCEPT_STATUS=1  where PROFILE_ID='" + profileid + "' and FRIEND_ID='" + friendID + "'",true);
           lb.Text = "Request Accept successfully";
           GrdATDataView.Columns[2].Visible = false;



       }
       else
       {
           string[] commandArgs = e.CommandArgument.ToString().Split(new char[] { ',' });
           int profileid = Convert.ToInt32(commandArgs[0]);
           int friendID = Convert.ToInt32(commandArgs[1]);


            SysATGlobal.DB.ExecuteSelectQuery("update DSMailBox.HDR_GROUP set REJECT_STATUS=1 where PROFILE_ID='" + profileid + "' and FRIEND_ID='" + friendID + "'",true);
            lb.Text = "Request Rejected";
            GrdATDataView.Columns[1].Visible = false;

       }
Posted

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