vb.net - Disable specified checkbox inside the UltraListView based on index -
i having ultralistview
, items checkbox in it. have disable specified checkbox of index
give.
for eg: if provide '0' should first checkbox disabled , if provide '1' second checkbox should disabled.
//code
me.lvunlink.items(o).control.viewsettingslist.checkboxstyle = ultrawinlistview.checkboxstyle.checkbox
i tried above code , disables checkboxes. how can achieve this?
there different approaches solve task. maybe 1 of easiest solutions if using instance of ultralistviewitemcheckboxuielement. example:
ultralistviewitemcheckboxuielement elem = e.element.getdescendant(typeof(ultralistviewitemcheckboxuielement),ultralistview1.items[3]) ultralistviewitemcheckboxuielement; if (elem != null) elem.enabled = false;
if want disable/enable specific item/items using index, should specify context in getdescendant() method
if have questions, feel free write me
Comments
Post a Comment