Monday, 15 February 2010

Silverlight Telerik RadCombobox Within RadGridView Binding issue -



Silverlight Telerik RadCombobox Within RadGridView Binding issue -

i'm binding editable (you can type in add together items list of choices) radcombobox in column of radgridview. not throwing binding error, not updating bound property (model.remarks)

here classes

public class notamremarklist : list<string> { public notamremarklist() { add("precision approaches down; higher weather minimums apply."); add("due runway closure, approaches available have higher minimums."); add("all approaches down; weather must vfr."); add("long runway closed; issue if other runways wet."); add("runway shortened; issue if wet."); add("airport closed @ time scheduled in."); add("runway lights inoperative; night flights prohibited."); } } public class notamviewmodel { [datamember] public string newstatus { get; set; } [datamember] public notam model { get; set; } [datamember] public string notamgroup { get; set; } [datamember] public int notamcount { get; set; } [datamember] public datetime? earliestnotamdeparturetime { get; set; } // min_dep_datetime [datamember] public string radiobuttongroupname { get; set; } } public class notam { [datamember] public string remarks { get; set; } [datamember] public string tripnumber { get; set; } [datamember] public string arrivaldeparture { get; set; } }

here's xaml have tried column - first 1 uses cell template, sec attempts in column

<telerik:gridviewdatacolumn header="remarks" isfilterable="false" issortable="false" isreadonly="false" width="430"> <telerik:gridviewdatacolumn.celltemplate> <datatemplate> <telerik:radcombobox selectedvalue="{binding model.remarks, mode=twoway}" itemssource="{staticresource notamremarklist}" iseditable="true"/> </datatemplate> </telerik:gridviewdatacolumn.celltemplate> </telerik:gridviewdatacolumn> <telerik:gridviewcomboboxcolumn selectedvaluememberpath="model.remarks" uniquename="colremarks" iscomboboxeditable="true" isfilterable="false" issortable="false"/>

public class notam:inotifypropertychanged { private string _remarks; [datamember] public string remarks { {return _remarks;} set{ _remarks=value ; if (propertychanged != null) propertychanged(this, new propertychangedeventargs("remarks")); } } [datamember] public string tripnumber { get; set; } [datamember] public string arrivaldeparture { get; set; } public event propertychangedeventhandler propertychanged; } <telerik:radcombobox selectedvalue="{binding model.remarks, mode=twoway}" selectedvaluememberpath="model.remarks" itemssource="{staticresource notamremarklist}" iseditable="true"/>

i hope help.

silverlight telerik

No comments:

Post a Comment