Hi,
Is there any way to achieve such behavior on XamDataGrid(vol 10.3):
If user resizes the colum, all columns widths to the left are staying as before resizing and columns to the right are resized.
If user resizes the window which hosts the grid - all columns are resized proportionally.
Thanks.
HI Dierk,
You could wire up the XamDataGrid's FieldLayout's PropertyChanged event. In this event you could
modify other fields widths.
Here is some sample code:
xamgrid1.FieldLayoutInitializing += new EventHandler<Infragistics.Windows.DataPresenter.Events.FieldLayoutInitializingEventArgs>(xamgrid1_FieldLayoutInitializing); void MainWindow_PropertyChanged(object sender, PropertyChangedEventArgs e) { //throw new NotImplementedException(); // MessageBox.Show(e.PropertyName); if (e.PropertyName == "CellWidthResolved") { foreach (Field f in xamgrid1.FieldLayouts[0].Fields) { if (f.Name != "Kids") { xamgrid1.FieldLayouts[1].Fields[f.Name].Settings.LabelWidth = f.LabelWidthResolved; xamgrid1.FieldLayouts[1].Fields[f.Name].Settings.CellWidth = f.CellWidthResolved; } } // xamgrid1.FieldLayouts[0].Fields[0].Width } }
Sincerely, MattDeveloper Support Engineer
How do I know which field was resized? After I resize one column sometimes every single field rises event and simetimes only field which was resized...
Any comments on the issue? thanks
HI,
As far as scrollbars appearing ,
there is no event. the grid contains a recordlistcontrol. that recordlistcontrol has a scrollviewer in its template. its really up to that element to decide when scrollbars show. it does this based on its ScrollbarVisibility properties. for the root recordlistcontrol those properties are based on the (Horizontal|Vertical)ScrollbarVisibility properties of the View. in the case of the GridView, those default to Auto. the ScrollViewer does 1 or more measures of its content during the measure pass updating its Computed(H|V)ScrollBarVisibility properties. those properties are used by the scrollbar's in the scrollviewer's template to determine their visibility. that's just how scrollviewers work. there is no simple event or anything since typically you don't care.
Sincerely, Matt
Matt,
Thanks for follow.
Here is what we have: to implement what we're looking for you suggested an approach which - as it stands - unfortunately would not work, as features would be missing to properly implement that approach.
What other suggestions would you have to resolve the issue?
Thanks
We're still stuck on that issue. What steps would you suggest to resolve it?
We're still stuck here. Infragistics support... anybody there?