Welcome Guest Search | Active Topics | Sign In | Register

Grid sizing Options
Phil Morris
Posted: Monday, February 25, 2013 11:07:39 PM
Rank: Advanced Member
Groups: Member

Joined: 6/5/2007
Posts: 35
I find that manually sizing a grid to accommodate exactly the column widths is tedious, and impossible if columns are pro grammatically hidden or made visible. It would be rally nice to have a feature where the grid width adjusts based on events such as hiding a column, or column re-sizing. In the meantime the following does the job (it just has to be called in user code...)

Code: C#
public static void SetGridWidth(EO.Web.Grid grid)
{
	int width = 0;
	for (int index = 0; index < grid.Columns.Count; index++)
	{
		if (grid.Columns[index].Visible)
			width += grid.Columns[index].Width;
	}
	grid.Width = new Unit(width);
}

eo_support
Posted: Tuesday, February 26, 2013 1:13:01 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,072
Thanks for the feedback. We would prefer to let user to handle such logic. :)


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.