Have an existing page that was using Classic ASP (OldLayout.jpg) and I am trying to do a similar approach using a RadGrid with Grouping (NewLayout.jpg). As I do realize that there will be differences and I would like to have things look similar.
Is there anyway of adding a "Master Header" to the grid? "Policyholder Board Reporting", currently it is just a Header for a field.
There will 2 main categories that it can be broken down by ASI or ESI. Is there anyway of only displaying them once, when it changes? So it would read "ASI" then records and "ESI" then records. Currently it reads "ASI" then Date
How can I get my Dates formatted to in Long Date Time format. <Day of week> Month Day, Year
Below is the code I am trying to implement and hopefully it will help answer my questions. Also I would like to delete but need to get the ID which is apart of the grid and was trying to get that via the RadGrid_ItemDeleted.
Is there anyway of adding a "Master Header" to the grid? "Policyholder Board Reporting", currently it is just a Header for a field.
There will 2 main categories that it can be broken down by ASI or ESI. Is there anyway of only displaying them once, when it changes? So it would read "ASI" then records and "ESI" then records. Currently it reads "ASI" then Date
How can I get my Dates formatted to in Long Date Time format. <Day of week> Month Day, Year
Below is the code I am trying to implement and hopefully it will help answer my questions. Also I would like to delete but need to get the ID which is apart of the grid and was trying to get that via the RadGrid_ItemDeleted.
<telerik:RadGrid ID="_grdExisting" runat="server"AutoGenerateColumns="False" CellSpacing="0" GridLines="None"><HeaderStyle ForeColor="White" BackColor="Black" HorizontalAlign="Center" /><MultiHeaderItemStyle BackColor="Green" ForeColor="Yellow" /><MasterTableView DataKeyNames="BoardReportID"><GroupByExpressions> <telerik:GridGroupByExpression> <SelectFields> <telerik:GridGroupByField FieldName="ASI_ESI" FormatString="{0}"></telerik:GridGroupByField> </SelectFields> <SelectFields> <telerik:GridGroupByField FieldName="BoardReportDate" FormatString="{0:D}"></telerik:GridGroupByField> </SelectFields> <GroupByFields> <telerik:GridGroupByField FieldName="ASI_ESI" SortOrder="Ascending"></telerik:GridGroupByField> </GroupByFields> <GroupByFields> <telerik:GridGroupByField FieldName="BoardReportDate" SortOrder="Descending" FormatString="{0:D}"></telerik:GridGroupByField> </GroupByFields> </telerik:GridGroupByExpression></GroupByExpressions> <GroupHeaderTemplate> <asp:Label runat="server" ID="Label2" Text='<%# DirectCast(Container, GridGroupHeaderItem).AggregatesValues("ASI_ESI") & "SI" %>' Visible='<%# ((DirectCast(Container, GridGroupHeaderItem).AggregatesValues("ASI_ESI")) IsNot Nothing)%>'> </asp:Label> <asp:Label runat="server" ID="Label1" Text='<%# DirectCast(Container, GridGroupHeaderItem).AggregatesValues("BoardReportDate") %>' Visible='<%# ((DirectCast(Container, GridGroupHeaderItem).AggregatesValues("BoardReportDate")) IsNot Nothing)%>'> </asp:Label></GroupHeaderTemplate><Columns> <telerik:GridHyperLinkColumn DataTextField="BoardReportDesc" ItemStyle-HorizontalAlign="Left" UniqueName="NonComplianceCount" HeaderStyle-Font-Bold="false" HeaderStyle-Wrap="false" DataNavigateUrlFields="ReportLocation" DataNavigateUrlFormatString="Reports/{0}" HeaderStyle-Width="150px" HeaderText="Policyholder Board Reporting" > <ItemStyle Wrap="True" Font-Underline="true"/> </telerik:GridHyperLinkColumn> <telerik:GridButtonColumn ConfirmText="Delete this product?" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn1"> <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle> </telerik:GridButtonColumn></Columns></MasterTableView></telerik:RadGrid>