Click here to Skip to main content
11,709,844 members (52,393 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: MVC3 ASP.NET4.0
Hi,

I have following code in my _DonationList.cshtml file and paging is not working here in this code please let me know where I am going wrong.
In fact When run this code it shows me Grid, but when i click on pages, it show me following URL in the Page
http://localhost:61122/Grid/FirstLook?Grid-page=2
It shouldn't do this but it should show me like
http://localhost:61122/Donation?Grid-page=2
Please Let me know is there any Problem in my code or there is any other problem.
@(Html.Telerik().Grid(Model)
        .Name("Grid")
        .DataKeys(keys => keys.Add(c => c.DonationID))
        .Columns(columns =>
        {
            columns.Bound(o => o.ReceivedDate).Format("{0:MM/dd/yyyy}").Width(100);
            columns.Bound(o => o.DepositDate).Format("{0:MM/dd/yyyy}").Width(90);
            columns.Bound(o => o.ContactName).Width(160);
            columns.Bound(o => o.DonationAmount).Width(115);
            columns.Bound(o => o.DonationType).Width(100);
            columns.Bound(o => o.ProjectName).Width(125);
            columns.Command(commands =>
            {
                commands.Edit().ButtonType(GridButtonType.Text);
                commands.Delete().ButtonType(GridButtonType.Text);
            }).Width(200);
        })
        .DataBinding(dataBinding =>
        {
            dataBinding.Server().Select("Edit", "Donation", new { ajax = ViewData["ajax"] });
            dataBinding.Ajax().Select("Delete", "Donation").Enabled(true)
            .Update("Edit", "Grid", new { mode = GridEditMode.InLine,type = GridButtonType.Text })
            .Delete("Delete", "Donation", new { mode = GridEditMode.InLine, type = GridButtonType.Text });
        })
                .Scrollable(scrolling => scrolling.Enabled(true))
                .Sortable(sorting => sorting.Enabled(true))
                .Pageable(paging => paging.Enabled(true))
                .Editable(editing => editing.Mode(GridEditMode.InLine))
                //.Filterable(filtering => filtering.Enabled(true))
                //.Groupable(grouping => grouping.Enabled(true))
                .Footer(true)
        )
Thank you
Posted 14-Jun-12 9:02am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I just think, posting such issues about a 3rd party control at telerik Forum would be more useful.
Here:TELERIK Forum[^]

Try looking here: Telerik RadGrid Forum[^]
Posting here is fine but it might be already discussed there!

I had found that specific questions related to 3rd party is answered more quickly and accurately at respective forums.
  Permalink  
Comments
Espen Harlinn at 14-Jun-12 16:34pm
   
Good points :-D
losmac at 14-Jun-12 17:52pm
   
Agree ;)
+5!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I have Changed the code to following and it Works
dataBinding.Server()  
           .Update("Edit", "Grid", new { mode = GridEditMode.InLine,type = GridButtonType.Text })
           .Delete("Delete", "Donation", new { mode = GridEditMode.InLine, type = GridButtonType.Text });
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 514
1 OriginalGriff 250
2 Peter Leow 229
3 Maciej Los 185
4 Mika Wendelius 175
0 OriginalGriff 9,428
1 Sergey Alexandrovich Kryukov 9,037
2 CPallini 5,189
3 Maciej Los 4,991
4 Mika Wendelius 3,856


Advertise | Privacy | Mobile
Web03 | 2.8.150819.1 | Last Updated 19 Jun 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100