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

RadComboBox in RadGrid with RadAjaxManager

2 Answers 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Leszek
Top achievements
Rank 1
Leszek asked on 25 Mar 2015, 11:06 PM
Hi,

I'm using a RadComboBox in a RadGrid with RadAjaxManager set on the grid. I have found this excellent example that does exactly what I need:
https://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/comboingrid/defaultcs.aspx

The caveat is that it uses ASP.NET Session to store the selected value from the RadComboBox. I can't use the Session object as my solution runs within SharePoint and Session is disabled by default (and discouraged to use) in SharePoint environment. I have tried to use a hidden field to keep the selected value with no luck - the selected value is not kept on post back.

Is there any other mechanism than ASP.NET Session that I could use to retain the selected value of a RadComboBox?

Thanks,
Leszek

2 Answers, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 30 Mar 2015, 11:24 AM
Hello Leszek,

When you are using a HiddenField control did you update it when the grid perform the request? If you are using a RadAjaxManager make sure you have a setting where the grid is the initiator and the HiddenFiled is the updated control. 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="HiddenField1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

Another possible solution is to persist the value in the ViewState.
ViewState["SupplierID"] = selectedItem.Value;

Regards,
Kostadin
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Leszek
Top achievements
Rank 1
answered on 06 Apr 2015, 07:09 PM

Thank you Kostadin. It's working fine.

 Leszek

Tags
Grid
Asked by
Leszek
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Leszek
Top achievements
Rank 1
Share this question
or