I would like for the entire xamgrid to be in Edit Mode all the time or at least appear to be. When I put input controls such as combo boxes and textboxes in the ItemTemplate, they don't stretch horizontally, so the ItemTemplate/EditTemplate don't look the same - which I need them to. I would be happy either setting the whole grid in Edit Mode or making it so the ItemTemplate looks exactly the same as the Edit Template.
thanks
-greg
I guess what I need is for the whole thing to be in edit mode and not use ItemTemplate/EditTemplate. Is that possible?
Hi,
The xamGrid only has the concept of one row being in edit mode at any given point in time.
If you wan't the entire xamGrid to be editable, then you're going to have to modify the display elements, i.e. the ItemTemplate of all of your columns to be your editors. (Note then the xamGrid's editing events won't fire.)
To make them look like they do when in edit mode, you have to do 2 things.
1. Set the HorizontalAlignmentProperty to stretch. <ig:TemplateColumn Key="Title" HorizontalContentAlignment="Stretch">
2. Remove the Padding from the CellStyle
<Style TargetType="ig:CellControl">
<Setter Property="Padding" Value="0"/>
</Style>
Hope this helps,
-SteveZ
Eventually we will need to put any arbitrary control, such as Custom, AutoCompleteBox, etc. into the Grid and have them be active on the first click, not one click to activate the row and one click to activate the control. I hope that makes sense.
Yes, that would work, I think, as long as it solves the problem of having to click a ComboBox (or any other control) twice to make it activate ( in the case of a ComboBox, that means dropping down). As stated in my last post, this happens in a TemplateColumn, which I understand the reasoning for, but also in a ComboBoxColumn, which does not make sense.
Hi Greg,
Thanks for the feedback,
That actually sounds like a new feature we're looking at adding for v.Next. Where on a given column, you'll be able to set whether or not it always displays its editor, or only when it's put into edit mode.
Is this the kind behavior you're looking for?
Hi Steve,
That does in fact help, to some degree. Ultimately I'll probably need the whole grid in edit mode, even with the addition of the new ComboBoxColumn, as I'll need to put custom controls into fields that will need to be active on the first click. ComboBoxes, whether in a TemplateColumn or in a ComboBoxColumn need to be clicked twice to activate if you are clicking on a row that is not in Edit mode, which seems very counter intuitive in my case, where the whole thing looks editable. It's too bad because I like the new AddRowTemplate and the other features of the grid, but maybe I'm trying to fit a square peg into a round hole.
thanks,