Hi,
Can someone tell me how to add a tooltip on each cell of all the rows of parent and child grids of webhierarchicaldatagrid on client-side. Currently I am using this function:
function initGrid(grid, args) { var rows = grid.get_rows(); var rowCount = rows.get_length(); var cellCount = rowCount > 0 ? rows.get_row(0).get_cellCount() : 0; for (var r = 0; r < rowCount; ++r) { var row = rows.get_row(r); for (var c = 0; c < cellCount; ++c) { var cell = row.get_cell(c); var cellEl = row.get_cell(c).get_element(); cellEl.title = "Message"; } } }
It adds the tooltip to parent rows but how to add the same message for all the child rows also.
Thanks,
Megha
Hi Megha,
You could handle the InitializeRow and set the Tooltip on the cells on the server side. If you want to do it client side that is fine, but you'll need to go through the child grids. Each row has row.get_rowIslands() which returns an array. Then you would need to get childGrid = row.get_rowIslands()[0] and do the same thing. If you know your levels, you could hard code it. If it is variable, I suggest turning this code into a recursive method where you pass in a grid to set tooltips for, then recursively call it with child grids.
regards,David Young
Can you provide a code snippet on how to do it on the server side on IntializeRow event for both Parent rows and child rows.
Hello Megha,
Please refer to the below forum posts
http://news.infragistics.com/forums/p/48340/256954.aspx#256954
http://news.infragistics.com/forums/p/49969/263950.aspx#263950
In your scenario you should handle this event in WebHierarchicalDataGrid
Hope this helps.