Hi
we have column 'log_message' . if i click that column header it has to be sorted but it is not happening. Instead it is navigated to error page.
I am unable to sort only the specified column( 'log_message' ) in the RadGrid but i can sort all other columns. Please find the code below which we are using
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="x.cs"
Inherits="x" %>
<%@ 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="ContentMain" runat="server">
<div class="outer_content">
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True"
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
CellSpacing="0" DataSourceID="dsx" GridLines="None"
PageSize="100" ShowGroupPanel="True" Skin="Metro">
<ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True"
ReorderColumnsOnClient="True">
</ClientSettings>
<MasterTableView DataKeyNames="log_id" DataSourceID="x">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
</RowIndicatorColumn>
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="log_id" DataType="System.Int32"
FilterControlAltText="Filter log_id column" HeaderText="log_id" ReadOnly="True"
SortExpression="log_id" UniqueName="log_id">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="log_time" DataType="System.DateTime"
FilterControlAltText="Filter log_time column" HeaderText="log_time"
SortExpression="log_time" UniqueName="log_time">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="log_type"
FilterControlAltText="Filter log_type column" HeaderText="log_type"
SortExpression="log_type" UniqueName="log_type">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="log_page"
FilterControlAltText="Filter log_page column" HeaderText="log_page"
SortExpression="log_page" UniqueName="log_page">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="log_message"
FilterControlAltText="Filter log_message column" HeaderText="log_message"
SortExpression="log_message" UniqueName="log_message">
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="log_context"
FilterControlAltText="Filter log_context column" HeaderText="log_context"
SortExpression="log_context" UniqueName="log_context">
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
<FilterMenu EnableImageSprites="False"></FilterMenu>
</telerik:RadGrid>
<asp:EntityDataSource ID="dsPtcHistoryReports" runat="server"
ConnectionString="name=PTCHistoryReportsEntities"
DefaultContainerName="PtcHistoryReportsEntities" EnableFlattening="False"
EntitySetName="ReportsWebLogs">
</asp:EntityDataSource>
</div>
</asp:Content>
PLease help me in this.
we have column 'log_message' . if i click that column header it has to be sorted but it is not happening. Instead it is navigated to error page.
I am unable to sort only the specified column( 'log_message' ) in the RadGrid but i can sort all other columns. Please find the code below which we are using
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="x.cs"
Inherits="x" %>
<%@ 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="ContentMain" runat="server">
<div class="outer_content">
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True"
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
CellSpacing="0" DataSourceID="dsx" GridLines="None"
PageSize="100" ShowGroupPanel="True" Skin="Metro">
<ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True"
ReorderColumnsOnClient="True">
</ClientSettings>
<MasterTableView DataKeyNames="log_id" DataSourceID="x">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
</RowIndicatorColumn>
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="log_id" DataType="System.Int32"
FilterControlAltText="Filter log_id column" HeaderText="log_id" ReadOnly="True"
SortExpression="log_id" UniqueName="log_id">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="log_time" DataType="System.DateTime"
FilterControlAltText="Filter log_time column" HeaderText="log_time"
SortExpression="log_time" UniqueName="log_time">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="log_type"
FilterControlAltText="Filter log_type column" HeaderText="log_type"
SortExpression="log_type" UniqueName="log_type">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="log_page"
FilterControlAltText="Filter log_page column" HeaderText="log_page"
SortExpression="log_page" UniqueName="log_page">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="log_message"
FilterControlAltText="Filter log_message column" HeaderText="log_message"
SortExpression="log_message" UniqueName="log_message">
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="log_context"
FilterControlAltText="Filter log_context column" HeaderText="log_context"
SortExpression="log_context" UniqueName="log_context">
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
<FilterMenu EnableImageSprites="False"></FilterMenu>
</telerik:RadGrid>
<asp:EntityDataSource ID="dsPtcHistoryReports" runat="server"
ConnectionString="name=PTCHistoryReportsEntities"
DefaultContainerName="PtcHistoryReportsEntities" EnableFlattening="False"
EntitySetName="ReportsWebLogs">
</asp:EntityDataSource>
</div>
</asp:Content>
PLease help me in this.