Hi, We need some help on infragistics jquery controls for MVC 4.0. 1)How to get row from hierarchical grid without using any loops. is their any method like getRowByDataID or something else. 2)How we will change any row content of hierarchical grid and that should be commited to the attached datasource. eg. we have one column called isactive if I change this column to active its changing the grid row value but that value is not updated in datasource. so if I filter it by only active rows its not showing me that changed row. 3)Is there any property to assign color to the row in hierarchical grid. 4)normally without expanding the hierarchical grid we did not get its childern rows. is there any possibility to get all rows without expand. 5)We hide 2-3 columns for GridModel. but those columns are not able to get in javascript code. So is there any way to hide columns.
Hello gshontz ,
Thank you for posting in our forum. Please find the answers to your questions below:
---
Q1)How to get row from hierarchical grid without using any loops. is their any method like getRowByDataID or something else
If you’re aiming to get the Dom element associated with a specific data key of a row then you can use the “rowById” method:
http://help.infragistics.com/jQuery/2014.1/ui.iggrid_hg#methods:rowById
--
Q2)How we will change any row content of hierarchical grid and that should be commited to the attached datasource. eg. we have one column called isactive if I change this column to active its changing the grid row value but that value is not updated in datasource. so if I filter it by only active rows its not showing me that changed row.
You can use the “setCellValue” method of the igGridUpdating widget to update a specific cell value in the grid programmatically.
http://help.infragistics.com/jQuery/2014.1/ui.iggridupdating_hg#methods:setCellValue
If the autoCommit property of the grid is set to true (http://help.infragistics.com/jQuery/2014.1/ui.iggrid_hg#options:autoCommit ) then the changes will be reflected on the data source on the client side.
Otherwise you would need to explicitly call the “commit” method: http://help.infragistics.com/jQuery/2014.1/ui.iggrid_hg#methods:commit
After the changes are saved on the client side if you wish to commit them to the server side and invoke the action associated with the UpdateUrl that you have set for the grid, you would need to call the “saveChanges” method:
http://help.infragistics.com/jQuery/2014.1/ui.iggrid_hg#methods:saveChanges
Q3) Is there any property to assign color to the row in hierarchical grid.
There’s no specific property. If you need to set some style for a specific row you can get the Dom element associated with the row and using jQuery’s css() method apply the properties you want to it.
To get a specific row’s Dom element:
To apply css() to a Dom element:
http://api.jquery.com/css/
Q4)normally without expanding the hierarchical grid we did not get its children rows. is there any possibility to get all rows without expand
Before the row is expanded the child grid is not yet created on the page Dom. Only after expanding the parent row the child grid is created and instantiated on the page.
So before the row is expanded it is not possible to get the child grids or their rows as they don’t exist yet.
Q5)We hide 2-3 columns for GridModel. but those columns are not able to get in javascript code. So is there any way to hide columns.
In order to hide/show columns on the client side the Column Hiding features needs to be defined for the grid.
http://www.igniteui.com/grid/column-hiding
Then via the features API you can hide/show columns using the related methods (hideColumn and showColumn):
http://help.infragistics.com/jQuery/2014.1/ui.iggridhiding_hg#methods:hideColumn
http://help.infragistics.com/jQuery/2014.1/ui.iggridhiding_hg#methods:showColumn
Let me know if you have any additional questions or concerns.
Best Regards,
Maya Kirova
Developer Support Engineer II
Infragistics, Inc.
http://es.infragistics.com/support
Hi,
Thanks for your reply.
I checked your suggested links. It solved some of the problems.
But still we are not able to get rows by its ID. Actually we are using hierarchical grid. and in this grid we have used grid model.
now we have attached one primary key column to dataid of grids.
But using rowbyID we are not getting the proper row. I need a row by using those dataID.
Also I want to expand all childrens without adding any loops for code. Is it any way for this.