combobox set to default like pageload after save and page refresh

3 posts, 1 answers
  1. Swapnil
    Swapnil avatar
    96 posts
    Member since:
    Aug 2013

    Posted 24 Sep 2013 Link to this post

    Hi,
    using combobox and want to stay at default text like select user type after page refresh and data save completed
     <telerik:RadComboBox ID="cmbusertype" runat="server" Width="280px" ExpandAnimation-Type="OutBounce"
                                Skin="WebBlue">
                                <DefaultItem Text="Please Select User Type" Value="-1" />
                            </telerik:RadComboBox>

    Thanks
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 24 Sep 2013 Link to this post

    Hi Swapnil,

    You can try the following C# code to set the DefaultItem as the selected item of the RadComboBox after saving the data using server side code.

    C#:
    protected void SaveAndRefreshButton_Click(object sender, EventArgs e)
    {
        //your code to save data.
        cmbusertype.DefaultItem.Selected = true; //setting the default item as the selected one.
    }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Swapnil
    Swapnil avatar
    96 posts
    Member since:
    Aug 2013

    Posted 24 Sep 2013 Link to this post

    Hi shinu thanks a lot just see my this question i am not able to resolve it
    Thanks

    http://www.telerik.com/community/forums/aspnet-ajax/grid/validation-to-radgrid-in-editmode-with-radwindow.aspx
Back to Top