Hi there
I got a problem with the attached sample. I use the grid for some kind of a master/detail view. And for this set the property IsSynchronizedWithCurrentItem to 'true' and bind the detail controls with the "/" operator to the actual position. Everything is working as expected.
But when the AddNewRecord gets focused, the detail controls get emptied and if the user puts any value in those, this values will be lost after the grid synchronizes to an actual position.
So i made a converter, which can disable the controls, when the AddNewRow of the grid is focused. (Actually, it just return false/true, when the databound value is null--> DataBinding is not 'correct'.) I see this more as a workaround.. But, when i add an item to the bound list from code behind, the converter is not really doing what it was created for, because the detail-controls which has null in the bound properties, only getting enabled, when the user puts something in the corresponding grid cells.)
So, is there any good solution to this scenario? Or is it just impossible to have it like this?
Kind regards
Hello,
Thank you for contacting Infragistics. It is expected that the XamDataGrid loses it's active and selected item when you click the AddNewRecord or Filter Record. Because they are both still derive from Record base that contain the same principles of normal DataRecords. It's best to persist the record selected when you click the AddNewRecord and toggle IsSynchronizationWithCurrentItem accordingly.
I've modified your sample, please click the record selector to the left of the cells and then click the AddNewRecord. You will see that I am keeping the current item selected in the EditModeStarting event.
I recommend submitting a new product idea for better handling with the AddNewRecord/Filter record interaction. Let me know if you have any questions.
Hi Michael
Thank you for your effort and input. But your modification to my project does not change the problematic behavior, when a user clicks on the AddNewRecord (the bound fields on the bottom are still emptied out). Actually i can't see any changed behavior at all for the user. Your added events are handled, but no changes for the UI.
But thanks for your help. As it seems i have to find another solution to this problem.
Regards
Thank you for following up. I've found no viable solution. The record selection is cleared, by design of the control, when either the filter record or add new record is in edit mode. I recommend submitting a new product idea to persist selection when editing these areas of the grid.
You can suggest new product ideas for future versions (or vote for existing ones) at <http://ideas.infragistics.com>.
There are many benefits to submitting a product idea:
Direct communication with our product management team regarding your product idea.Notifications whenever new information regarding your idea becomes available.Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.Allow you to shape the future of our products by requesting new controls and products altogether.You and other developers can discuss existing product ideas with members of our Product Management team.
Steps to create your idea:
1. Log into the Infragistics Product Idea site at http://ideas.infragistics.com (creating a new login if needed).
2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)
3. Add your product idea and be sure to be specific and provide as much detail as possible.
- Explain the context in which a feature would be used, why it is needed, why it can't be accomplished today, and who would benefit from it. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. Be convincing!
- Include a link to this thread in your idea so product management will be able to look back at this case.
The Product Idea site puts you in the driver's seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Sincerely,
Michael Di FilippoDeveloper Support EngineerInfragistics, Inc.www.infragistics.com/support
For a workaround, we decided to remove the AddNewRow and let the user add items thru another option.. but now we got the same problem with the FilterRow.. and we cannot just remove this, because the user needs the filter... this is really starting to get annoying..