Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I want to assign a value to a label inside a grid view based on any of the (two) button click i.e. If a user clicks the "ACCEPT" button, "accepted" should be displayed and if "REJECT" button is clicked,"rejected" should be displayed to the label. The grid view has a column named STATUS and the label and the buttons are placed inside that column.



How can i implement that? Please help me.
Posted
Comments
Anand Kumar Prajapati 16-Sep-13 3:43am    
Is there any postback on button click event?
Chaithannya 16-Sep-13 3:44am    
yes.
Chaithannya 16-Sep-13 3:45am    
I wanted to tell the row status to the user when he logs in the next time. that is what i really wanted.
Anand Kumar Prajapati 16-Sep-13 4:48am    
Though you can set status of label on clicking button via -
jquery or server code.
But if you want it on user's next log in, you must save your acceptance in DB (like a column isAccpted=true/false)

1 solution

Please check for dataGridView_CellEnter or dataGridView_EditingControlShowing event. when ever you click on any cell these event get fires, Once you able to capture these events you can than write your logic where you can change the label
 
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