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

Cannot select item's text

5 Answers 53 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Rycho
Top achievements
Rank 1
Rycho asked on 16 Sep 2008, 12:21 AM
Hi,

Is it possible to select a text displayed on RadPanelBarItem? I turned off autopostaback for each panelbar item and want to achieve some kind of selectable behaviour of each subnode.

Regards
Rycho

5 Answers, 1 is accepted

Sort by
0
Rycho
Top achievements
Rank 1
answered on 16 Sep 2008, 08:20 AM
Additionally I don't want to use template items

Rycho
0
Shinu
Top achievements
Rank 2
answered on 19 Sep 2008, 09:54 AM
Hi Rycho,

Try selecting the item in the OnClientItemClicked event of the RadPanelBar as shown below.

ASPX:
<telerik:RadPanelBar ID="RadPanelBar1"    runat="server" OnClientItemClicked="OnClientItemClicked" > 
           

JS:
<script type="text/javascript" language="javascript" > 
      function OnClientItemClicked(sender, args) 
      { 
       args.get_item().select(); 
       
      } 
    </script> 


Thanks
Shinu.


0
Rycho
Top achievements
Rank 1
answered on 22 Sep 2008, 09:03 PM
Thanks Shinu,

It started to work (errors disappeared) after some modifications:

    function OnClientItemClicked(sender, eventArgs)
    {
        eventArgs.Item.Select();
    }

but still I cannot reach my desired solution. Item's text was actually not selected at all (tried on IE7). Additionally I would like to select item's text partially just like you select a textbox content.

Rycho
0
Peter
Telerik team
answered on 23 Sep 2008, 08:01 AM
Hi Rycho,

Are you using the classic or the ASP.NET AJAX version of RadPanelBar? The code Shinu sent you will work for ASP.NET AJAX RadPanelBar, which is the type version you have specified.


Greetings,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Rycho
Top achievements
Rank 1
answered on 23 Sep 2008, 08:45 AM
Hi Shinu,

Correct. It was my mistake cause I still use classic ones. Do you have any idea how to fix it using classic RadControls?

Rycho
Tags
PanelBar
Asked by
Rycho
Top achievements
Rank 1
Answers by
Rycho
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Peter
Telerik team
Share this question
or