Alphabetically paging in grid/table in asp.net mvc 2.0

Hi,

i am using asp.net mvc 2.0 .inside application i want grid/table wich shows record
and for that record i want alphabetical paging Like"ABCDEFGHIJK..".could you peiople help me on this
or could you provide the piece of code.
nicemanishAsked:
Who is Participating?
 
nicemanishAuthor Commented:
0
 
nicemanishAuthor Commented:
Hi,

I have downloaded the grid as below path
http://blog.maartenballiauw.be/post/2008/06/04/Code-based-ASPNET-MVC-GridView.aspx

could any one let me know how to change paging in alphabetical.

like(ABCDEFGHIJK...)
0
 
nicemanishAuthor Commented:
I used to download code from
http://www.c-sharpcorner.com/uploadfile/satisharveti/811/

in this code how to do change paging alphabetically .

hope so code need to change is
<script type="text/javascript">
       $(function() {
           $("#empTable tbody tr:visible:even").addClass("even");
           var hdnVal = $('#pageIndx');
           $('.nav').click(function() {
               if ($(this).attr('id') == 'next') {
                   if (parseInt($('#pageIndx').val()) < 0)
                       hdnVal.val(0);
               if (parseInt($('#pageCount').val()) == parseInt($('#pageIndx').val()))
                   return;
                   hdnVal.val(parseInt(hdnVal.val()) + 1);
            if (parseInt(hdnVal.val()) > parseInt($('#pageCount').val())) { hdnVal.val($('#pageCount').val()); }
               }
               if ($(this).attr('id') == 'prev') {
                   hdnVal.val(parseInt(hdnVal.val()) - 1);
               }
               if ($(this).attr('id') == 'first') {
                   if (parseInt($('#pageIndx').val()) < 0)
                       return;
                   hdnVal.val(0);
               }
               if ($(this).attr('id') == 'last') {
                   if (parseInt($('#pageCount').val()) == parseInt($('#pageIndx').val()))
                       return;
                   hdnVal.val(parseInt($('#pageCount').val()));
               }
               if ((!($(this).attr('id') == 'prev' && parseInt($('#pageIndx').val()) < 0)) && parseInt($('#pageIndx').val()) >= 0 && parseInt($('#pageIndx').val()) <= parseInt($('#pageCount').val())) {
                   $('#loader').html('Loading....').css('background-color', 'yellow').css('width', '50');
                   $.ajax({ type: 'POST', url: 'home/getdata', data: { pageIndx: $('#pageIndx').val() }, success: function(data) { $('#empTable tbody').html(data); $('#loader').html('').css('background-color', 'white'); $("#empTable tbody tr:visible:even").addClass("even"); }
                   });
               }
               if (parseInt(hdnVal.val()) < 0) { hdnVal.val(0); }
           });
       });
</script>


can any expert help me....?
0
 
elliottbenzleCommented:
Make the change in your SQL statement. Place

ORDER BY put the column name here ASC

at the end of your SQL statement.
0
 
nicemanishAuthor Commented:
i did the same as in post ..problem resolved
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.