This is a migrated thread and some comments may be shown as answers.

[Solved] NullReference Exception with PrefixUrlParamaters(false)

0 Answers 17 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nick
Top achievements
Rank 1
Nick asked on 14 Sep 2011, 01:01 PM
Hi guys,
Could someone please tell me what i am doing wrong here:

@(Html.Telerik().Grid(Model)
              .Name("grid")
              .DataKeys(keys => keys.Add(c => c.IdentityCode))
              .PrefixUrlParameters(false)
              .DataBinding(dataBinding => dataBinding
                               .Server()
                                .Delete("Delete", "People"))
              .Columns(columns =>
                           {
                               columns.Bound(o => o.IdentityCode).Width(100);
                               columns.Bound(o => o.Firstname).Width(200);
                               columns.Bound(o => o.Surname);
                               columns.Bound(o => o.LevelGroup);
                               columns.Command(commands => { commands.Delete(); }).Width(200);
                           })
       
 
   
       )


If i set .PrefixUrlParameters() to true, it works fine, but if i set it to false, i get a System.NullReferenceException: Object reference not set to an instance of an object.

Any help would be greatly appreciated.

Thanks,
Nick
Tags
Grid
Asked by
Nick
Top achievements
Rank 1
Share this question
or