9 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 19 Jan 2010, 01:20 PM
Hello,
Try out the following code to alter the height of the group header row:
c#:
Thanks
Princy.
Try out the following code to alter the height of the group header row:
c#:
| protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) |
| { |
| if (e.Item is GridGroupHeaderItem) |
| { |
| GridGroupHeaderItem gpheader = e.Item as GridGroupHeaderItem; |
| gpheader.Height = Unit.Pixel(50); |
| } |
| } |
Thanks
Princy.
0
bob ter
Top achievements
Rank 1
answered on 19 Jan 2010, 03:48 PM
Hi,
is this the correct vb.net syntax as its not working?
If TypeOf e.Item Is GridGroupHeaderItem Then
Dim gpheader As GridGroupHeaderItem = TryCast(e.Item, GridGroupHeaderItem)
gpheader.Height = 10
End If
is this the correct vb.net syntax as its not working?
If TypeOf e.Item Is GridGroupHeaderItem Then
Dim gpheader As GridGroupHeaderItem = TryCast(e.Item, GridGroupHeaderItem)
gpheader.Height = 10
End If
0
Hello,
Check out the code snippet bellow and let me know if it works properly:
VB.NET:
Additionally, you can use our online converter:
http://converter.telerik.com/
Best wishes,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Check out the code snippet bellow and let me know if it works properly:
VB.NET:
Protected Sub RadGrid1_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) If TypeOf e.Item Is GridGroupHeaderItem Then Dim gpheader As GridGroupHeaderItem = TryCast(e.Item, GridGroupHeaderItem) gpheader.Height = Unit.Pixel(10) End IfEnd SubAdditionally, you can use our online converter:
http://converter.telerik.com/
Best wishes,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
bob ter
Top achievements
Rank 1
answered on 19 Jan 2010, 04:19 PM
Hi,
The header will get bigger but it won't go below about 40px, is this something to do with the skin or some other property?
Thks
The header will get bigger but it won't go below about 40px, is this something to do with the skin or some other property?
Thks
0
Hello Bob,
I assume that the group header item get higher due to its content (expand/collapse image and text).
Additionally, could you please elaborate if you are using custom skin?
Kind regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
I assume that the group header item get higher due to its content (expand/collapse image and text).
Additionally, could you please elaborate if you are using custom skin?
Kind regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
bob ter
Top achievements
Rank 1
answered on 23 Jan 2010, 09:30 AM
Hi,
I'm using a telerik skin. If I set the height in the code to 100px it will be that size but it doesn't go below about 30-40px which is way too big.
Thks,
I'm using a telerik skin. If I set the height in the code to 100px it will be that size but it doesn't go below about 30-40px which is way too big.
Thks,
0
Hello Bob,
Could you please send us your page declaration (aspx file) this would be of help to get to the source of the issue and advise you further?
Regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Could you please send us your page declaration (aspx file) this would be of help to get to the source of the issue and advise you further?
Regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
bob ter
Top achievements
Rank 1
answered on 28 Jan 2010, 06:31 PM
Sure, here ya go -
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="FlexibleReport.aspx.vb" Inherits="XXXXXXXX.FlexibleReport" MasterPageFile="~/Pages/MasterPages/SignedIn.Master"%>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div>
</div>
<div>
<telerik:RadGrid ID="GridFlex" runat="server" AllowPaging="True"
AllowSorting="True" DataSourceID="FlexDS" GridLines="None" PageSize="40"
ShowFooter="True" ShowGroupPanel="True" Skin="WebBlue">
<HeaderContextMenu skin="WebBlue">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</HeaderContextMenu>
<FooterStyle Height="20px" />
<ItemStyle Height="20px" />
<MasterTableView ShowFooter="True" autogeneratecolumns="False" datasourceid="FlexDS">
<Columns>
<telerik:GridBoundColumn DataField="UserName" HeaderText="User"
ReadOnly="True" SortExpression="UserName" UniqueName="UserName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Client" HeaderText="Client"
SortExpression="Client" UniqueName="Client">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Project" HeaderText="Project"
SortExpression="Project" UniqueName="Project">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Task" HeaderText="Task"
SortExpression="Task" UniqueName="Task">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Expense" HeaderText="Expense"
SortExpression="Expense" UniqueName="Expense">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn Aggregate="Sum" DataField="TimeValue"
DataType="System.Decimal" HeaderText="Value" SortExpression="TimeValue"
UniqueName="TimeValue">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TimeDate"
DataType="System.DateTime" HeaderText="Date" SortExpression="TimeDate"
UniqueName="TimeDate">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn Aggregate="Sum" DataField="Time"
DataType="System.Decimal" HeaderText="Time" SortExpression="Time"
UniqueName="Time">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Billable" DataType="System.Int32"
HeaderText="Billable" SortExpression="Billable" UniqueName="Billable">
</telerik:GridBoundColumn>
<telerik:GridCheckBoxColumn DataField="Billed" DataType="System.Boolean"
HeaderText="Billed" SortExpression="Billed" UniqueName="Billed">
</telerik:GridCheckBoxColumn>
<telerik:GridBoundColumn DataField="DateBilled" DataType="System.DateTime"
HeaderText="Date Billed" SortExpression="DateBilled"
UniqueName="DateBilled">
</telerik:GridBoundColumn>
</Columns>
<GroupHeaderItemStyle Height="15px" />
</MasterTableView>
<clientsettings allowdragtogroup="True">
</clientsettings>
<FilterMenu skin="WebBlue">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</FilterMenu>
</telerik:RadGrid>
</div>
<asp:SqlDataSource ID="FlexDS" runat="server"
ConnectionString="<%$ ConnectionStrings:XXXXXXXXXX.My.MySettings.dbConnection %>"
SelectCommand="SELECT Users.FName + ' ' + Users.LName AS UserName, Client.Name AS Client, Project.Name AS Project, Tasks.Name AS Task, Expenses.Name AS Expense, TimeEntry.TimeValue, TimeEntry.TimeDate, TimeEntry.Time, TimeEntry.Billable, TimeEntry.Billed, TimeEntry.DateBilled FROM TimeEntry INNER JOIN Project ON TimeEntry.ProjectID = Project.ProjectID LEFT OUTER JOIN Expenses ON TimeEntry.TaskID = Expenses.ExpenseID LEFT OUTER JOIN Tasks ON TimeEntry.TaskID = Tasks.TaskID LEFT OUTER JOIN Client ON TimeEntry.ClientID = Client.ClientID LEFT OUTER JOIN Users ON TimeEntry.UserID = Users.UserID">
</asp:SqlDataSource>
<telerik:RadAjaxManager runat="server">
</telerik:RadAjaxManager>
</asp:Content>
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="FlexibleReport.aspx.vb" Inherits="XXXXXXXX.FlexibleReport" MasterPageFile="~/Pages/MasterPages/SignedIn.Master"%>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div>
</div>
<div>
<telerik:RadGrid ID="GridFlex" runat="server" AllowPaging="True"
AllowSorting="True" DataSourceID="FlexDS" GridLines="None" PageSize="40"
ShowFooter="True" ShowGroupPanel="True" Skin="WebBlue">
<HeaderContextMenu skin="WebBlue">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</HeaderContextMenu>
<FooterStyle Height="20px" />
<ItemStyle Height="20px" />
<MasterTableView ShowFooter="True" autogeneratecolumns="False" datasourceid="FlexDS">
<Columns>
<telerik:GridBoundColumn DataField="UserName" HeaderText="User"
ReadOnly="True" SortExpression="UserName" UniqueName="UserName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Client" HeaderText="Client"
SortExpression="Client" UniqueName="Client">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Project" HeaderText="Project"
SortExpression="Project" UniqueName="Project">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Task" HeaderText="Task"
SortExpression="Task" UniqueName="Task">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Expense" HeaderText="Expense"
SortExpression="Expense" UniqueName="Expense">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn Aggregate="Sum" DataField="TimeValue"
DataType="System.Decimal" HeaderText="Value" SortExpression="TimeValue"
UniqueName="TimeValue">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TimeDate"
DataType="System.DateTime" HeaderText="Date" SortExpression="TimeDate"
UniqueName="TimeDate">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn Aggregate="Sum" DataField="Time"
DataType="System.Decimal" HeaderText="Time" SortExpression="Time"
UniqueName="Time">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Billable" DataType="System.Int32"
HeaderText="Billable" SortExpression="Billable" UniqueName="Billable">
</telerik:GridBoundColumn>
<telerik:GridCheckBoxColumn DataField="Billed" DataType="System.Boolean"
HeaderText="Billed" SortExpression="Billed" UniqueName="Billed">
</telerik:GridCheckBoxColumn>
<telerik:GridBoundColumn DataField="DateBilled" DataType="System.DateTime"
HeaderText="Date Billed" SortExpression="DateBilled"
UniqueName="DateBilled">
</telerik:GridBoundColumn>
</Columns>
<GroupHeaderItemStyle Height="15px" />
</MasterTableView>
<clientsettings allowdragtogroup="True">
</clientsettings>
<FilterMenu skin="WebBlue">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</FilterMenu>
</telerik:RadGrid>
</div>
<asp:SqlDataSource ID="FlexDS" runat="server"
ConnectionString="<%$ ConnectionStrings:XXXXXXXXXX.My.MySettings.dbConnection %>"
SelectCommand="SELECT Users.FName + ' ' + Users.LName AS UserName, Client.Name AS Client, Project.Name AS Project, Tasks.Name AS Task, Expenses.Name AS Expense, TimeEntry.TimeValue, TimeEntry.TimeDate, TimeEntry.Time, TimeEntry.Billable, TimeEntry.Billed, TimeEntry.DateBilled FROM TimeEntry INNER JOIN Project ON TimeEntry.ProjectID = Project.ProjectID LEFT OUTER JOIN Expenses ON TimeEntry.TaskID = Expenses.ExpenseID LEFT OUTER JOIN Tasks ON TimeEntry.TaskID = Tasks.TaskID LEFT OUTER JOIN Client ON TimeEntry.ClientID = Client.ClientID LEFT OUTER JOIN Users ON TimeEntry.UserID = Users.UserID">
</asp:SqlDataSource>
<telerik:RadAjaxManager runat="server">
</telerik:RadAjaxManager>
</asp:Content>
0
Hi Bob,
I followed your scenario and prepared a simple working project where the group header height is 25 px. Please examine it and let me know if it works for you.
Another option to achieve the required functionality is to use a custom skin.
Regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
I followed your scenario and prepared a simple working project where the group header height is 25 px. Please examine it and let me know if it works for you.
Another option to achieve the required functionality is to use a custom skin.
Regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.