C
C#3mo ago
Elio

Binding error Datagrid WPF

Hi, I'm encountering binding errors when my list is displayed, and I wanted to know how to remove these errors or improve the coding of my datagrid. In summary, my datagrid contains a list of Step objects, which can be either StepSpecial or StepNormal, both inherited from the Step class. My datagrid has five columns, which allow me to display all the properties of StepNormal. If my step is a StepSpecial, I set a new style to display an image. Since StepSpecial does not contain the properties of StepNormal, I assume this is where my binding error is coming from, but I can't figure out how to avoid it. Should i use ItemTemplateSelector="" ? https://paste.mod.gg/rdmreoxservf/0 here is one of the multiple binding errors : System.Windows.Data Error: 40 : BindingExpression path error: 'AV' property not found on 'object' ''ObservableStepSpecial' (HashCode=19469169)'. BindingExpression:Path=AV; DataItem='ObservableStepSpecial' (HashCode=19469169); target element is 'TextBlock' (Name=''); target property is 'Text' (type 'String')
No description
0 Replies
No replies yetBe the first to reply to this messageJoin