Telerik Forums
UI for WinForms Forum
1 answer
859 views

Hi,

I have a multi-column combobox that is data-bound to a binding source control.

Then in the form code I have the following lines:

Me.RadMultiColumnComboBox1.DropDownStyle = RadDropDownStyle.DropDownList
Me.RadMultiColumnComboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend
Me.RadMultiColumnComboBox1.SelectedIndex = -1

The last line, in particular, is important in our case because we want to prevent the selection of the first record by default. Everything works fine except when there's only one record in the list.

When that happens, the textbox element picks up the display member of the lone item as soon as the user clicks the drop-down arrow. The text remains after the pop-up closes even if the user does not explicitly select the solo record.  This gives the user the false impression that a value has been set, but in reality the underlying value is still null.

We then found out that the second line of code above is what is causing this unwanted behavior. When commented out, an MCCB with a single record does not exhibit the problem.

We would like to keep the SuggestAppend feature working (i.e., in the case of multiple records), so is there a way to resolve this issue without having to resort to checking the number of records in the list?

Dinko | Tech Support Engineer
Telerik team
 answered on 08 Apr 2022
2 answers
179 views

I thought there was a way on a radgridview that the user could hit B and be taken to the first entry where the B is. I thought i saw that the gridview was able to do that, but it doesn't seem to be working for me. It might be that i need to setup a custom keydown, not sure.

Thanks in advance.

Dinko | Tech Support Engineer
Telerik team
 answered on 08 Apr 2022
2 answers
1.1K+ views

Hello,

The feature is to Change the part of rows background-color based on a cell

I want to set the BackColor of a row to a specific color based on information from a field.

The structure is different from classic Winform.

Can you help me please ?

Jana
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 08 Apr 2022
1 answer
241 views

Hello Team,
We are using the Telerik control RadSpinEditor in our windows application. we have set the Maximum Property as 1000 & Minimum Property as -100 for the SpinEditor.

Property ScreenShot : https://prnt.sc/5djfulRc2gGM

So when i click the Upper arrow & Down arrow the values are set correctly.

My Issue : When i trying to type the value on spineditor its allow to type more number of values. but it should allow only 1000. Please help us to resolve this issue. Video link added for your reference.

Video link : https://suganya-gmail.tinytake.com/df/1267028/thumbnail?type=attachments&version_no=0&file_version_no=0&thumbnail_size=preview

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Apr 2022
1 answer
108 views

Hello, when my application adds items to the auto complete box pragmatically I turn them red. I wish to hide the X button so the user cannot remove them. Is this possible? I noticed there is a ShowRemoveButton property on the control but that seems like it is for all tokens?  Here is some of my code. Thank you for the assistance. 

Private Sub AddToken(ByVal ac As RadAutoCompleteBox, ByVal email As String)

        Dim result As EmailTokenObject = AllEmails.Find(Function(o) o.Email.ToLower = email.ToLower)
        If result IsNot Nothing Then
            Dim flag = False 'search for pre-existing items to make sure we don't add them double 

            For Each item As RadTokenizedTextItem In ac.Items
                If item.Value.ToString.ToLower = email.ToLower Then
                    flag = True
                End If
                Exit For
            Next
            If flag = False Then
                'this has to be called BEFORE we add the item to the textbox 
                PrePopulatedEmails.Add(result.Email) 'add to the prepopulated emails so we can color it in red and remove the ability to remove the item 
                'add the item 
                ac.AppendText(result.Name & ";")
            End If
        End If
    End Sub

    Private Sub acWatchlist_TokenValidating(sender As Object, e As TokenValidatingEventArgs) Handles acWatchlist.TokenValidating
        If acWatchlist.Text.Contains(e.Text) Then
            e.IsValidToken = False
        End If
    End Sub

    Private Sub acWatchlist_TextBlockFormatting(sender As Object, e As TextBlockFormattingEventArgs) Handles acWatchlist.TextBlockFormatting
        Dim token As TokenizedTextBlockElement = TryCast(e.TextBlock, TokenizedTextBlockElement)
        If token IsNot Nothing AndAlso PrePopulatedEmails.Contains(token.Item.Value, StringComparer.OrdinalIgnoreCase) Then
            token.GradientStyle = GradientStyles.Solid
            token.BackColor = Color.Red
        End If
    End Sub
Dinko | Tech Support Engineer
Telerik team
 answered on 05 Apr 2022
1 answer
356 views

Hello Team,
We are using the telerik RadGridView in our windows application.  In the grid we are having the header sorting option, after sorting we need to clear the sorting dynamically when click the remove filter icon. Video link mentioned for your reference. Please help us to resolve this issue.

Video link : https://suganya-gmail.tinytake.com/df/1265942/thumbnail?type=attachments&version_no=0&file_version_no=0&thumbnail_size=preview

 

Thanks in advance.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 05 Apr 2022
1 answer
277 views

Hi, good day.

I have developed web applications using telerik controls with Visual Studio.

But now I'm going to develop a desktop application, so I'm going to use the Telerik controls for WinForms with Visual Studio.

I have three questions.

1. I have version 2017 of UI for ASP.NET AJAX installed, can I install a version of UI for Winforms 2022, do not create conflict?

2. What version of UI for Winforms is compatible with Visual Studio 2017?

3. In the project that I am going to carry out using Winforms, the idea is that the data is displayed as a dynamic excel table and graph. I have read the documentation and I understand that I would have to use several controls for that, I thought it would not be so laborious, is the latter correct or am I wrong?

Thank you very much for the help.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 05 Apr 2022
1 answer
136 views

We use the same shortcut key in different places, where they can be in the general RadMenuItem but also on a menuitem in a RadContextMenu tied to a text box.

But, when i am focused on the text box and hit F12, it fires the radmenuitem F12 shortcut and never fires the contextmenu option. The ZIP file has the program that shows this.

Within windows using the standard menu and context menu, the context menu shortcut is fired and not the general menu shortcut. Windows seems to be treating it as you are on this field and there is a context menu with this shortcut - fire that event. Whereas Telerik seems to be looking at the general menu before the context menu.

Am i doing something wrong to get the context menu shortcut to fire and not the general menu shortcut?

Dinko | Tech Support Engineer
Telerik team
 answered on 04 Apr 2022
1 answer
99 views

 

Hello,

I have an unbound hierarchical radgridview that has a parent template and two child templates. The master templates work fine, I can insert, type or paste data. But in the child template, I cannot add any data or rows. It remains blank. Can you tell me what I am doing wrong?

My code are below.

Sorry I am using UI Winform

Thank you in advance.

 

private void TestForm_Load(object sender, EventArgs e)
        {            
         // Setup the Master Template
                RadGrid.MasterTemplate.Columns.Add          (new GridViewTextBoxColumn("Name"));
                RadGrid.MasterTemplate.Columns.Add          (new GridViewTextBoxColumn("Description"));
                RadGrid.MasterTemplate.Columns.Add          (new GridViewDateTimeColumn("Date"));
                RadGrid.MasterTemplate.Columns.Add          (new GridViewDecimalColumn ("Value"));
                RadGrid.MasterTemplate.Columns.Add          (new GridViewTextBoxColumn("Status"));
                RadGrid.MasterTemplate.Columns.Add          (new GridViewTextBoxColumn("NameCode"));
                RadGrid.MasterTemplate.Columns.Add          (new GridViewTextBoxColumn("Event"));

                RadGrid.AllowAddNewRow                              = true;
                RadGrid.AutoGenerateHierarchy                     = true;
                RadGrid.AutoSizeColumnsMode                      = GridViewAutoSizeColumnsMode.Fill;

                //Setup Child Template
                GridViewTemplate Childtemplate                       = new GridViewTemplate();
                RadGrid.MasterTemplate.Templates.Add         (Childtemplate );
                Childtemplate.AllowAddNewRow                         = true;
                Childtemplate.AutoSizeColumnsMode                 = GridViewAutoSizeColumnsMode.Fill;

                Childtemplate.Columns.Add                                (new GridViewTextBoxColumn  ("Name"));
                Childtemplate.Columns.Add                               (new GridViewTextBoxColumn  ("Description"));


                //Relation between Parent & child
                GridViewRelation relation                            = new GridViewRelation(RadGrid.MasterTemplate);
                relation.ParentTemplate                              = RadGrid.MasterTemplate;
                relation.ChildTemplate                               = Childtemplate;

                relation.ParentColumnNames.Add("Name");
                relation.ParentColumnNames.Add("Description");
                relation.ParentColumnNames.Add("PtDate");
                relation.ParentColumnNames.Add("Value");
                relation.ParentColumnNames.Add("Status");
                relation.ParentColumnNames.Add("NameCode");
                relation.ParentColumnNames.Add("Event");

                relation.ChildColumnNames.Add ("Name");
                relation.ChildColumnNames.Add ("Description");


                RadGrid.Relations.Add(relation);

 //load data
                LoadUnboundData();

        }

private void LoadUnboundData()
{
 
                using (RadGrid.DeferRefresh())
                    {
                     TestDataSet Processes                              = new TestDataSet();
                
                    using ( RadGrid.DeferRefresh())
                    {
                     GridViewTemplate firstLevelTemplate                        =  RadGrid.MasterTemplate.Templates[0];
 
                        for (int i = 0; i < Processes.AllProcesses.Count; i++)
                        {
                    
                        TestDataSet.AllProcessesRow ProcessRow         = Processes.AllProcesses[i];
                       
                         RadGrid.MasterTemplate.Rows.Add(
                             ProcessRow.Name,
                             ProcessRow .Description, 
                             ProcessRow.Date, 
                             ProcessRow .Value,
                             ProcessRow .Status, 
                             ProcessRow .NameCode,
                             ProcessRow .Event
                                );
                        
                        for (int j = 0; j < Processes.ProcessTasks.Count; j++)
                        {
                         TestDataSet.ProcessTasksRow TasksRow     = Processes.ProcessTasks[j];
                     
                         firstLevelTemplate.Rows.Add(
                             TasksRow.Name,
                             TasksRow.Description
                                );
                        }
                        }                                  
                    }
                }
        }

 

                                                    
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 04 Apr 2022
1 answer
158 views
We have a WinForms application with WPF Controls embedded in it and various WPF applications. All applications use Telerik controls. I am looking into re-theming them. I can't find any information to easily compare themes. I've seen that there is an Office2019 theme in both WinForms and WPF. Are there any comparisons of them anywhere? Are there any combinations of WinForms and WPF themes that go well together without much alteration?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 04 Apr 2022
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?