This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
version: 5.1.1515.21376 The exception:
System.InvalidOperationException was unhandled
Message=Child with Name '~ChildID28' not found in VisualTree.
Source=PresentationFramework
StackTrace:
at System.Windows.StyleHelper.UpdateTables(PropertyValue& propertyValue, FrugalStructList TheGrid:
|
|
|
Hello We have not been able to reproduce this issue in anyway. Could you please repost your DataGrid code sample. Put 4 spaces in-front of each line for it to be displayed in the forum code box. A repro project will also help us to solve the issue sooner. Are you using any custom styles/templates? Also, what ItemsSource are you using? IList, ObservableCollection, BindingList, DataTable, etc? Jason Fauchelle |
|
|
public ObservableCollection
|
|
|
Hello Thanks for the code, though we still have not been able to see this exception. What are you doing in the LoadReportHighlightedItemChanged, LoadReportValidateCell and CheckBoxChanged event handlers? Jason Fauchelle |
|
|
|
|
|
Hello Thanks for the code snippet, though this doesn't look to be the cause of the issue. To help find the issue at your end, try to comment out parts of your code that may be causing the issue until you find that it works. For example, remove the check box style so that it uses the default style, or let the data grid use the default editor, and start removing event handlers to see if any of those are the cause of the issue. If you discover more details of what is causing the issue, let us know and we can use this to reproduce and solve the issue. Another option would be to create a simple repro project and send it to us by either attaching it to a forum thread or sending it to jason@mindscape.co.nz |
|
|
Jason, I was able to look at this with Nik. It turned out that the DisplayTemplate and EditTemplate were being created and set in code, but the problem was that they were set to the same instance of a template. After creating two separate instances (although identical), the issue has been resolved. Thanks. |
|
|
Thanks Jared Good to hear this issue has been resolved - or at least worked around. I've put down a note to see why setting the same template instance in code causes issues. (Setting the same instance in xaml works fine). Jason Fauchelle |
|