I have a grid with two groupings - First group by leadtype, and then for each leadtype, group by Employee. I am able to get the groupings to work fine but can't figure out how to get the item count (lead count) to show correctly in the main group (lead type) header and each of the sub group (employee) header. I have studied the examples and documentation tried a number of different groupbyexpressions but I either get {0} for the count or the groupings get all messed up.
Any help is appreciated!
Thanks
Charles
Here is the grid definition I have so far:
Any help is appreciated!
Thanks
Charles
Here is the grid definition I have so far:
<
telerik:RadGrid
ID
=
"rgLeads"
ShowGroupPanel
=
"false"
AutoGenerateColumns
=
"false"
AllowSorting
=
"true"
ShowFooter
=
"False"
runat
=
"server"
GridLines
=
"None"
AllowPaging
=
"true"
PageSize
=
"15"
Width
=
"100%"
>
<
MasterTableView
DataSourceID
=
"sqldsLeads"
ShowGroupFooter
=
"false"
CommandItemDisplay
=
"Top"
EditMode
=
"InPlace"
PagerStyle-PageSizes
=
"15,25,50,100,250,500,1000"
>
<
PagerStyle
AlwaysVisible
=
"true"
/>
<
CommandItemSettings
ShowExportToExcelButton
=
"true"
ShowExportToCsvButton
=
"true"
ShowExportToWordButton
=
"true"
ShowAddNewRecordButton
=
"false"
>
</
CommandItemSettings
>
<%--<
GroupHeaderTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"Label3"
style
=
"font-weight:bold"
Text='<%# Eval("LeadType")%>' ></
asp:Label
>
<
asp:Label
runat
=
"server"
ID
=
"Label1"
style
=
"font-weight:bold"
Text='<%# "(" + Eval("TotalCount").ToString() + " Total)" %>' ></
asp:Label
>
</
GroupHeaderTemplate
>--%>
<
Columns
>
<
telerik:GridTemplateColumn
HeaderText
=
"ID"
>
<
ItemTemplate
>
<
asp:label
runat
=
"server"
ID
=
"lblTicketID"
Text='<%# Eval("UpTicketID") %>' ></
asp:label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
>
<
ItemTemplate
>
<
asp:ImageButton
runat
=
"server"
ID
=
"imgbtnPrint"
ImageUrl
=
"images/print_16.gif"
OnClick
=
"imgbtnPrint_click"
ToolTip
=
"Print lead datasheet."
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Date"
SortExpression
=
"CreatedTDS"
>
<
ItemTemplate
>
<
asp:label
runat
=
"server"
ID
=
"lblDate"
Text='<%# Format(Eval("CreatedTDS"),"M/d/yyyy") %>' ToolTip='<%# Format(Eval("CreatedTDS"),"t") %>' ></
asp:label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"LeadType"
HeaderText
=
"Type"
SortExpression
=
"LeadType"
Aggregate
=
"Count"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"EmployeeName"
HeaderText
=
"Employee"
SortExpression
=
"EmployeeName"
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Name"
SortExpression
=
"Lname"
>
<
ItemTemplate
>
<
asp:HyperLink
runat
=
"server"
ID
=
"hlClientHistory"
NavigateUrl='<%# "ClientHistory2.aspx?
clientID
=
" + CStr(Eval("
ClientID"))%>' Text='<%# Eval("ClientName") %>' Target="_blank" ></
asp:HyperLink
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Phone"
>
<
ItemTemplate
>
<
asp:label
runat
=
"server"
ID
=
"lblPhone"
></
asp:label
>
</
ItemTemplate
>
<
ItemStyle
Width
=
"120px"
/>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Email"
>
<
ItemTemplate
>
<
a
href='mailto:<%# Eval("EmailAddress") %>' style="font-family: Segoe UI, Arial, Verdana; font-size: 11px; color: #777697;"><%# Eval("EmailAddress") %></
a
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Address"
>
<
ItemTemplate
>
<
asp:label
runat
=
"server"
ID
=
"lblAddress"
></
asp:label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Vehicle"
SortExpression
=
"Manufacturer"
>
<
ItemTemplate
>
<
asp:label
runat
=
"server"
ID
=
"lblVehicle"
Text='<%# Eval("Vehicle") %>' ></
asp:label
>
<
asp:LinkButton
runat
=
"server"
ID
=
"lbShowVehicle"
OnClick
=
"lbShowVehicle_click"
Text='<%# Eval("Vehicle") %>' style="font-family: Segoe UI, Arial, Verdana; font-size: 11px; color: #777697;"></
asp:LinkButton
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
<
GroupByExpressions
>
<
telerik:GridGroupByExpression
>
<
GroupByFields
>
<
telerik:GridGroupByField
FieldName
=
"LeadType"
FieldAlias
=
"LeadType"
>
</
telerik:GridGroupByField
>
</
GroupByFields
>
<
SelectFields
>
<
telerik:GridGroupByField
FieldName
=
"LeadType"
FieldAlias
=
"LeadType"
HeaderText
=
"Lead Type"
>
</
telerik:GridGroupByField
>
<%--<
telerik:GridGroupByField
FieldName
=
"UpTicketID"
FieldAlias
=
"TicketCount"
Aggregate
=
"Count"
>
</
telerik:GridGroupByField
>--%>
</
SelectFields
>
</
telerik:GridGroupByExpression
>
<
telerik:GridGroupByExpression
>
<
GroupByFields
>
<
telerik:GridGroupByField
FieldName
=
"EmployeeName"
FieldAlias
=
"EmployeeName"
>
</
telerik:GridGroupByField
>
</
GroupByFields
>
<
SelectFields
>
<
telerik:GridGroupByField
FieldName
=
"EmployeeName"
FieldAlias
=
"EmployeeName"
HeaderText
=
"Employee"
>
</
telerik:GridGroupByField
>
<%--<
telerik:GridGroupByField
FieldName
=
"UpTicketID"
FieldAlias
=
"TicketCount"
Aggregate
=
"Count"
>
</
telerik:GridGroupByField
>--%>
</
SelectFields
>
</
telerik:GridGroupByExpression
>
</
GroupByExpressions
>
</
MasterTableView
>
<
ExportSettings
ExportOnlyData
=
"true"
IgnorePaging
=
"true"
>
<
Excel
Format
=
"Biff"
></
Excel
>
</
ExportSettings
>
<
ClientSettings
AllowDragToGroup
=
"true"
>
</
ClientSettings
>
<
GroupingSettings
ShowUnGroupButton
=
"true"
></
GroupingSettings
>
</
telerik:RadGrid
>