I have to develop some custom Columns for the XamGrid and therefore read the doc and this article http://ko.infragistics.com/community/blogs/devin_rader/archive/2010/07/08/creating-custom-columns-for-xamgrid.aspx
i've developed some Columns and added them to the Grid. It worked just fine. But when I add a new Item to the ItemSource from codebehind, the Controls in my custom column moves on to the next row.
I attached a project with a little sample. Maybe i shouldnt return only one control as Editor and Display element? If thats the case could you explain a Little further how to develop editable columns. They should be editable the whole time.
regards and thanks
Hello,
Thank you for your post. I have been looking into it and the sample you have sent us and I modified it, so now it works as you want. Basically I returned the same TextBox in the ResolveEditorControl method, which is the control that appear when you enter in edit mode. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
Thanks for your answer. Unfortunately I have two new problems. Maybe I don't get your concept behind the columns. I've attached the solution:
1. I've added a second button so I can delete Items (I can't use the grid-functionality for several reasons). So now you can select multiple rows and with a click on the button they will be deleted. When I delete all rows at once and add a new Item the custom column will show data of a deleted row. Why is that?
2. I've added a enabled-functionality, which works just fine on the first row. When I add a new row the custom column will be enabled right from the start. I've noticed that while adding a new row the property "_isInitialized" is already on true. So the ContentProvider is the same as in the first row? Also the Binding of the second row seems to bind on the data of the first row (Add multiple rows without changing the enabled-flag -> setting enable-flag on first row will change the flag on another row).
I thought virtualization is the problem. But i subscribed to "CellControlAttached" and set the Dirty-Flag to true. No change in behaviour.
regards.