Hi
Building a hierarchical programmatic grid. The grid is held within a place holder
The grid is added to this placeholder. Here is also some of the code, I believe the code that covers relevant sections of building the grid. The full grid build code is not detailed here though.
The problem is that the grid takes up about 1/3 of the size of the IE browser. What I would like is for it to fill the browser with scrolling bars at the bottom and right. If the browser is expanded or contracted, the grid will resize (client side). Is this possible?
Building a hierarchical programmatic grid. The grid is held within a place holder
<form id="form1" runat="server" method="post">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="ContSelect">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="GridID" />
<telerik:AjaxUpdatedControl ControlID="ContSelect" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="GridID">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="GridID" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<
div
class
=
"contributionTable"
>
<
asp:PlaceHolder
ID
=
"PlaceHolder1"
runat
=
"server"
></
asp:PlaceHolder
>
</
div
>
The grid is added to this placeholder. Here is also some of the code, I believe the code that covers relevant sections of building the grid. The full grid build code is not detailed here though.
The problem is that the grid takes up about 1/3 of the size of the IE browser. What I would like is for it to fill the browser with scrolling bars at the bottom and right. If the browser is expanded or contracted, the grid will resize (client side). Is this possible?
GridID1.ID = "GridID1";
GridID1.DataSource = contributionColumns;
GridID1.MasterTableView.DataKeyNames = new string[] { "TeamId" };
GridID1.Width = Unit.Percentage(98);
GridID1.PageSize = 5;
GridID1.AllowPaging = true;
GridID1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
GridID1.AutoGenerateColumns = false;
GridID1.ShowStatusBar = true;
GridID1.GroupingEnabled = true;
GridID1.ShowGroupPanel = false;
GridID1.ClientSettings.AllowDragToGroup = false;
GridID1.ClientSettings.AllowColumnsReorder = true;
GridID1.MasterTableView.PageSize = 20;
GridID1.MasterTableView.Width = Unit.Percentage(100);
GridID1.ClientSettings.Scrolling.FrozenColumnsCount = 2;
GridID1.ClientSettings.Scrolling.AllowScroll = true;
GridID1.ClientSettings.Resizing.EnableRealTimeResize = true;
salesTeam.DataSource = contributionColumns;
salesTeam.DataKeyNames = new string[] { "SMSId" };
salesTeam.Width = Unit.Percentage(100);
relationFields = new GridRelationFields();
salesTeam.ParentTableRelation.Add(relationFields);
GridID1.MasterTableView.GroupByExpressions.Add(new GridGroupByExpression("TeamFunction group by TeamFunction"));
GridGroupByExpression expression = new GridGroupByExpression();
GridGroupByField groupbyField = new GridGroupByField();
GridID1.MasterTableView.GroupByExpressions.Add(new GridGroupByExpression("SalesTeam group by SalesTeam"));
expression = new GridGroupByExpression();
groupbyField = new GridGroupByField();
boundColumn = new GridBoundColumn();
GridID1.MasterTableView.Columns.Add(boundColumn);
boundColumn.DataField = "SalesPerson";
boundColumn.HeaderText = "Sales person";
boundColumn.Visible = true;
foreach (DataColumn col in contributionColumns.Tables[0].Columns)
{
if (col.Ordinal > 5)
{
boundColumn = new GridBoundColumn();
GridID1.MasterTableView.Columns.Add(boundColumn);
boundColumn.DataField = col.ColumnName;
boundColumn.HeaderText = col.ColumnName;
boundColumn.Visible = true;
}
}
GridID1.DataBind();
this.PlaceHolder1.Controls.Add(GridID1);