vb.net - ComboBox Render in DotNetBar SuperDataGrid -
i want render column in dotnetbar superdatagrid controll combobox (more exactly gridcomboboxexeditcontrol
) . superdatagrid
connected binding source. in databindingcomplete
event have following:
private sub supergrid_databindingcomplete(byval sender object, byval e devcomponents.dotnetbar.supergrid.griddatabindingcompleteeventargs) handles supergrid.databindingcomplete dim panel devcomponents.dotnetbar.supergrid.gridpanel panel = e.gridpanel panel.columns("articleid").rendertype = gettype(mycombobox) panel.columns("articleid").renderparams = new object() {articlebindingsource, "article", "article"} end sub
and mycombobox class goes:
public class mycombobox inherits gridcomboboxexeditcontrol public sub new(byval bind bindingsource, byval disp string, byval val string) datasource = bind displaymember = disp valuemember = val end sub end class
this results in the following: superdatagrid shows right values in cells. binding right , every value of "articleid" if rendered "article". problem when value shifts articleid = 1 articleid = 2
(article = "article no1" article = "artcle no2") superdatagrid goes in form of endless loop , value start shifting between 1 , 2. doing wrong? if can offer advice on subject grateful. p.s. tried this:
panel.columns("articleid").editortype = gettype(gridcomboboxexeditcontrol) dim fine art gridcomboboxexeditcontrol = directcast(panel.columns("articleid").editcontrol, gridcomboboxexeditcontrol) art.datasource = articlebindingsource art.displaymember = "article" art.valuemember = "articleid"
got same result.
{articlebindingsource, "article", "articleid"} think incorect when same value displaymember, valuemember
vb.net datagrid combobox render dotnetbar
No comments:
Post a Comment