如何在infragistics xamdatagrid中找到基于ActiveRecord或ActiveCell的cellvaluepresenter?在Active cell(XamDataGrid)中查找编辑器infragistics
我尝试了下面的代码,但它在单元格值演示器中给null。
private void grdGrid_RecordActivated(object sender,RecordActivatedEventArgs e)
{
(grdGrid.ActiveRecord as DataRecord).Cells["fldDescription"].IsActive = true;
Cell selectedCell = grdGrid.ActiveCell;
CellValuePresenter cvp = CellValuePresenter.FromCell(selectedCell);
cvp.Editor.StartEditMode();
}
这是结合
<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>
所以现在我想通过该事件找到激活记录,找到编辑类型并启动编辑模式。
private void GrdTaskItemAction_RecordActivated(object sender, RecordActivatedEventArgs e)
{
grdGrid.ExecuteCommand(DataPresenterCommands.StartEditMode);
}
对我来说工作正常,但它调用单元格编辑模式而不是编辑器(内部控件)。
我想在激活的单元格中找到该编辑器并使其开始可编辑类型。
u能张贴代码复制乌尔问题。像数据模型,结合等。 –
对不起,我改变了我的问题bcoz突然我注意到我我以前不使用cellvaluepresenter我上面mentiod绑定设置\ – Saurabhchauhan232