I started to use SlickGrid and I got confused about the difference between Data View and Grid (with editing enabled). I haven’t found in the docs some discussion about data view, although it has been mentioned there.
Please enlighten me.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In very simple terms, just think of three layers:
At the bottom you have the raw data. This is just a plain old array. Each item in the array represents one row of data (to be displayed as one row in the grid).
The DataView reads the data array and makes it available to the grid by exposing a couple of standard methods. This way, when the grid wants to get data for display purposes, it just talks to the dataview via one of the standard methods.
The Grid is the display component. Its only responsibility is to render the HTML code necessary to display the desired output on the screen.
The grid never accesses the data directly. It only ever talks to the dataview. This allows the dataview to perform tricks when returning the data to the grid, such as delivering “phantom” rows used to represent group headings.
If you’re interested, the example below is just about the simplest example you can come up with that uses a dataview with SlickGrid.