I have seen a few posts on specific columns that can be set to always be in edit mode. Is there a way to set a TemplateColumn to always be in edit mode?
Hello Gary,
Do you have any other questions on this matter?
Sincerely,Valerie Developer Support Supervisor - XAMLInfragisticswww.infragistics.com/support
Hi Gary,
If your property is a decimal, it would be displayed as currency because the xamCurrencyEditor is the default decimal editor in the xamDataGrid.
But for the XamGrid, you can define the column as an unbound column and add an ItemTemplate and EditorTemplate, something like this:
<ig:UnboundColumn Key="DecSalary">
<ig:UnboundColumn.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding RowData.DecSalary, StringFormat={}{0:C}}"/>
</DataTemplate>
</ig:UnboundColumn.ItemTemplate>
<ig:UnboundColumn.EditorTemplate >
<DataTemplate >
<ig:XamCurrencyInput Value="{Binding RowData.DecSalary, Mode=TwoWay, UpdateSourceTrigger=Explicit}" />
</ig:UnboundColumn.EditorTemplate>
</ig:UnboundColumn>
Please let me know if this helps.
After looking at the previous link above, I almost have this working with my desired behavior. My last hang up is processing the minus sign when a user types that first. There doesn't seem to be a way to have the XamCurrencyGrid start in "negative" mode when bound to a decimal value. For example, the user types the "0" character and the XamCurrencyGrid will display something like "$___0.00", but typing a "-" the editor will display "$____.__" instead of "$___-.__".
Any thoughts on how to get around this? I dealt with decimal key entries (".") by moving the starting point of the cursor to past the "." in the editor. I could remember the user typed "-" first and then apply that to the next number typed, but the actual display will still be off (it won't show the user typed "-").
I guess what I really need is for the cell to enter edit mode when I start typing on the selected cell. Any thoughts on how to accomplish that?
It seems from this post: http://es.infragistics.com/community/forums/t/52593.aspx that what I am looking to do is not possible?
Hi Marianne, I tried the changes you suggested, and cells do indeed enter edit mode when they are selected. The problem I am running into with this is I drag the mouse over several cells to select them, which keeps the first cell I clicked on in edit mode, then I do a CTRL-V paste operation (I have a paste callback method on the grid) to paste into all selected cells, but since the first selected cell is in edit mode, that cell gets the pasted data instead of my custom paste callback method being called.