Hi,
I am using Infragistics iggrid control . In the Infragistics iggrid i want a column to have a checkbox and this checkbox is checked based on the data from the database and color change for checked row. Could you please guide me .
Hello Kiran,
Was my suggestion able to give you the functionality you were looking for? Please let me know if I can be of further assistance.
I have found a way for you to achieve the behavior you desire. All of the following instructions given in this post can be viewed through the sample I have provided, which achieves the functionality you are looking for.
In order to have checkboxes based on data from the database, you must first configure the column to display checkboxes. In the columns attribute of your igGrid, you will want to specify the row with checkboxes as having dataType: "bool". You will also have to add the renderCheckboxes attribute to the igGrid and set it to true. You will now see checkboxes in the specified column based on the Boolean data from the database.
To change the style of the checked rows, you can use the rowsRendered event and then check the value of the Boolean for each row. If the Boolean evaluates to true, we can manually set the className of that row to whatever CSS class you'd like. In the sample, I created a class 'Blue' inline with our HTML, and set the checked rows to have this class. You will notice that the conditional in the if statement of the rowRendered event evaluates MakeFlag. For your program, you will switch that to the Boolean variable that you will be evaluating for checkboxes.
I hope this helps clear things up for you. Please do not hesitate to contact me with more questions or for more information.
Thank you for contacting Infragistics!
We received your support reqest concerning checkboxes based on a conditional in the igGrid, and this case has been assigned to me. Infragistics is dedicated to helping you solve this issue. Our team and I have done an initial review of your case and I am looking into this functionality and will get back to you sometime tomorrow with information or questions for you.