This is a migrated thread and some comments may be shown as answers.

set_checkable(true) places checkbox after image

3 Answers 109 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
João
Top achievements
Rank 1
João asked on 18 Oct 2011, 01:11 PM
Hello. I'm a first timer, so please be gentle.

I'm having a peculiar behaviour when I show a previously omitted checkbox for a given node: Basically It places automatically the checkbox after the image for the node. I load the nodes on demand.

<telerik:RadTreeView ID="TreeViewTest" runat="server" CheckBoxes="true" LoadingMessage="Loading..."
    LoadingStatusPosition="BelowNodeText" MultipleSelect="false" AllowNodeEditing="false"
    OnClientNodePopulated="ClientNodePopulated" OnClientNodeChecked="ClientNodeChecked">
    <WebServiceSettings Path="TreeViewTest.aspx" Method="LoadTreeViewNodes" />
</telerik:RadTreeView>

Only thing I do on JavaScript: place node.set_checkable(false) when I want to hide the checkbox, and node.set_checkable(true) when I don't.

Is there a way for me to place the checkbox always before or after the image, so there is a continuity in the user experience (i.e. either in client-side or server-side)?

I attached 2 screenshots to demonstrate. Sorry for the blur.




3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 19 Oct 2011, 11:13 AM
Hello Joao,

One suggesstion is to create a NodeTemplate with CheckBox on the right-side and not make use of the default checkboxes in RadTreeView. Make sure that you handle all the events that are changing the state of the checkbox. Hope this helps.

Thanks,
Shinu.
0
João
Top achievements
Rank 1
answered on 19 Oct 2011, 05:27 PM
Hi Shinu. Thanks for the reply.

Ok, I guess that's one way to make it work. Any other suggestions? I though is could be possible through a CSS override of some sort, but I'm not sure how I could pull something like that.

Thanks.
0
Kate
Telerik team
answered on 24 Oct 2011, 10:15 AM
Hi João,

Can you please provide a live url where we can observe the issue or send us a support ticket with a simplified runnable project so that we can inspect it locally?

Best wishes,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
TreeView
Asked by
João
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
João
Top achievements
Rank 1
Kate
Telerik team
Share this question
or