Click here to Skip to main content
14,635,966 members
Rate this:
Please Sign up or sign in to vote.
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

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

Solution 2

//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");
} 
   

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




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