Hi,
I want my ignite ui grid to be populated from a JSON.
{ "id": 1, "data": { "control": "textbox", "value": 100 } }, { "id": 2, "data": { "control": "checkbox", "value": true } }
in my grid under the "data" column the view should contain a textbox for row1 and a checkbox in row2 with the respective values and also possible to update the values.
Is it possible to achieve this using ignite ui grid ? Are there any working samples available?
Regards
Rich
Hello richu,
Thank you for posting in the community.
The functionality that you are trying to achieve, binding igGrid to complex objects, is currently not supported out of the box. Additionally, having in mind your requirement I assume that two different editors are going to be needed for one column. This is currently not possible because by design only one editor is rendered per column and what is more editor type cannot be changed runtime.
However, if you stick to exactly the data format I can suggest you a custom approach for achieving your requirement. A column template could be used and it could be bound to a complex object. Some further reference about this could be found at the following link:
http://es.infragistics.com/community/blogs/craig_shoemaker/archive/2014/03/05/binding-to-complex-objects-to-an-iggrid-column-template.aspx
In regards of the editing a custom editor provider could be used for the required column. This editor provider will contain text editor and checkbox and will render one of them based on the column value.
A sample demonstrating how custom editor provider could be used is available at the following link:
http://www.igniteui.com/grid/editing-custom-editor-provider
However, please keep in mind that this is highly custom approach and igGrid features are not going to work out of the box. You will have to manually handle Sorting, Filtering and any other interactions that you might need.
I hope you find this information helpful.
Please let me know if you have any additional questions regarding this matter.