wpf - Shared DataGridColumn Widths Across Multiple DataGrids -
I'm making multiple datagrads in one application with the same set of columns and bindings I'm hoping to do Yes, all datagrid responds appropriately for a change in a datagreat. If I change the size of a column then the second DG should have the same width in the respective column. This is similar to this question on the SO. In addition to the grid (grid), I was hoping that DataGrid would have a property similar to the grid-like IsSharedSize but it does not seem like this.
Is there any property which I am trying to achieve, which I can do, or some alternative approach? Although before offering this proposal to anyone, I can not merge them all into a datagreat, which I am trying to mean, that means I can not put all the information into a datagreat due to the nature of the application.
While shared width is not possible in Create binding between source DataGrid \
/ out> The best way to handle the scenarios is.
DataGrid column and target
DataGrid column width. In my case I have two targets
DataGrid's (dgTarget1 and dgTarget2), so here's the code:
for
(index = 0; index & lt; dgSource .Columns .count; index ++) {binding binding = new binding (); Binding Width.Mode = BindingMode.TwoWay; Binding. Source = DGSORS Column [index]; Binding Width.Path = New Property Path (DataGrid column .withproperty); Binding operation .Setbing (DGT arget1.column [index], DataGrid columnWithProperty, Binding Wide); Binding operation .Setbing (DGT arget2.column [index], DataGrid columnWithProperty, Binding Wide); }
Comments
Post a Comment