wpf - Find Editor inside Active cell (XamDataGrid) infragistics -
how find cellvaluepresenter based on activerecord or activecell in infragistics xamdatagrid?
i tried below code giving null in cell value presenter.
private void grdgrid_recordactivated(object sender,recordactivatedeventargs e) { (grdgrid.activerecord datarecord).cells["flddescription"].isactive = true; cell selectedcell = grdgrid.activecell; cellvaluepresenter cvp = cellvaluepresenter.fromcell(selectedcell); cvp.editor.starteditmode(); }
this binding
<igdp:unboundfield name="flddescription" label="description" bindingpath="taskitemaction.description" bindingmode="twoway"> <igdp:field.settings> <igdp:fieldsettings cellclickaction="entereditmodeifallowed" editorstyle="{staticresource textstylekey}" editortype="{x:type editors:xamtexteditor}" editastype="{x:type sys:string}" cellwidth="30" cellheight="30" allowedit="true" width="0.4*" height="30" > </igdp:fieldsettings> </igdp:field.settings>
so want find activated record event , find editor type , start edit mode.
private void grdtaskitemaction_recordactivated(object sender, recordactivatedeventargs e) { grdgrid.executecommand(datapresentercommands.starteditmode); }
is working fine me calling edit mode cell not editor(control inside it).
i want find editor inside activated cell , make start editable type.
you can directly cell using activerecord.
private void grdgrid_recordactivated(object sender, infragistics.windows.datapresenter.events.recordactivatedeventargs e) { cell selectedcell = (grdgrid.activerecord datarecord).cells["flddescription"]; cellvaluepresenter cvp = cellvaluepresenter.fromcell(selectedcell); cvp.editor.starteditmode(); }
Comments
Post a Comment