Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dbl Click
Message
General information
Forum:
ASP.NET
Category:
Client-side development
Title:
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01556330
Message ID:
01557330
Views:
72
This message has been marked as the solution to the initial question of the thread.
Likes (1)
>
>Thanks, Paul. Yes, this worked.
>
>So, what will be my solution to make sure that binding occur after JSON is loaded?

Wow, there isn't much in the way of docs for Flexigrid, is there? Or at least it's not obvious to me.

I did find a reference to an "onSuccess" event, maybe that would be a good place to hook up your event handler.

You would do this when you were configuring the grid (See "nameOfFunctionToHookupEvent") - you could also use an anonymous function here if you'd prefer.
$("#flexClients").flexigrid({
    url: '/Client/Client/',
    dataType: 'json',
    colModel: [
    { display: 'Client Id', name: 'Id', width: 100, sortable: true, align: 'center', hide: true },
    { display: 'Client #', name: 'Number', width: 100, sortable: true, align: 'center' },
    { display: 'Name', name: 'Name', width: 350, sortable: true, align: 'center' },
    { display: 'Contact 1', name: 'Contact1', width: 350, sortable: true, align: 'center' },
    ],
    buttons: [
    { name: 'Add', bclass: 'add', onpress: add },
    { name: 'Edit', bclass: 'edit', onpress: edit },
    { name: 'Delete', bclass: 'delete', onpress: del },
    { separator: true }
    ],
    searchitems: [
    { display: 'Client Name', name: 'Name' }
    ],
    sortname: "Name",
    sortorder: "asc",
    usepager: true,
    title: 'Clients',
    useRp: true,
    rp: 15,
    rpOptions: [5, 10, 15, 20, 25, 40],
    showTableToggleBtn: true,
    width: 900,
   
    onSubmit: addFormData,
    onSuccess: nameOfFunctionToHookupEvent,
    hideOnSubmit: false,
    height: 'auto',
    singleSelect: true
});
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform