Hello team,
hope you are well.
I have an urgent requirement. I am trying to have checkboxes in one of the dynamically generated columns. So I use the following code in the attached sample:
CheckBox check1 = new CheckBox();check1.IsChecked = true;
employee.SecondName = check1;
Employees.Add(employee);
But when I run the application I get a string value in the xamdatagrid cell instead of the actual checkbox. Please advise how to resolve this. Thank you.
Best regards,
Sherif
Hello Sherif,
Thank you for your post. I have been looking into I and the sample you have attached and I modified it, so now it works as you want. Basically I set the employee’s SecondName property to a Boolean value and set the Field’s EditorType to XamChakEditor. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
How can i get checked/unchecked value with row and column header name?
Hello Stefan,
Thank you for your reply. However, I don't think this will work for my case. Can this be done without setting the xamdatagrid field types?
In my case, I have a xamdatagrid which populates a number of rows. All these rows are expandable, thus, once you click on a row, a number of subrows will be displayed under the parent row. The number of columns varies for subrows under each parent row. So one parent row, can have a number of subrows with only the second name column, while another parent row might have subrows with secondname, thirdname, fourthname, etc... Therefore I dont think I can solve it by setting the properties of the xamdatagrid, because the number of boolean columns in subrows will vary for each parent row within the same xamdatagrid. Please advise what should be done.
Thank you Stefan, your assistance is truly appreciated.