Posted 11 October 2018, 11:16 pm EST
Hi
is it possible, using flex grid, to have a json in the postback call that represent the original class with all rows?
Thank you
Forums Home / ComponentOne / ASP.NET MVC Edition
Posted by: kisar on 11 October 2018, 11:16 pm EST
Posted 11 October 2018, 11:16 pm EST
Hi
is it possible, using flex grid, to have a json in the postback call that represent the original class with all rows?
Thank you
Posted 14 October 2018, 4:34 pm EST
Hi Kisar,
The JSON can be bound to the FlexGrid if the JSON bounded to the FlexGrid is the array of object.
For example:
var json1= { data:[{
id:1,
country:'India'
}....]};
theGrid.itemsSource=json1.data;
var json2= [{
id:2,
country:'Italy'
}];
theGrid.itemsSource = json2;
Further, please refer to the following documentation:
http://help.grapecity.com/componentone/NetHelp/c1mvchelpers/webframe.html#AjaxBinding.html
~Manish
Posted 14 October 2018, 10:47 pm EST
Than this is very useful, but now my need is this:
The grid itemssourxe is in binding with a list in the viewmodel
I need to have the list back in the view model also If the grid is in readonly (in the postback controller)
So I thought maybe it could be with a json that I can convert.
Thanx
Posted 15 October 2018, 1:06 pm EST
Hi Kisar,
You may also pass FlexGrid to Model using C1 MVC controls. Please refer to the following demo sample for reference:
https://demos.componentone.com/ASPNET/MVCExplorer/FlexGrid
~Manish
Posted 17 October 2018, 2:04 am EST
after half day reading the link you suggested,
(the manual is very useful but in this case not for me)
I found a usefull solution for me on stackoverflow
Thank you
Posted 17 October 2018, 3:07 pm EST
Thank you for notifying us and glad to know that your issue has been resolved.