We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Change Font ejTreeView

We use the ejTreeView in LightSwitch HTML. It works fine. Now we want to Change the font for the Checkbox and the text. How can we do this?

Regards

j.nord



1 Reply

SN Sasikala Nagarajan Syncfusion Team August 13, 2015 02:27 PM UTC

Hi Nord,

Thanks for using Syncfusion products,

We have analyzed your query and we can achieve your requirement by overriding our default CSS of our controls. Please refer the below code snippet to change the font properties of the node text.

[css]
.e-treeview .e-text {
 font-size :20px;
 font-family:"Arial";
 }


Please use given code snippet in your CSS file to achieve your requirement. Also, to change the size of the check box we have provide the property called “ size” in checkbox control. Please refer the below code snippet to set the size of the checkboxes of TreeView nodes.

[script]


<script type="text/javascript">

var obj;

$(function () {

$("#treeView").ejTreeView({ showCheckbox: true ,cssClass:"customcss"});

obj = $("#treeView").ejTreeView('instance');//object of the treeview

var checkbox = obj.element.find("li >div input.nodecheckbox");//get all the check box from treeview

checkbox.each(function() {

var checkobj = $(this).data("ejCheckBox"); // object of the check box control

checkobj.option("size","medium");//setting the size to checkbox

});

});

</script>


We can set “small” and “medium” size to check box control using this proprerty. Please check with the given solution and if we misunderstood your query please give more information about your requirement this will help us to provide you a better solution
Regards,
Sasikala Nagarajan

Loader.
Live Chat Icon For mobile
Up arrow icon