Using client side code

7 posts, 0 answers
  1. cayates
    cayates avatar
    71 posts
    Member since:
    Feb 2007

    Posted 17 Aug 2009 Link to this post

    Hello, I'm trying to use client side code, however, whenever I add a client side event I get this javascript error:

    Telerik.Web.UI.RadListBox is undefined

    I've tried using RegisterWithScriptManager, that didn't help.  My script manager is in a master page file, if that makes a difference.

    Please help, thanks.


  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 17 Aug 2009 Link to this post

    Hello cayates,

    Please post here some relevant code so we can try to find where is the problem.

    Best wishes,
    Veselin Vasilev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. cayates
    cayates avatar
    71 posts
    Member since:
    Feb 2007

    Posted 17 Aug 2009 Link to this post

    One other thing is that it's inside the form template of a RadGrid, which may make a difference.

    <EditFormSettings EditFormType="Template"
                                    <FormTemplate> 
                                        <table class="formRow"
                                            <tr style="height: 36px;"
                                                <td class="inputFieldLeft"
                                                    <div class="inputFieldLabel">Type</div> 
                                                    <telerik:RadListBox ID="ParticipantType" runat="server" Width="160" Height="150" 
                                                        CheckBoxes="true" DataSourceID="ParticipantTypes" DataTextField="Name" DataValueField="Value" 
                                                        /> 
                                                </td> 
  5. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 18 Aug 2009 Link to this post

    Hello cayates,

    I cannot see any client-side events nor javascript code.

    The more information you share with us - the faster resolution for you.

    Kind regards,
    Veselin Vasilev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 18 Aug 2009 Link to this post

    Hi,

    Inorder to access the RadListBox in a client event, you can try using the following code:

    js:
    var listbox = $telerik.findElement($get("RadGrid1"), "ParticipantType");

    -Shinu.
  7. John Banian
    John Banian avatar
    1 posts
    Member since:
    Feb 2010

    Posted 23 Apr 2010 Link to this post

    ASP.NET->RadGrid-><FormTemplate>.->RadListBox  with CheckBoxes="true"

    I am using RadListBox  with CheckBoxes="true" inside RadGrid <FormTemplate>.

    I am using ObjectDataSource to bind the data to RadListBox.
    Queries:
    1. How to retrive checked values from the RadListBox  which is inside
    <FormTemplate> from Codebehind using c#..
    2. How to set the checkboxes checked using the saved Table values  from Codebehind using c#.
    3. I did not bind RadListBox to RadGrid Columns.  I am not using DataField property to bind to RadListBox.

    Do you have any sample codes?

    <EditFormSettings EditFormType="Template"> 
                                    <FormTemplate> 
                                        <table class="formRow"> 
                                            <tr style="height: 36px;"> 
                                                <td class="inputFieldLeft"> 
                                                    <div class="inputFieldLabel">Type</div> 
                                                    <telerik:RadListBox ID="ParticipantType" runat="server" Width="160" Height="150" 
                                                        CheckBoxes="true" DataSourceID="ParticipantTypes" DataTextField="Name" DataValueField="Value" 
                                                        /> 
                                                </td> 

  8. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 28 Apr 2010 Link to this post

    Hi John Banian,

    As an attachment you can find sample project that demonstrates:

    1) how to obtain the RadListBox's checked items
    2) how to check RadListBox items using C#.

    Kind regards,
    Genady Sergeev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017