Always first Item is Selected

10 posts, 0 answers
  1. Santosh Kannan
    Santosh Kannan avatar
    10 posts
    Member since:
    Jun 2010

    Posted 09 Jun 2010 Link to this post

    Hi,

    I implemented a cascading dropdown exactly like in this example multiplecomboboxes

    The issue im facing is that the SelectedItem in ServerSide code is always the first item in the ComboBox. No matter which item is selected the SelectedItem is always the first item in the ComboBox. In the javascript though the selecteditem is captured correctly.

    The values are confirmed to be unique values.

    I am using the Radcontrols version 2010.1 519
    Kindly advice how to resolve this issue.



  2. Dimitar Milushev
    Admin
    Dimitar Milushev avatar
    555 posts

    Posted 10 Jun 2010 Link to this post

    Hello Santosh,

    The SelectedItem property should work as expected, but it is possible that there is something specific to your approach that prevents it from working. Can you please open a support ticket and send us a sample project so we can inspect your code and advise you on how to resolve the problem.

    Sincerely yours,
    Dimitar Milushev
    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.
  3. Santosh Kannan
    Santosh Kannan avatar
    10 posts
    Member since:
    Jun 2010

    Posted 14 Jun 2010 Link to this post

    This happens in MOSS environment. I am unable to create a sample project since it is in Sharepoint environment.

    Please advice.

    Thanks.
  4. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 15 Jun 2010 Link to this post

    Hello Santosh Kannan,

    We would be unable to help you unless we see at least the code that involves the RadComboBoxes.

    Could you please either paste it here or open a support ticket and send us the Web Part which holds the RCBs? (Please include all code which is related to the RCBs.)

    Sincerely yours,
    Simon
    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.
  5. Santosh Kannan
    Santosh Kannan avatar
    10 posts
    Member since:
    Jun 2010

    Posted 20 Jun 2010 Link to this post

    Hi Dimitar & Simon,

    I did raise a support ticket and there is no response yet. Anyway i will post the details here as well and please do help to resolve the issue. Support Ticket ID: 319800 has sample code.

    I am facing these issues when using RadComboBox in sharepoint environment,

    Issue 1:

    When the RADComboBox has its DataSourceID property set, i have a Default Item and AppendDataBoundItems set to true and EnableViewState Set to False.

    When this is the case the selected item is always --Select-- which is the default item, even though the ComboBox is populated with items from SP List and selected item is different.

    Issue 2:
    In order to overcome this what i tried is to populate the ComBoBox when Add or Edit action for the Grid is triggered, but the error

    Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.

    is thrown.

    The scenario here is that RADComboBox DataSourceID is not set, databinding is done during InitInsert or Edit action of the grid. I have SelectedValue set to '<%# Bind("Column Name") %>' this is for Edit action. Of Course if this is removed then the Insert action works, but i am using an EditForm template which is automatically used for Insert too. Which is how i want it to be.

    Hope the issue is clear. I want either issue 1 or 2 to be resolved. Have attached pieces of codes where this issue is occurring.

    Please advice.


  6. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 22 Jun 2010 Link to this post

    Hi Santosh Kannan,

    We investigated the code you sent in the support ticket on the same matter and found that that the first issue is actually a bug.

    We logged it in our bug-tracking system and will fix it in the upcoming weeks.

    As a workaround you could bind the RadComboBox on each postback in the Init phase of the page:
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
     
        if (Page.IsPostBack)
            RadComboBox1.DataBind();
    }

    Kind regards,
    Simon
    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
  7. Santosh Kannan
    Santosh Kannan avatar
    10 posts
    Member since:
    Jun 2010

    Posted 22 Jun 2010 Link to this post

    Hi Simon,

    Thanks for the work around, but the RADComboBox is in the edit Form template of RADGrid, how can i reference this page_Init event? I find some examples for referencing controls inside RADGrid but they are in a Grid event.

    Pls advice.

    Thanks.
  8. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 23 Jun 2010 Link to this post

    Hello Santosh Kannan,

    You can use the Grid's Init event which fires (almost) at the same time and is also convenient for the data bind operation.

    Kind regards,
    Simon
    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
  9. Joel Reinford
    Joel Reinford avatar
    1 posts
    Member since:
    Aug 2008

    Posted 27 Jul 2010 Link to this post

    Has this bug been fixed in the Q2 release? I am experiencing a similar issue with Q2.
  10. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 27 Jul 2010 Link to this post

    Hi Joel Reinford,

    The issue is not fixed yet.

    Please vote for it here so that it moves up the priority list.

    Best wishes,
    Simon
    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