Home > Net >  Datagrid on WPF, custom templates column, the problem of unable to edit.
Datagrid on WPF, custom templates column, the problem of unable to edit.

Time:04-09

Now make a list of the datagrid with the template column, the column is divided into three separated with horizontal textbox, equivalent to merge cells,




<50 * RowDefinition Height=""/& gt;
<50 * RowDefinition Height=""/& gt;
<50 * RowDefinition Height=""/& gt;







Run after the other cells can double-click to edit, but this merger template, selected chosen is the whole cell, unable to select one of the textbox, cannot edit content textbox

Ask how to realize the editor and individually chosen,

CodePudding user response:

Please replace TextBlock with TextBox!

CodePudding user response:

Double click to edit after into a textbox, but the background how to access to edit the data? The background how the assignment? How to distinguish between what is for which a textbox assignment?

CodePudding user response:

You do not two-way binding? ZQDGL14 Baifenbi1, ZQDGL14 Baifenbi2, ZQDGL14. Baifenbi3 is the value of the TextBox

CodePudding user response:

I use the CellEditEnding event, modified to see here three values in the entity, without any change,
  •  Tags:  
  • C#
  • Related