load on request

4 posts, 0 answers
  1. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 10 Nov 2008 Link to this post

    I have a grid with 2 Radcombo's in it.  When a user makes a selection in the first drop down, I need to filter the values available in the second drop down based on the selection in the first drop down.  Are there any example projects that I can take a look at to give me some pointers ?
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 10 Nov 2008 Link to this post

    Hello Mark,

    Go through the following online demo which explains on how to populate a combobox on the SelectedIndexChanged event of another combobox when the grid is in EditMode. You can probably make modifications to the code and use it  according to your requirement.
    Accessing cells and rows

    Thanks
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 12 Nov 2008 Link to this post

    Ive followed the example and have got the basic functionlity to work ok.  There is a problem though.
    setting the autopostback property to true clears all precededing rows of data ! (but only the column the drop down is in)

    protected void RadGridArtistGenres_ItemCreated(object sender, GridItemEventArgs e)  
            {  
                if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
                {  
                    //the dropdown list will be the first control in the Controls collection of the corresponding cell  
                    RadComboBox list = (e.Item as GridEditableItem)["ddlArtistType"].Controls[0] as RadComboBox;  
     
                    //attach SelectedIndexChanged event for the combobox control  
                    list.AutoPostBack = true;  
                    list.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(list_SelectedIndexChanged);  
                }  
     
            } 

    Disabling these 2 lines keeps the row in but obviously removes the desrired functioality
    list.AutoPostBack = true;  
    list.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(list_SelectedIndexChanged);

    I have sceenshots of the result but cant see a way to post these on the forum
  5. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 12 Nov 2008 Link to this post

    Its actually not just the preceeding rows, but all the rows that are being cleared (but again only the column the dropdown is in)
Back to Top