<
GroupHeaderItemStyle Height="10px" />
and none of it works. my code is pasted below, would you please help me to shrink the header? my code is pasted following| <telerik:RadGrid ID="AppointmentList" runat="server" Width="600px" |
| Skin="Hay" GridLines="None" AutoGenerateColumns="False" AllowPaging="True" |
| PageSize="15" |
| OnItemDataBound="Appointment_ItemDataBound" CellPadding="0" > |
| <MasterTableView Width="100%" GroupLoadMode="Client"> |
| <GroupByExpressions> |
| <telerik:GridGroupByExpression> |
| <SelectFields> |
| <telerik:GridGroupByField FieldAlias="RequestDate" FieldName="RequestDate" HeaderText="Date" FormatString="{0:d}" HeaderValueSeparator=" " /> |
| </SelectFields> |
| <GroupByFields> |
| <telerik:GridGroupByField FieldAlias="RequestDate" FieldName="RequestDate" HeaderText=" " HeaderValueSeparator=" " /> |
| </GroupByFields> |
| </telerik:GridGroupByExpression> |
| </GroupByExpressions> |
| <Columns> |
| <telerik:GridTemplateColumn HeaderText="Name" Groupable="false" UniqueName="Title"> |
| <ItemTemplate> |
| <div> |
| <asp:HyperLink ID="HlinkSubject" runat="server"><%# Eval("Name") %></asp:HyperLink> |
| <span style="font-style:italic; display:block">Symptom: <%# Eval("SymptomList") %></span> |
| </div> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridBoundColumn HeaderText="Reason" DataField="Reason"></telerik:GridBoundColumn> |
| </Columns> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| </MasterTableView> |
| </telerik:RadGrid> |

If e.CommandName = "Files" Then
e.Item.OwnerTableView.DetailTables(0).Visible =
False
e.Item.OwnerTableView.DetailTables(1).Visible =
True
End If
If e.CommandName = "Comments" Then
e.Item.OwnerTableView.DetailTables(0).Visible =
True
e.Item.OwnerTableView.DetailTables(1).Visible =
False
End If
But this does not change the visibilty of the nested tables.
How can I show the nested table dependant on which linkbutton is clicked?
Hi,
I build a GridTableView programmatically and add this GridTableView
to the collection of detail table views for the RadGrid to display
related data tables hierarchically. But when I click the expand button
and the edit command button, I got an exception,
Sys.WebForms.PageRequestManagerServerErrorException
My code as follows:
if (!this.IsPostBack)
{
// Get related data tables: Customers table and Projects table
DataTable dtblCust = Datahandler.Datahandler.GetCustomer();
DataTable dtblProj = Datahandler.Datahandler.GetCustProj();
ViewState["Cust"] = dtblCust;
ViewState["Proj"] = dtblProj;
// Create a GridTableView
GridTableView gtvProj = new GridTableView();
string[] sTep = new string[1];
sTep[0] = "ProjectInfoID";
gtvProj.DataKeyNames = sTep;
// Add ParentTableRelation to the GridTableView
GridRelationFields grfTep = new GridRelationFields();
grfTep.DetailKeyField = "CustomerInfoID";
grfTep.MasterKeyField = "CustomerInfoID";
gtvProj.ParentTableRelation.Add(grfTep);
// Build columns of the GridTableView
GridBoundColumn gbcTep = new GridBoundColumn();
gbcTep.HeaderText = "Project ID";
gbcTep.DataField = "ProjectInfoID";
gbcTep.UniqueName = "ProjectInfoID";
gbcTep.SortExpression = "ProjectInfoID";
gtvProj.Columns.Add(gbcTep);
gbcTep = new GridBoundColumn();
gbcTep.HeaderText = "Project Name";
gbcTep.DataField = "ProName";
gbcTep.UniqueName = "ProName";
gbcTep.SortExpression = "ProName";
gtvProj.Columns.Add(gbcTep);
gbcTep = new GridBoundColumn();
gbcTep.HeaderText = "Create Day";
gbcTep.DataField = "CreateDay";
gbcTep.UniqueName = "CreateDay";
gbcTep.SortExpression = "CreateDay";
gtvProj.Columns.Add(gbcTep);
// Add EditCommandColumn to the GridTableView
GridEditCommandColumn geccTep = new GridEditCommandColumn();
geccTep.UniqueName = "EditCommandColumn";
geccTep.EditText = "Edit";
geccTep.ItemStyle.Width = 100;
gtvProj.Columns.Add(geccTep);
// Add SortExpressions to the GridTableView
GridSortExpression gseTep = new GridSortExpression();
gseTep.FieldName = "ProjectInfoID";
gseTep.SortOrder = GridSortOrder.Ascending;
gtvProj.SortExpressions.Add(gseTep);
// Add the GridTableView to the collection of detail table views for the RadGrid
RadGrid1.MasterTableView.DetailTables.Add(gtvProj);
RadGrid1.DataSource = dtblCust;
RadGrid1.MasterTableView.DetailTables[0].DataSource = dtblProj;
RadGrid1.SelectedIndexes.Add(1, 0, 1);
}
Bestregards.