Listview Multiline Template with Checklist

Hi

I have created a listview that uses a Multiline Template to show data on 3 lines.  I have also got 

showCheckBox="true" 

and

checkBoxPosition="Left"

But the Checkbox now appears at the Top.

  1. Is there a way to get the Checkbox to appear to the left of the 3 lines.
  2. Is there a way to enlarge the Checkbox/make it a circle.

Thanks



1 Reply

IL Indhumathy Loganathan Syncfusion Team July 27, 2023 12:44 PM UTC

Hi David,


Query 1: Is there a way to get the Checkbox to appear to the left of the 3 lines.


You can use the ListView Template support to render the checkbox in the number of lines rendered within the ListView. Check out the below code snippet.


@{

    var template = "<div class='settings e-list-wrapper e-list-multi-line e-list-avatar'>"

           + "<input type='checkbox' value='1' id='checkboxFourInput' name='' /><span class='e-list-item-header'>${Name}</span>"

           + "<input type='checkbox' value='1' id='checkboxFourInput1' name='' /><span class='e-list-content'>${content}</span>"

               + "<input type='checkbox' value='1' id='checkboxFourInput2' name='' /> <span class='e-list-avatar'>${css}</span>"

                       + "</div>";

}


Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Core402737689


Query 2: Is there a way to enlarge the Checkbox/make it a circle.


In the above code, we have only enabled the native checkbox. You can customize the shape to circle by referring to the below blog.


https://stackoverflow.com/questions/37832505/how-to-make-a-checkbox-in-circle-shape-with-custom-css


Also, we suggest you include the Radio button instead of checkbox to meet your requirement. Please get back to us if you need any further assistance.


Regards,

Indhumathy L


Loader.
Up arrow icon