I'm trying to work out why my code isn't working with the "control_name.EmptyMessage = message" type command from server side code. It works when running in the initial page load but then on ajax calls it doesn't set the fields.
Is there a known bug with the emptymessage commands or will I need to post some code?
12 Answers, 1 is accepted
We haven't such a known bug with the EmptyMessage property of RadComboBox. Could you please send us a sample which demonstrates the issue to examine it locally?
the Telerik team
Short of posting the whole page code on the forum (which I'd prefer not to do) is there an email address that I can send the code to?
I'd suggest you open a formal support ticket and send us a simple running project (incl. your custom skin, CSS, images, DB backup if needed and so on) demonstrating the problem (and step-by-step instructions on doing so). In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.
the Telerik team
I'll post some relevant bits of the code here as I don't have the time to rebuild the page in a simpler format :(
It now looks as though this issue affects the SelectedValue field as well as EmptyMessage so I suppose that it is something quite basic and will affect more fields in the control. The really odd thing is that the data in the control gets populated just fine but anything else doesn't work.
Essentially I've got multiple cascading drop downs and they are all setup using your methods posted on this site.
In the following code the LoadClients is triggered from the PageLoad event and using a ClientID value from the DataBound event I can get that to select the existing value and if necessary set the emptyMessage. LoadClients calls LoadComboBox to do the database load.
It's all very fustrating as the effort to get cascading drop downs working is pretty immense. This is the last hurdle for me now.
Thanks in advance for any help!
PS. It's worth noting that this post below is similar although it seems to indicate that a fix was due (I have the most recent version - 2009.1.402.35)
We tried to reproduce the problem at our samples, but without much success. Please find attached our test files for details. Is it possible to modify them so we to be able to see the exact problem locally?
the Telerik team
They work fine! Typical.
I suspect that the problem revolves around me having to use the DirectCast as the control is within a formview and hence the code behind can't see the control except via a search (Dim uxRadComboBox As RadComboBox = DirectCast(uxFormView.FindControl(comboBoxControl), RadComboBox))
I'm stuffed for time now so can't play with the code much for now.
Your example did show me one thing that has given me a good work around. I was assuming that because of the load triggering a child load that I couldn't put the children into the PageLoad. In your example you did that and it worked. As such I've had a stab and it works fine for me. I suppose that it's in the name isn't it - onclientselectedindexchanging? Client - not server.
Given that the controls are now populated in the initial server page load, the font problem has also disappeared! I wonder if the problem stems from the fact that the child controls don't get setup properly when the page loads initially (no databinding done on them).
The following is the Contact drop down box that is affected by the problem:
If I get time over the next few weeks I'll try and look into it some more.
Thanks for the assistance,
I found a similar issue when using client-side api to change the empty message.
After some trying I found that the method of set_emptyMessage by itself will not update the empty message of radcombobox, but if you call clearSelection method on client-side, then the new empty message will show for the radcombobox.
I am using Q3 2015 version. May be a Telerik support professional can confirm this.
Could you please open a support ticket and send us your complete code, which will help us to understand the problem better?
You are right.
Actually in my scenario, I had 2 RadComboxes with checkboxes, and when I transfered checked items on client-side from one to another, I did not uncheck these items when adding tto the second RadComboBox. By calling clearSelection, it seems the items added to second RadComboBox got unchecked which then displayed the empty message. If I did not call clearSelection method on second RadComboBox, then it showed an empty text and also no empty message.
As I already mentioned below we are not sure about the exact your scenario. This particular solution works for your case, but it is not necessary in general.
Please send us a sample project which demonstrates the issue to investigate it locally.