
Hi,
Im using Prometheus Rad grid . i try to group the grid by three fields.
first two fields are gridboundcolumn and i have given them within the groupby expression and another field is template field. I enabled the grouping for this template field as per help document.
Below is the Code,
<
telerik:RadGrid ID="RadGrid1" runat="server" Skin="Office2007" SkinsOverrideStyles="false"AutoGenerateColumns="false" BorderWidth="1px" BorderStyle="Solid" BorderColor="ActiveBorder">
<ClientSettings AllowGroupExpandCollapse="true">
</ClientSettings>
<MasterTableView GroupLoadMode ="Client" >
<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField HeaderText=" " FieldName="Status" FormatString="{0:D}"
HeaderValueSeparator=" "></telerik:GridGroupByField>
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField FieldName="Status" ></telerik:GridGroupByField>
</GroupByFields>
</telerik:GridGroupByExpression>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField HeaderText=" " FieldName="TSACode" FormatString="{0:D}"
HeaderValueSeparator=" "></telerik:GridGroupByField>
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField FieldName="TSACode" SortOrder="Ascending"></telerik:GridGroupByField>
</GroupByFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
<Columns>
<telerik:GridBoundColumn Visible="false" HeaderText="Status" DataField="Status" UniqueName="Status"></telerik:GridBoundColumn>
<telerik:GridBoundColumn Visible="false" HeaderText="TSA" DataField="TSACode" UniqueName="TSACode"> </telerik:GridBoundColumn>
<telerik:GridBoundColumn Visible="false" HeaderText="PubId" DataField="PubId" UniqueName="PubId"></telerik:GridBoundColumn>
<telerik:GridTemplateColumn Groupable="true" GroupByExpression="Title GROUP BY Title"
ItemStyle-Width="60%" HeaderText="Title" UniqueName="Title">
<ItemTemplate>
<asp:HyperLink ID="hypLnk" CssClass="HyperLink" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Title") %>'
ToolTip="Publication Info" Target="_blank">
</asp:HyperLink>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn HeaderText="Country" DataField="CountryCode" UniqueName="CountryCode">
</telerik:GridBoundColumn>
</
Columns>
</MasterTableView>
</telerik:RadGrid>
Actual Result : Grid is grouped according to the two fields mentioned in the group by expression. group is missing for "Title" template column. Im getting Title and country as dataitems<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Calendar.ascx.cs" Inherits="SitefinityWebApp.Controls.Calendar" %><telerik:RadScheduler ID="rsCalendar" runat="server" Skin="Office2007" ReadOnly="True" SelectedView="MonthView" MonthView-VisibleAppointmentsPerDay="15" OverflowBehavior="Expand" CustomAttributeNames="Link" RowHeight="35px"> <TimelineView UserSelectable="false" /> <WeekView UserSelectable="false" /> <DayView UserSelectable="false" /> <AdvancedForm DateFormat="M/d/yyyy" TimeFormat="h:mm tt" /> <AppointmentTemplate> <a href='<%#Eval("Link") %>'><%#Eval("Subject")%></a> <%--<a href='CourseDescription.aspx?cid=<%#Eval("ID") %>'><%#Eval("Subject")%></a>--%> </AppointmentTemplate> <monthview visibleappointmentsperday="15" AdaptiveRowHeight="True" /></telerik:RadScheduler>protected void Page_Load(object sender, EventArgs e) { //if (!IsPostBack) //{ FillCalendar(DateTime.Now); //} } protected void rsCalendar_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) { FillCalendar(rsCalendar.SelectedDate); } /// <summary> /// Fills the calendar with the info /// </summary> private void FillCalendar(DateTime selDate) { List<CoursesByDate> cal = dbContext.GetCoursesByDate(selDate).ToList(); rsCalendar.DataSource = cal; rsCalendar.DataKeyField = "CourseCode"; rsCalendar.DataSubjectField = "Course_Description"; rsCalendar.DataStartField = "Begin_Date"; rsCalendar.DataEndField = "End_Date"; rsCalendar.DataBind(); }<
telerik:GridButtonColumn UniqueName="btnEdit" CommandName="Edit" Text="Edit" ButtonType="PushButton"
Visible="false">
We tried using oncommand and writing some javascript code but that is not an option.
It interferes with required field validators.
The cancel button is autogenerated and we are not writing any code for it.
Please suggest something as it is an urgent requirement.
<telerik:RadListBox ID="lbxDepDisponibles" runat="server" Height="300px" Width="335px" Visible="false" TransferToID="lbxTraites" DataValueField="number" > <ItemTemplate> <div class="listeDispo departementTraite"> <div> <img class="adminButton" src="Images/Administre.gif" height="32" style="margin:0px" /> </div> <div class="dispoInfo"> <div class="cboContent" style="display:block;"> <span style="font-weight: bold;"> <%#DataBinder.Eval(Container, "Attributes['description']")%> <span style="font-size: 10px;"> <br />Dep. # <%#DataBinder.Eval(Container, "Attributes['number']")%> - <%#DataBinder.Eval(Container, "Attributes['name']")%> </span> </span> </div> </div> </div> </ItemTemplate></telerik:RadListBox> <telerik:RadGrid ID="grdEvals" runat="server" Width="720px" CellSpacing="0" DataSourceID="odsEvals" GridLines="None" onselectedindexchanged="grdEvals_SelectedIndexChanged" AllowPaging="True" AllowSorting="True" ShowGroupPanel="True" PageSize="20" ShowStatusBar="True" > <ExportSettings IgnorePaging="True" > </ExportSettings> <ClientSettings EnablePostBackOnRowClick="True" AllowDragToGroup="True"> <Selecting AllowRowSelect="True" /> </ClientSettings><MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="odsEvals" CommandItemDisplay="Top" ><CommandItemSettings ExportToPdfText="Export to PDF" ShowExportToCsvButton="True" ShowExportToExcelButton="True" ShowExportToPdfButton="True" ShowExportToWordButton="True" ShowAddNewRecordButton="False" ShowRefreshButton="False"></CommandItemSettings><RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"><HeaderStyle Width="20px"></HeaderStyle></RowIndicatorColumn><ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"><HeaderStyle Width="20px"></HeaderStyle></ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True" Visible="false" SortExpression="ID" UniqueName="ID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="EmployeeID" FilterControlAltText="Filter EmployeeID column" HeaderText="Employee ID" SortExpression="EmployeeID" UniqueName="EmployeeID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="EmployeeName" FilterControlAltText="Filter EmployeeName column" HeaderText="Employee Name" SortExpression="EmployeeName" UniqueName="EmployeeName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="DateCompleted" DataType="System.DateTime" FilterControlAltText="Filter DateCompleted column" HeaderText="Completed" SortExpression="DateCompleted" UniqueName="DateCompleted"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CoreValueNos" DataType="System.Int32" FilterControlAltText="Filter CoreValueNos column" HeaderText="Core Value No's" SortExpression="CoreValueNos" UniqueName="CoreValueNos"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="OtherNos" DataType="System.Int32" FilterControlAltText="Filter OtherNos column" HeaderText="Other No's" SortExpression="OtherNos" UniqueName="OtherNos"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="EmployeeCostCenter" FilterControlAltText="Filter EmployeeCostCenter column" HeaderText="Cost Center" SortExpression="EmployeeCostCenter" UniqueName="EmployeeCostCenter"> </telerik:GridBoundColumn> </Columns><EditFormSettings><EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn></EditFormSettings></MasterTableView><FilterMenu EnableImageSprites="False"></FilterMenu> </telerik:RadGrid>