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

[Solved] grid rebind issue. 2011 q2(2011.2.914)

0 Answers 14 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.
Deokjin
Top achievements
Rank 1
Deokjin asked on 18 Nov 2011, 10:18 AM
hi teleik team. sorry i can't speak english fluently.  ;)

i have found this rebind problem.

//controller
public ActionResult CodeChildList([DefaultValue(-1)]int code)
{
    return View();
}
 
[GridAction]
public ActionResult _CodeChildList([DefaultValue(-1)]int code)
{
    return View(new GridModel<CodeData>
    {
        Data = db.getSelectedCodeChildList(code)
    });
}

//view
//grid initialize: -1 
$.ajax({
            type: "GET",
            url: "/CodeManagement/CodeChildList",
            data: { code: -1 },
            success: function (data) {
                $('#gridChildList').empty();
                $('#gridChildList').html(data);
                $('#gridChildList').show();
            }
        });
  
// and then rebind code : 3
$('#gridname').data('tGrid').rebind({ code: value });

this is finely worked. grid have some data and 4 pages.
and then i try next page after rebind.
but it is not work. all grid data is erased.
i checked it.
//initilize : -1
//value : 3
when move next page after rebind. controller code data is not a 3
that is -1.

thanks.
Tags
Grid
Asked by
Deokjin
Top achievements
Rank 1
Share this question
or