I have tried various hacks to set the selected index to a different value, and then set it back, but that changed nothing.
I'm using 2010 Q3 (when I upgraded to the 2011 Q1 version the RadTreeView no longer functioned properly and I didn't have the time to figure out why. All I know is that a call to the RadTreeView.Clear() method caused a null object exception that did not happen with 2010 Q3).
The only event I monitor is the selected index changed event. I don't need it to fire if the index doesn't change, so there was no need to monitor another event.
All I'm doing on a load is to say something like:
radDropDownList.Items.Clear();
for (int i = 0; i < matrixDateCount; i++)
{
entry =
new RadListDataItem();
entry.Text =
ConversionMethods.GetDropDownListFormatDateTime(this.allMatrixDateTimes[i]);
radDropDownList.Items.Add(entry);
}
Any suggestions would be welcome.
21 Answers, 1 is accepted
Thank you for writing and for the provided code snippet.
However, I was not able to reproduce the described behavior with my test project using versions Q2 2011 and Q3 2010. Could you modify my sample project in order to reproduce the issue? Please note that you should open a new support ticket in order to be able to attach the modified version of my project.
I am looking forward for your response.
Peter
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
I just discovered something else, though. I almost always running in debug mode, so issues like this stand out. When I install the project, and run it that way, I don't have the problem. That means it's a minor annoyance to me when I'm developing, but not to anyone else who will be using the product in the field.
So, I consider the issue closed.
Thank you for writing back.
If you find what is causing the described behavior, please share this information with us. This will allow us to address any potential issue. If you are not able to find the reason for the wrong behavior, but you can reproduce it in a project of yours, please send us this project so that we can investigate it. Please note that you have to open a new support ticket in order to be able to attach your files.
Thank you for the cooperation.
Peter
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
Private
Sub
cboSalutationID_PopupOpening(sender
As
Object
, e
As
System.EventArgs)
Handles
cboSalutationID.PopupOpening
Dim
pWidest
As
Int32 = 0
Dim
container
As
DefaultListControlStackContainer =
DirectCast
(
Me
.cboSalutationID.DropDownListElement.ListElement.Children(0), DefaultListControlStackContainer)
Try
For
Each
item
As
RadListVisualItem
In
container.Children
Dim
tParams
As
New
Telerik.WinControls.Primitives.TextParams()
tParams.text = item.Text
If
item.GetTextSize(tParams).Width > pWidest
Then
pWidest = item.GetTextSize(tParams).ToSize().Width
End
If
Next
Me
.cboSalutationID.Popup.MinimumSize =
New
Size(pWidest, (
Me
.cboSalutationID.Items.Count * 16) + 2)
Catch
ex
As
Exception
Throw
Finally
End
Try
End
Sub
Private
Sub
cboSalutationID_PopupOpened(sender
As
Object
, e
As
System.EventArgs)
Handles
cboSalutationID.PopupOpened
Dim
pWidest
As
Int32 = 0
Dim
container
As
DefaultListControlStackContainer =
DirectCast
(
Me
.cboSalutationID.DropDownListElement.ListElement.Children(0), DefaultListControlStackContainer)
Try
For
Each
item
As
RadListVisualItem
In
container.Children
Dim
tParams
As
New
Telerik.WinControls.Primitives.TextParams()
tParams.text = item.Text
If
item.GetTextSize(tParams).Width > pWidest
Then
pWidest = item.GetTextSize(tParams).ToSize().Width
End
If
Next
Me
.cboSalutationID.Popup.MinimumSize =
New
Size(pWidest, (
Me
.cboSalutationID.Items.Count * 16) + 2)
Catch
ex
As
Exception
Throw
Finally
End
Try
End
Sub
I imagine something similar would work to ensure focus was properly set on a dropdownlist every time it was opened.
Thank you for sharing your solution with the community. I am sure that the others will benefit from it.
If you have feedback to share or if you have questions, feel free to write back.
Best wishes,
Peter
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
I am experiencing this same problem. I too noticed that when I ran the application from the compiled .exe file the problem did not occur. It only occurred when running in Visual Studio. Also, removing the theme on the control caused the problem to temporarily go away but then it came back after I ran the application a couple times. I was using the Office2007Black theme. I have also not been able to build a stand alone project to re-create the issue. Something seems to have happened during the upgrade to 2011 Q2.
Mike
Thank you for writing.
As Peter mentioned in one of the previous posts, we are unable to reproduce the issue. I would suggest trying Don's solution. If it does not work, I would ask you to send us your project through a support ticket. Once we are able to reproduce the issue on our side, we will do our best to find a solution.
Should you have further questions I would be happy to help.
Best wishes,
Ivan Petrov
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
Thank you for sharing this with us.
As my colleague Ivan mentioned in his response we are still unable to reproduce the issue, hence investigate it. We will greatly appreciate it if you can open a new support ticket and send us a sample project (or your real project) where the issue occurs. Without this information, it seems that we will not be able to reproduce the described behavior and address it in our future releases.
Thank you for the cooperation.
Greetings,
Peter
the Telerik team
Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.
Project -> Properties -> Debug -> Enable Debuggers -> Uncheck "Enable unmanaged code debugging".
Thank you for writing and for the provided information.
These are handled exceptions and probably this exception does not mean an error, because the unmanaged code should throw this exception.
Thank you for your cooperation.
Peter
the Telerik team
SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).
Thus... I don't understand your answer.
So let me explain it again:
If we check "Enable unmanaged code debugging" in our project. Your combobox doesn't work anymore on the first click. We need to get our cursor out of the combobox area and come back to select the item. (Same thing for ContextMenu).
If we uncheck "Enable unmanaged code debugging" in our project, your combobox works.
I haven't say that there is an exception of any sort. It just reacts that way.
It is also why, it doesn't act this way in "Release" mode.
Despite my efforts I am still unable to reproduce the issue even when I turned on the Unmanaged Exceptions. Could you please refer to the attached video?
Could you share the problematic project with us? This will greatly help to reproduce the issue and assist you further. Please note that you have to open a new support ticket in order to be able to attach your project.
Peter
the Telerik team
SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).
This bug happened in 2011.1 and maybe previous releases.
Thank you.
We released many fixes, enhancements and new features in the latest version, but we did nothing deliberate towards this issue, so probably this is a consequence of another optimization. Still, I am glad that you do not experience it anymore.
Do not hesitate to contact us if you have other questions.
Peter
the Telerik team
SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).
I used 2011 Q3 and 2012 Q1 and that problem still appears.
This is only available, as Simon noted, when "Enable unmanaged code" is checked.
I also attached working sample, where you can start project and then expand list and try to click, for example, on second item. And then try to open it again, and then you could click on it.
Raitis
I uploaded it here - http://failiem.lv/u/crikjtz
Thank you for contacting Telerik support and for the provided sample project.
We cannot reproduce the case (refer to the attached movie) and determine what the reason for the error is, but the nature of the error (when "Enable unmanaged code" is turned on) leads us to the conclusion that this is a handled exception and this exception does not mean an error.
Do not hesitate to contact us if you have other questions.
Peter
the Telerik team