How to refresh a RadGrid's EditForm

1 Answer 333 Views
Ajax AjaxPanel Grid ScriptManager and StyleSheetManager Window
Antoine
Top achievements
Rank 1
Antoine asked on 23 Jul 2021, 12:24 PM

Hi all,

I'm currently working with a RadGrid that as an EditForm in order to insert/update some data.  This EditForm is a popup, and inside this EditForm there is a button that open a RadWindow.

In this RadWindow there is a list of items. What I want to do, is when I click on one of those items, an id is sent from the RadWindow to the EditForm. This id is then displayed in a textbox.

I'm able to open the RadWindow from the EditForm, and then I'm also able to send the id from the RadWindow to the EditForm, but I'm not able to refresh the textbox.

I've tried to use an UpdatePanel/RadAjaxPanel on my EditForm but I've got an error message that tell me : 

Script control 'ControlName' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().

Parameter name: scriptControl

I've also tried to follow this article (that did not help) :

https://stackoverflow.com/questions/8517136/script-control-is-not-a-registered-script-control

I've attached the code of the RadGrid and EditForm

Hope someone can help :)

1 Answer, 1 is accepted

Sort by
0
Doncho
Telerik team
answered on 28 Jul 2021, 07:44 AM

Hi Antoine,

I tried to replicate the described problem but to no avail.

I have reviewed the provided code but I was not able to find what is causing the issue. To be able to troubleshoot this, we would need to have it replicated in a runnable sample that we can inspect. It would be very helpful if you use our Edit Form Types live demo as a basis, and modify its code so that it gets closer to the current scenario and also shows the problem.

I would also like to share some general resources that might be relevant to the case:

Looking forward to hearing from you.

Kind regards,
Doncho
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Antoine
Top achievements
Rank 1
commented on 28 Jul 2021, 08:25 AM | edited

Hi Doncho,

Thanks for your answer. Since I've posted my question, we've done some test inside another project which implies a different context and we were able to make it work. Nevertheless, we don't know what is causing the bug inside our website.

We suppose that this is our homemade code that is causing the problem rather than the Telerik's componants.

What is certain is that you've done all what you can to help us and now this is our responsability to find the source of the problem in our code. Can you just precise the three advices you gave me and/or link it to the code I shared with you ? If we can integrate the Telerik's componant in the best way, we will reduce the potential bug sources.
Doncho
Telerik team
commented on 02 Aug 2021, 06:52 AM

Hi Antonine,

In fact, I couldn't see any issues or eventual problems in the provided code. Otherwise, If I notice a problem, I would address it directly. The articles I have shared are describing common issues with usage of the RadAjaxPanel as you have such in the provided code. In short:

  • make sure to avoid nesting AjaxSettings
  • use RadScriptBlock or RadCodeBlock when adding scripts on a page with RadAjaxPanel or RadAjaxManager
  • "Getting a client-side reference.." is a very useful article when it comes to using the rich Client-side APIs of the Telerik controls, e.g. getting a reference to RadWindow to show/hide it on the client-side.

All the resources are generic and the same are not addressing any concrete issue in your code. I apologize if I have misled you, by sharing these. 

As to the current issue, we would be glad to help but we would need a runnable sample reproducing the problem that we could troubleshoot locally.

Tags
Ajax AjaxPanel Grid ScriptManager and StyleSheetManager Window
Asked by
Antoine
Top achievements
Rank 1
Answers by
Doncho
Telerik team
Share this question
or