Click here to Skip to main content
15,881,715 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a grid view with a column loan status.
loan status by default is awaiting from data base.
i have a one more column with name action. it is a command field with edit (i rename it as 'Authorize/ rejected').
when i click on 'edit' two option is there 'update(i rename it as 'Authorize')' and 'cancel'(i rename it as 'rejected').
i want when i click on update i.e Authorize of any particular row then loan status of that particular row appear as authorize and when i click on cancel i.e rejected the loan status should appear as rejected.
any one please tell me how i should code on cs file to get this?
Posted
Comments
rmksiva 12-Apr-13 3:28am    
Please Tel, Update & Cancel Buttons are inside Grid Or Separate Popup ?

1 solution

//Write On Row Command Method
protected void GriView1OnRowCommand(object sender, GridviewRowEventargs )
{
 if(e.CommandName=="Edit")
 {
   int custid = Convert.toInt32(e.CommandArgument);
   hdnCustID.value = "" + custid;
 } 
}


//Update Button Click Coding
protected void btnUpdate_Click(object sender,EventArgs e)
{
 //Code to Update Loan Status 
  UpdateStatus(hdnCustID.value,"Approve");
} 

protected void btnCancel_Click(object sender,EventArgs e)
{
 //Code to Update Loan Status 
  UpdateStatus(hdnCustID.value,"Reject");
} 
 
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