HI All,
I am new to lightswitch html.
I have created a custom control and i am rendering in _render method.
myapp.Home.Group_render=function (element, contentItem) {
// Write code here.
var control = $("<div></div>").attr('id', "container1");
control.appendTo($(element));
control.chart();
};
My control is about to draw a graph, so i need to assign width for my control. so i have tried to get width of the div ("container1"), but it returning zero, then tried for parent, that is element, but no luck, i am again getting zero.
$(element).width();
But after rendering my control with some static width, i can able to see the width for the element (msls-ctl-group-custom-control)
in dom, which is less than my static value, so my control is showing out of the element div.
How to get the width of the element in _render method itself
Thanks in advance