Hello, I decided to learn about the proper placement and reading in and out of the datagrid in WFP. I faced a very difficult situation and decided it very badly, in my opinion.
1) I have a connected database, all field names in English. language, and in the submission on datagrid it is necessary that the field names are in Russian.
2) I decided to use var , for example var a = from b in db.clients select new { Имя = b.Name };
3) I immediately remembered that I wouldn’t have fun with var, so I made a method that would make a string from item 2 and set datagrid.itemssource = a ;
4) well, when reading, I ran into an even bigger problem ... I can not read the selected line in the datagridrow class, it tries to get into an anonymous type ... But if I make the var variable, I get the object output.
5) in the end, I use this: dynamic changerow = dataGrid.SelectedValue; during the execution of errors is not caused, but in my opinion it is terrible. I ask you to help me understand how I can correctly bind the data so that I can read and write data in a datagrid without any problems if it is possible without binding in xml . Thank!