windows - How to color a row in a datagrid if a checkbox is clicked? -


i have datagridview, , fill way:

datagridviewrow^ row = gcnew datagridviewrow;          datagridviewcheckboxcell^ cbox = gcnew datagridviewcheckbox;//datagridviewcheckboxcell();         row->cells->add( cbox );         cbox->value = false;         cbox->readonly = false;          datagridviewtextboxcell^ pname = gcnew datagridviewtextboxcell();         row->cells->add( pname );         pname->value = strpackagename;         pname->readonly = true;          datagridviewtextboxcell^ appv = gcnew datagridviewtextboxcell();         row->cells->add( appv );         appv->value = strappvendor;         appv->readonly = true;          datagridviewtextboxcell^ appn = gcnew datagridviewtextboxcell();         row->cells->add( appn );         appn->value = strappname;         appn->readonly = true;  datagridview1->rows->add( row ); 

i want following. if click checkbox, want change rows color. unfortunately didn't find corresponding event of datagrid, because every event has problem. tell me event should use, or how should this?

thanks!

i hope work.

  if (cbox->checked)   {       pname->backcolor = color::red;       appv->backcolor = color::red;       appn->backcolor = color::red;    } 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -