vb.net - Setting a Datagrid Column to read only during run time -


i have datagrid, not datagridview, wan make column read if radio button checked or not.

so define column dynamically sql query:

dim bool_col new formattableboolcolumn  bool_col.headertext = "bool colunm" bool_col.mappingname = "bool_col" 

also on form 2 radio buttons, lets call them , b.
when checked want set bool_col read true. when b checked want set bool_col read false.

let me know if else needed. i'm using click event can't figure out how find column in datagrid , set read only. spent afternoon trying , searched can think of no luck. , can't change datagridview unfortunately. time , and money constraints on project prohibit this.

thanks in advance!

when create column can add check:

bool_col.readonly = radiobuttona.checked 

so read property of column true if checked , false if not.

now assumes radio buttons in group 1 of 2 can checked @ time.

if radio buttons not in group use:

if radiobuttona.checked bool_col.readonly = true else if radiobuttonb.checked bool_col.readonly = false end if 

Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -