I'm using FlexiGrid with JQuery 1.2.6 and ASP.NET MVC Preview 3. I
seem to be able to get JSON data out of the controller properly, but
the data won't render in the FelxiGrid.

Here is the data from the controller action:
[{"ID":{"Length":
36},"UserName":"joe_user_TRPP","FirstName":"","LastName":"","Address":"","City":"","State"
:"","Zip":"","FullName":" "},{"ID":{"Length":
36},"UserName":"asdf","FirstName":"asdf","LastName":"asdf"
,"Address":"","City":"","State":"WA","Zip":"","FullName":"asdf asdf"}]

My client side script is:

<script type="text/javascript">
$(document).ready(function(){

                        $("#flex1").flexigrid
                        (
                        {
                        url: '<
%=Html.BuildUrlFromExpression<ProjectController>(c =>
c.UserList(ViewData.Model.ID))%>',
                        dataType: 'json',
                        colModel : [
                                {display: 'UserName', name :
'UserName', width : 180, sortable :
true, align: 'left'},
                                {display: 'Address', name : 'Address',
width : 180, sortable :
true, align: 'left'}
                                ],
                        searchitems : [
                                {display: 'UserName', name :
'UserName', isdefault: true}
                                ],
                        sortname: "UserName",
                        sortorder: "asc",
                        usepager: true,
                        title: 'Users',
                        useRp: true,
                        rp: 15,
                        showTableToggleBtn: true,
                        width: 700,
                        height: 200
                        }
                        );
                        });
</script>

Besides no data being rendered I get an "object is undefined" on like
725 of jquery-1.2.6" and the grid displays the message "Displaying NaN
to NaN of undefined items". I've tweaked the Data Transfer object to
both exclude and includes various items, but it still doesn't seem to
work.

I've also tried jquery-1.2.3 and get similar problems, but on a
different line.

Any clues to what the problem is?

Thanks
Jack

Reply via email to