c# - How can I select a user control by grid row and column number? -


is possible select user control based on grid name, grid row , grid column? toggle checkbox based on row number , column number within grid.

this have :

for( = 1; i<7; i++)  {    (j = 1; j < 33; j++)    {     checkbox = new checkbox();      a.name = "sat_id_" + i.tostring() + "_" + j.tostring();     this.sat_id_grid.children.add(a);     a.style = (style)application.current.findresource("readonlycheckbox");      grid.setrow(a, ); grid.setcolumn(a, j );    } }  

once created, how can reference checkboxes if know name?

use findcontrol(), , don't need cell.

something :

datagridview1.rows[0].findcontrol("name_of_your_user_control") 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -