Posts

Showing posts from September, 2013

Telerik Rad Grid Sorting Not Working for Numeric String and Date String Columns

As i have posted my last blog post for sorting Telerik Rad Grid Sorting . That was a normal sorting but if you want to sort numeric string column or date string column in that case you would not get desired result. For example: Values are 5, 31, 22, 41, 76, 8, 6 When we click on column header for sorting then sorted values are 22, 31, 41, 5, 6, 76, 8  But expected result is 5, 6, 8, 22, 31, 41, 76 So for take over this problem follow below example : For example we will add a numeric string column and a date string column to my last blog post Telerik Rad Grid Sorting .  .aspx Code : <telerik:GridBoundColumn DataField="Date" HeaderText="Date" DataType="System.DateTime"   SortExpression="Date"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Number" HeaderText="Number" DataType="System.Int32"    SortExpression="Number"></telerik:GridBoundColumn> Also when you...

Telerik Rad Grid Sorting

If you are using Telerik Rad Grid and also need to sort column on column's header click than for your requirement below code will help you surely. .aspx Code : <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" EnableViewState="false" AutoGenerateColumns="False" OnSortCommand="RadGrid1_SortCommand"  OnNeedDataSource="RadGrid1_NeedDataSource">  <SortingSettings EnableSkinSortStyles="true" />   <MasterTableView AllowNaturalSort="false" AllowSorting="True" AutoGenerateColumns="False">     <Columns>        <telerik:GridBoundColumn DataField="Name" HeaderText="Name"  SortExpression="Name">        </telerik:GridBoundColumn>        <telerik:GridBoundColumn DataField="Address" HeaderText="Address"  SortExpression="Address">        </telerik:GridBoundColumn...

Check Box inside Rad Grid 508 Compliance

Many times we used check box inside a grid like : <telerik:GridTemplateColumn UniqueName="ColoumnChk" HeaderText="Check Here">         <ItemTemplate>              <asp:CheckBox ID="chkNew" AutoPostBack="true" runat="server" Text="Abc" />          </ItemTemplate>  </telerik:GridTemplateColumn>  But some time we need to hide check box text like :  <telerik:GridTemplateColumn UniqueName="ColoumnChk" HeaderText="Check Here">         <ItemTemplate>              <asp:CheckBox ID="chkNew" AutoPostBack="true" runat="server" Text="" />          </ItemTemplate>  </telerik:GridTemplateColumn> In this case an accessibility error(508 Compliance) will occur. So for treat this error we have to provide check box text and hide that ...