Hi,
I'm using version 10.2 and C#. I have a grid that displays personnel records. I'm using a status column to show which records are available to be imported into our system and which ones are not (because they are missing some piece of information). The first column in the grid is a bool column so it displays checkboxes. The header of the column also has a checkbox so the user can select/unselect all. For the rows that can't be imported, I'm disabling the cell in the InitializeRow event based on specific criteria. The problem I have is when the user checks the header check box, all the checkboxes are getting checked and I only want the enabled check boxes (records that can be imported) to be checked. Is there a way to accomplish this?
Hi Dimitar,
Yes, it helped. I actually created a property to access the element so I could set whatever property I need to on it.
thanks
Mario
Hello Mario,
I am just checking about the progress of this issue. Did Milko's suggestion helped you resolve it? Let me know if you need any further assistance on this issue.
Thank you for using Infragistics Components.
Thank you for your feedback.
Yes, you may disable the check box. To do so you need to set its Enabled property to false. You can do this in AfterCreateChildElements method by adding this line of code:
if (aCheckBoxUIElement == null)
{
//Create a New CheckBoxUIElement
aCheckBoxUIElement = new CheckBoxUIElement(parent);
aCheckBoxUIElement.Enabled = false;
}
Please note this will disable the check box visually. To disable its action you need to remove the row where an event handler is attached to the check box. Look up AfterCreateChildElements method for this:
aCheckBoxUIElement.ElementClick += new UIElementEventHandler(aCheckBoxUIElement_ElementClick);
and comment or erase it. Please check the attached revised solution where I have add this logic.
Please let me know if you need any further assistance.
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=4883
Hi Milko,
I will contact the sales department.
Until I get the latest version, I found this article to implement the checkbox manually on the header. Is there a way to disable the checkbox in the header using this method?
You need to contact our sales department to receive this information. You may find the contact information for our sales department at the following link http://ko.infragistics.com/about-us/contact-us
Please let me know if you need any additional information related to Infragistics Controls.