Hi All,
I would like to add a custom attributes to each cell in ignite ui grid and attribute value should be the column header value and index value of grid.
e.g. <td Name='Niranjan' Day='1'></td>
Here in above example Name value should be the
Can anyone help me out?
Thanks in Advance!!
Regards,
-Niranjan V
Hello Niranjan,
I'm following to see whether you were able to resolve your issue.
Let me know if you have further questions regarding this subject.
Martin PavlovInfragistics, Inc.
Unfortunately I cannot guess what's wrong based on the outputted html. Can you please send me your grid configuration so I can run it on my side.
Also, can you check what version if the igGrid you're using by executing the following code in the browser console:
$.ui.igGrid.version
Best regards,Martin PavlovInfragistics, Inc.
Thanks Martin,
I have tried this but my cells are not populating correctly please see below html
<td day="1_AM"></td><td td="" <=""><td><td day="1_PM"></td><td td="" <=""><td><td day="2_AM"></td><td td="" <=""><td><td day="2_PM"></td><td td="" <=""><td><td day="3_AM"></td><td td="" <=""><td><td day="3_PM"></td><td td="" <="">
So I have used <span day='1_PM'></span> instead of <td></td> which works perfectly. Please see below html.
<td><span day="1_AM"></span></td><td><span day="1_PM"></span></td><td><span day="2_AM"></span></td><td><span day="2_PM"></span></td><td><span day="3_AM"></span></td><td><span day="3_PM"></span></td>
What would be the problem? What would be the solution? I dont want to use <span></span>
Could you please help me on this?
thanks in advance!!
Try using column template like this:
{ headerText: 'Column1' , key: 'Column1', dataType: 'number' , template: "<td Name='Niranjan' Day='1'>${Column1}</td>" }
From what you describe it looks like those values are static. If not, you can use hidden columns to get the data from them (using the fromat ${ColumnName} to reference the column in the template) and populate the attributes with dynamic data.
Hope this helps,Martin PavlovInfragistics, Inc.