silverlight - Access Control within RowDetailsTemplate on SelectionChange of ComboBox -
i want access checkbox in order change it's enable/disable in selectionchange event of combobox. both controls in rowdetailstemplate example:
<grid x:name="layoutroot" background="white"> <sdk:datagrid autogeneratecolumns="false" > <sdk:datagrid.columns> <sdk:datagridtextcolumn visibility="collapsed"> </sdk:datagridtextcolumn> </sdk:datagrid.columns> <sdk:datagrid.rowdetailstemplate> <datatemplate> <stackpanel> <sdk:datagrid width="auto" flowdirection="righttoleft"> <sdk:datagrid.columns> <sdk:datagridtemplatecolumn > <sdk:datagridtemplatecolumn.celltemplate> <datatemplate> <combobox name="cbaction" selectionchanged="cbaction_selectionchanged" /> </datatemplate> </sdk:datagridtemplatecolumn.celltemplate> </sdk:datagridtemplatecolumn> <sdk:datagridtemplatecolumn > <sdk:datagridtemplatecolumn.celltemplate> <datatemplate > <stackpanel orientation="horizontal" verticalalignment="center"> <checkbox name="cbchaluka" width="30" verticalalignment="center" horizontalalignment="center" isenabled="false" ischecked="{binding _logi_got,mode=twoway}" flowdirection="lefttoright"> </checkbox> </stackpanel> </datatemplate> </sdk:datagridtemplatecolumn.celltemplate> </sdk:datagridtemplatecolumn> </sdk:datagrid.columns> </sdk:datagrid> </stackpanel> </datatemplate> </sdk:datagrid.rowdetailstemplate> </sdk:datagrid> </grid>
this important!!!!
small example...
private checkbox cbchaluka = null; private void datagridname_loadingrowdetails(object sender, datagridrowdetailseventargs e) { cbchaluka = e.detailselement.findname("cbchaluka"); }
then on selectionchange event on other control can reference cbchaluka.
Comments
Post a Comment