Hello-
Can someone help me to understand why the IGridModel has properties that decide how the grid is rendered? Models aren't really supposed to know about rendering, and yet a sizeable chunk of the properties in the 'model' interface are directly concerned with rendering: there are properties such as caption, control sizes, which are concerns of either the view or the controller and are more typically set during rendering.
It appears as though, at first glance,that there isn't really a distinction between layers and as such it's an awkward fit in the MVC pattern, which sort of forces a layered approach. It also appears to break one of the nicest parts of MS MVC, which is that the web programmers can focus on webby behaviors and the model developers can focus on domain behavior.
Am I simply misunderstanding what I'm seeing?
That's not a Model in the sense of an MVC Model. It just describes/models all properties that the component can be configured with. It's not describing your application model. We provide ways to configure the controls both in your controller, as well as the view , via chaining, as it can be seen on this sample, for example:
http://samples.infragistics.com/jquery/grid/remote-sorting
Provided that MVC does not support any state saving and state management by default, sometimes it is inevitable to configure a component in the controller. that's the case with Load on demand in the hierarchical grid, when other features are also enabled, and you have a mix of local vs. remote operations.
There are several advantages of using the GridModel, as opposed to configuring your grid directly in the View (which is the most common scenario, no arguing in that):
(that's taken from the MVC contrib grid practices) :
Hope it helps,
Angel
Can you please provide a sample for GridModel code that takes advantages of the points you mentioned above (including inheritance). I am new to this and want to understand it better. Grid that I will use will have lots of columns possibly more than 100.
Features that I want in my IG grids are listed below.
Multi Column Headers
Dynamically changing Header Texts (based on user selection criteria)
Footer with Summary
Column Hiding, Resizing
Editing capability for only few cells (not all) of a row in the grid
Paging
Sorting
Export to Excel
One more feature that I am looking for is to dynamically calculate and update the data in other cells based on the user input value in another cell of a ROW in the grid.
Shall appreciate your help,
Thanks
Himanshu
Hi Himanshu,
Please refer to the examples they provided, sure will hit all the points in no time.