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

Select Parent/Child with Customized Control Views

7 Answers 92 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Coldapoy
Top achievements
Rank 2
Coldapoy asked on 23 Jul 2008, 06:02 AM

HI!, Hope my TITLE is right... not pretty sure.....Is there a way i could achieve this and have the same functionality with this rather than doing checkboxes="true" because i will be using both radio button and checkbox. the controls depend on the parameter of the parent form in which for example when i call Form A. radiobutton will appear and when i call Form B checkbox will appear. 

I could not implement the example we have here at the site and it only take effect when i enable checkboxes="true". i have successfully bind the labels with the database to the radtreeview but the two control event are not. hope you could help me out with this one.. been trying a lot of ways for days.  :-(

below is a sample of my code hope you guys could understand it. :-)

thanks in advance and more power to telerik.......
    
.ACSX Code

<telerik:RadTreeView ID="_uscRadTrvSelectAuthority" runat="server" skin="Office2007" checkboxes="true" on>
<NodeTemplate >  <asp:RadioButton ID="_uscRBtnSeleAuth" runat="server" Visible="false"/>
<asp:CheckBox ID="_uscCboxSeleAuth" runat="server" Visible="false"/> <asp:Label ID="_uscLblSeleAuth" runat="server"> </asp:Label>
</NodeTemplate>
<CollapseAnimation Type="OutQuint" Duration="100"></CollapseAnimation> <ExpandAnimation Duration="100"></ExpandAnimation>
 </telerik:RadTreeView> 

.CS Code

string pfid = Request.Params["pfid"];
        if (pfid == "Pop1")
        {          ((System.Web.UI.WebControls.CheckBox).Node.FindControl("_uscCBoxSeleAuth")).Visible = true;
        }
       else if (pfid == "Pop2")
       {          ((System.Web.UI.WebControls.RadioButton).Node.FindControl("_uscRBtnSeleAuth")).Visible = true;
        }
        ((System.Web.UI.WebControls.Label)e.Node.FindControl("_uscLblSeleAuth")).Text = e.Node.Text;

7 Answers, 1 is accepted

Sort by
0
Coldapoy
Top achievements
Rank 2
answered on 24 Jul 2008, 03:34 AM
anyone?
0
Atanas Korchev
Telerik team
answered on 24 Jul 2008, 07:14 AM
Hello Coldapoy,

Unfortunately I cannot understand your question. Could you please elaborate? Ideally you could open a support ticket and send us a sample project demonstrating the problem. Thanks.

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Coldapoy
Top achievements
Rank 2
answered on 24 Jul 2008, 08:06 AM
just got a work around with my problem but i have another question

is it possible i could hide the property checkboxes="true"

in the code behind? and bring it back if ever in an button event?
0
Atanas Korchev
Telerik team
answered on 24 Jul 2008, 08:08 AM
Hi Coldapoy,

Yes, it is possible to set the CheckBoxes property to true from codebehind.

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Coldapoy
Top achievements
Rank 2
answered on 24 Jul 2008, 09:06 AM
hi, thanks for the fast response..

can you give me a sample line in the client and code behind of it?
0
Atanas Korchev
Telerik team
answered on 24 Jul 2008, 09:10 AM
Hi Coldapoy,

Setting the CheckBoxes property can be done only on the server-side. You can set it as any other boolean server-side property:

RadTreeView1.CheckBoxes = true

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Coldapoy
Top achievements
Rank 2
answered on 24 Jul 2008, 09:32 AM
thanks, i'll try it as soon as i get this error on databinding..

i've posted to the other thread hope you could help me with it too. thanks in advance...

http://www.telerik.com/community/forums/allthreads/b312H-h.aspx
Tags
TreeView
Asked by
Coldapoy
Top achievements
Rank 2
Answers by
Coldapoy
Top achievements
Rank 2
Atanas Korchev
Telerik team
Share this question
or