We have an issue where users' columns are disappearing when they drag/resize them too close together.
Obviously, if we set a minimum width for every column in every grid in the application or bind the columns to a control template it can be controlled, but is there a setting at the xamGrid level that will prevent this from happening?
Thanks,
David
Hello David,The ColumnResizing event is fired before the column is resized. The event could be canceled if the Width is smaller than a certain value. This will be applied for all column in the grid.private void xamGrid1_ColumnResizing(object sender, Infragistics.Controls.Grids.CancellableColumnResizingEventArgs e) { if (e.Width < 100) e.Cancel = true; }Please do not hesitate to let me know if you have any other questions or concerns.
Hi Maria,
Thanks for your response. Unfortunately this does not address the issue for two reasons:
The solution I require is so that when the user is reducing the column width, it will stop before the column completely disappears. Setting a minimum width on each individual column in the xaml will work for this, but it would be too labor intensive as we have many grids containing multiple columns.
Hello David,Thank you for sharing this approach. It will be helpful for other community members.Please feel free to ask if you have any other questions.
Hi Maria (again),
I believe if I combine the resolution in the thread I referenced above (which only works for AutoGenerated Columns) with yours it presents a viable solution:
private void XamGrid_OnColumnResizing(object sender, CancellableColumnResizingEventArgs e)
{ (e.Columns[0] as Column).MinimumWidth = 10; }
Looks like this issue was covered in this thread:
http://ko.infragistics.com/community/forums/t/86623.aspx
I will discuss this as a possible solution.