
I have a comma separated field of payment options in a database and for each option I want to generate a checkbox and label see attached picture
6 Answers, 1 is accepted

Hi Donald,
Such a result can be achieved with the use of a List that will serve as a container for the checkbox items.
If I understand correctly, the data field looks something like this:
"data":"Credit,Cash,Debit,Cheque"
If that's so, please follow the steps below:
1. Add a List and set its DataSource property.
2. Create a Checkbox for each item, in our case that would mean that we need to create 4 checkboxes.
3. To have each textbox display the correct text, set its Text property to the following expression:
= Item(0, Split(",", Fields.data))
There are a couple of things happening here. The Item function accepts two arguments - index and a collection(array). it then returns the element of the collection with the given index(zero-based). We use the Split function, which returns a string array that contains the substrings in this instance that are delimited by the specified separator, to split the Fields.data string into a string array that we provide to the Item function. We use that function for each checkbox with the corresponding index to get the Cash, Debit, Credit, Cheque values.
By default, the checkboxes will be displayed with the image for the Indeterminate value, to display the checkboxes as unchecked set their Value field to False.
I have attached a sample report that you can use as a reference for completing this task.
Please let me know if you need further assistance.
Regards,
Dimitar
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

I have it working sort of. I have created a table with a 2 textboxes and a check box, I have the first textbox as the text (ie Cash, Credit, etc) and the checkbox being checked based on whether or not there are fees with corresponding payment method. It also shows a checkbox for each item if I add or delete payment options. Only downside is it is going up and down instead side to side. You can see it in the picture attached the top part is all static text. Whereas the bottom table is generated. If I could do that it would be fantastic, however if not I can make it work.
Hello Donald,
It is possible to change the direction of the table by right-clicking on it and then selecting Rotate Layout.
Also, from what I understand you currently have a separate textbox for the text of the Checkbox. That however is not required, the Checkbox item has a Text property that you can use to set the text to be displayed next to the checkbox image. For more information, please have a look at the CheckBox Properties API.
I have attached a sample report with what I believe to be the desired result and a short video that you can use as a reference.
I hope that my reply is useful to you, don't hesitate to ask again if there is anything else that is unclear.
Regards,
Dimitar
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

