Hi Dinko and Team,
As I mentioned in my previous forum, The below code is working in VS 2022 with 2013.3.1.1127 where as throwing stackoverflow exception in VS 2022 with Telerk 2024.1.130.48. Out product code structure is like below and we cannot declare and initialize the datatable globally. If we did that the whole application will get impact . Hence could you please restrict the recursive call of Raddropdownlist.Datasource and Raddropdownlist.SelectedIndex also like Raddropdownlist.SelectedValue. Which I raised in my previous forum
public void fillIndustryProcess()
{
try
{
System.Data.DataTable dt1 = new System.Data.DataTable();
if (dt1.Columns.Count <= 0)
{
dt1.Columns.Add("Industry", typeof(string));
dt1.Columns.Add("ID", typeof(int));
dt1.Rows.Add("USA-0", 0);
dt1.Rows.Add("USA-1", 1);
dt1.Rows.Add("USA-2", 2);
dt1.Rows.Add("USA-3", 3);
dt1.Rows.Add("USA-4", 4);
radDropDownList2.DisplayMember = "Industry";
radDropDownList2.ValueMember = "ID";
}
radDropDownList2.DataSource = dt1; ;//Still stack overflow exception occurring when bind the radDropDownList
radDropDownList2.SelectedIndex = 0;
}
catch (System.ComponentModel.Win32Exception ex)
{
throw ex;
}
}
Thanks,
Maheswari
Hi Dinko and Team,
As I mentioned in the previous forum, We need fix for Raddropdownlist.SelectedIndex.
When we set SelectedIndex=5 or some value in selectedIndexchangedEvent then the recursive call is happening for SelectedIndex. So we need to restrict the recursive call for both Raddropdownlist.DataSource as well as Raddropdownlist.SelectedIdex.
private void radDropDownList1_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
{
fillIndustryProcess1(); // radDropDownList1.DataSource = dt; when we set Datasource the recursive call is occurring
radDropDownList1.SelectedIdex = 5; // radDropDownList1.SelectedIdex = 5; when we set Datasource the recursive call is occurring
}
public void fillIndustryProcess1()Old Forums in which , Telerik team fixed the RadDropDownList .SelectedValue.
Previous forums in which , Telerik team yet to fix for RadDropDownList.Datasource.
Thanks,
Maheswari
Hi Dinko and team ,
Tried to migrate from Visual studio 2010 project along with Telerik.WinControls.UI.dll - Version - 2013.3.1.1127 to Visual studio 2022 with Telerik.WinControls.UI.dll - Version 2023.1.314.
There are random stackoverflow exceptions throughout project. In older version Telerik 2013.3.1.1127 is working with no issues only in Visual studio 2022 Telerick 2023.1.314 creating issue.
Found the RadDropDownList is the root cause So
As Dinko | Tech Support Engineer Telerik suggested in forum tried the below code
cmbValveSize_SelectedIndexChanged -= cmbValveSize_SelectedIndexChanged;
cmbValveSize.SelectedValue = 3;
cmbValveSize.SelectedIndexChanged += cmbValveSize_SelectedIndexChanged;
The stackoverflow is got resolved at this point so we applied the same code wherever SelectedValue getting assigned throughout project but when we call recursive functions the SelectedValue is getting assigned as null since the assigned value is based on value member signature and datasource datatable also having value.
private void setComboBoxIndexChanged(RadDropDownList combobox, object selectedValue, Telerik.WinControls.UI.Data.PositionChangedEventHandler eventHandler)
{
if (eventHandler != null) { combobox.SelectedIndexChanged -= eventHandler; }
if (int.TryParse(Convert.ToString(selectedValue), out int result))
{
combobox.SelectedValue = result; //result having the value but assiging as null
if (combobox.SelectedValue == null && combobox.Name == "cmbValveSize")
{
DataTable dtValues = (DataTable)cmbValveSize.DataSource;
if(dtValues.Rows.Count > 0)
{
}
else
{
}
}
if (eventHandler != null) { combobox.SelectedIndexChanged += eventHandler; }
}
So what is causing in version 2023.1.314 RadDropDownList? why we need to do subscribe and unsubscribe for Telerik 2023.1.314 but not for Telerik 2013.3.1.1127 . What is the change between2013.3.1.1127 and 2023.1.314.
When is the change and Which version will overcome the stackoverflow issue in Visual studio 2022 after 2013.3.1.1127.? - Since we need the latest Telerik version for VS 2022 application.
Unsubscribe and subscribe is not a solution it is affecting the other functionalities of project.
Please suggest what we can do apart from Unsubscribe and subscribe.
Thanks,
Maheswari
Hi,
I have a RadDropDownList control in my WinForms window. Right now, when I click on this control for the first time since opening a window, the whole text inside RadDropDownList text box is selected. What I would like to happen is to just set cursor at the end of existing text with no text selection.
I tried handling most of the events for RadDropDownList (like GotFocus or Click) with:
private void OnGotFocus(object sender, EventArgs e) { SelectionLength = 0; SelectionStart = Text.Length; }
When I checked during debugging, the selection is properly changed by my method, but in the end the text is selected whole by something else after that.
How can I get no text selection when clicking first time into this RadDropDownList text box?
Any ideas?
Thanks
Wojtek
Hello,
I created a custom column and cell in my grid following the progress-bar example
https://docs.telerik.com/devtools/winforms/controls/gridview/cells/creating-custom-cells
But I have modified it so that I can view either a textBoxElement or a dropDownListElement depending on what data is in the cell. It all seems to work just fine until I scroll the grid. Scrolling visualy shuffles the data in the custom column. I've tried to take the cell-formatting route but without success. Is it possible to achieve this result somehow?
Public Class GridParameterValueElement Inherits GridDataCellElement Public Sub New(ByVal column As GridViewColumn, ByVal row As GridRowElement) MyBase.New(column, row) End Sub Private isInitialized As Boolean Private firstTimeIndexChanged As Boolean = True Private dropDown As RadDropDownListElement Private textBox As RadTextBoxElement Protected Overrides Sub CreateChildElements() MyBase.CreateChildElements() dropDown = New RadDropDownListElement() With { .DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList } textBox = New RadTextBoxElement() With { .Enabled = True, .ClickMode = Telerik.WinControls.ClickMode.Press, .ZIndex = -1 } If Me.Children.Contains(dropDown) Then Me.Children.Remove(dropDown) If Me.Children.Contains(textBox) Then Me.Children.Remove(textBox) Me.Children.Add(dropDown) Me.Children.Add(textBox) AddHandler dropDown.SelectedIndexChanged, AddressOf SelectedIndexChanged AddHandler textBox.TextChanged, AddressOf TextInBoxChanged 'AddHandler textBox.Click, AddressOf TextBox_Click End Sub Protected Overrides Sub DisposeManagedResources() RemoveHandler dropDown.SelectedIndexChanged, AddressOf SelectedIndexChanged RemoveHandler textBox.TextChanged, AddressOf TextInBoxChanged MyBase.DisposeManagedResources() End Sub 'Private Sub TextBox_Click(sender As Object, e As EventArgs) ' Dim test = sender 'End Sub Public Overrides Sub SetContent() MyBase.SetContent() If Me.RowInfo.Cells("DisplayValue").Tag IsNot Nothing Then If Not Me.isInitialized Then If Me.Children.Contains(textBox) Then Me.Children.Remove(textBox) With Me.dropDown .DataSource = Me.RowInfo.Cells("DisplayValue").Tag .ValueMember = ("DevelopmentTypeParameterValueId") .DisplayMember = ("ParameterValue") End With End If If Me.RowInfo.Tag IsNot Nothing Then RemoveHandler dropDown.SelectedIndexChanged, AddressOf SelectedIndexChanged dropDown.SelectedIndex = DirectCast(Me.RowInfo.Tag, Integer) AddHandler dropDown.SelectedIndexChanged, AddressOf SelectedIndexChanged Else RemoveHandler dropDown.SelectedIndexChanged, AddressOf SelectedIndexChanged dropDown.SelectedIndex = -1 AddHandler dropDown.SelectedIndexChanged, AddressOf SelectedIndexChanged End If ElseIf Me.Value IsNot Nothing AndAlso Me.Value IsNot DBNull.Value Then If Not Me.isInitialized Then If Me.Children.Contains(dropDown) Then Me.Children.Remove(dropDown) Me.textBox.Text = CStr(Me.Value) End If End If Me.isInitialized = True End Sub Protected Overrides ReadOnly Property ThemeEffectiveType() As Type Get Return GetType(GridDataCellElement) End Get End Property Public Overrides Function IsCompatible(ByVal data As GridViewColumn, ByVal context As Object) As Boolean Return TypeOf data Is GridViewParameterValueColumn AndAlso TypeOf context Is GridDataRowElement End Function End Class Public Class GridViewParameterValueColumn Inherits GridViewDataColumn Public Sub New(ByVal fieldName As String) MyBase.New(fieldName) End Sub Public Overrides Function GetCellType(ByVal row As GridViewRowInfo) As Type If TypeOf row Is GridViewDataRowInfo Then Return GetType(GridParameterValueElement) End If Return MyBase.GetCellType(row) End Function End Class
Hello everyone, I have hidden the radApplicationMenuButton control. The hiding method is as shown in the figure above, but when I run the program, I find that the hidden control is still displayed. I want the ribbonTabFile control on the right to be displayed directly from the far left. , how should I set up, thank you!
Best regards,
Kevin
Hai,
How to add icon or image on right side of the raddropdowlist ?
I am dynamically added dropdowlist via code and i need to add icon on right side of the control (inside the control) ,In textbox i can add, like this i want to add icon, here i attach screenshot.
Thanks and Regards
Aravind
Hello everyone, I want to turn off the hidden function of the ribbonTab drop-down interface after double-clicking the mouse in Telerik's radRibbonBar control. How can I change it? I rewrote the double-click event of the ribbonTab and found that it has no effect. After double-clicking the ribbonTab, it will still be hidden. Thank you.
private void radRibbonBar1_Load(object sender, EventArgs e)
{
foreach (var tab in radRibbonBar1.CommandTabs)
{
tab.DoubleClick += new EventHandler(ribbonTab_DoubleClick);
}
}
private void ribbonTab_DoubleClick(object sender, EventArgs e)
{
// do nothing
}
Hi,
When the Chinese input method is used, a Chinese word is generated after the space key is pressed. For example, if you enter j, i, a, n, c, h, a, and then press space, you will get "检查". I want to filter "检查" as a filter word. What should I do? Thanks.