GridPanerFor ajax proxy.

  1. #1

    GridPanerFor ajax proxy.

    Hi.
    I am evaluating the product and I have a question:
    When using GridPanerFor. Is it possible to use ajax proxy to load the data with. And do remote sorting to the same URL?
    Can u pls share an example
    Tx
  2. #2
    Yes, it is possible
     @(
            Html.X().GridPanelFor(Model)
                    .Store(store => {
                        store.Primary.Proxy.Add(new AjaxProxy { Url = Url.Action("GetData") });
                    })
                    .Title("Employees")
                    .Width(350)
                    .Height(200)
                    .ForceFit(true)
        )
  3. #3
    Thank you.
    Can you please tell me if there's a way to control the grid directly from the members annotations?
    for exampel visibility, sortable, col-title, col-position?
    Thanks again.

    Quote Originally Posted by Vladimir View Post
    Yes, it is possible
     @(
            Html.X().GridPanelFor(Model)
                    .Store(store => {
                        store.Primary.Proxy.Add(new AjaxProxy { Url = Url.Action("GetData") });
                    })
                    .Title("Employees")
                    .Width(350)
                    .Height(200)
                    .ForceFit(true)
        )
  4. #4
    Yes, you can use Control method to set any required properties
    Html.X().GridPanelFor(Model).Control(grid => {any actions with the grid})
    Column position can be set in model class
    
    [Column(Order=1)]
    See the model class in the following example
    http://mvc.ext.net/#/Models/GridPanelFor/
  5. #5
    Thank you, but I think you got me wrong.
    I want to control the entire column config from the annotations.
    So the grid will be generic, and the col config will come from the annotations.
    Is it possible?
    Thanks



    Quote Originally Posted by Vladimir View Post
    Yes, you can use Control method to set any required properties
    Html.X().GridPanelFor(Model).Control(grid => {any actions with the grid})
    Column position can be set in model class
    
    [Column(Order=1)]
    See the model class in the following example
    http://mvc.ext.net/#/Models/GridPanelFor/
  6. #6
    Not all properties can be set via attribute because attribute accept only simple types (static values)
    See ColumnAttribute to investigate possible properties (title, position, sortable, visiblity can be set via attribute)

    Other complex properties can be set in Control method of the grid

Similar Threads

  1. [CLOSED] disable the loading mask on ajax proxy store load
    By RCM in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 13, 2015, 4:54 PM
  2. [CLOSED] pass json data in the Ajax store proxy
    By Sowjanya in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Jul 18, 2013, 2:59 PM
  3. ajax proxy inside row expander
    By shunilkarki in forum 2.x Help
    Replies: 0
    Last Post: May 07, 2013, 12:43 PM
  4. [CLOSED] 'Dynamic' url for an AJAX proxy
    By Justin_Wignall in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 23, 2012, 12:57 PM
  5. [CLOSED] Ajax proxy working only in development server
    By marco.morreale in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Sep 18, 2012, 2:10 PM

Tags for this Thread

Posting Permissions