Telerik Forums
UI for WinForms Forum
1 answer
165 views

Greetings,

I have a Radlistview, a Textbox, and a Button. User enters a decimal or non-decimal number in the Textbox (For example, 3.1) and clicks the button.

Here is the clicking event of the button :

' RadlistView sorting is enabled in loading event of my form.
 
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Radlistview1.Items.Add(Textbox1.Text)
Dim sort = New SortDescriptor("Text", ListSortDirection.Ascending)
Radlistview1.SortDescriptors.Add(sort)
End Sub

 

I did a test :

1- Adding the first item to RadlistView with textbox value set to 20.

2- Adding the Second item to RadlistView with textbox value set to 2.1.

 

As sorting direction is set to Ascending (also tested with descending), 2.1 should be placed as the first item because it is smaller than 20. But it doesn't work.

I appreciate any solution to this issue. Thanks

 

 

Nadya | Tech Support Engineer
Telerik team
 answered on 31 Mar 2020
4 answers
664 views
How to create gridviewtemplate dynamically in winforms?

The sample code below is with statically created gridviewtemplate, how to make it dynamically with 'n' number of gridviewtemplate from code?

            radGridView1.DataSource = dt;

            GridViewTemplate firstChildtemplate = new GridViewTemplate();
            firstChildtemplate.DataSource = dt1;
            radGridView1.MasterTemplate.Templates.Add(firstChildtemplate);

            GridViewRelation relation = new GridViewRelation(radGridView1.MasterTemplate);
            relation.ChildTemplate = firstChildtemplate;
            relation.RelationName = "HeaderDetails";
            relation.ParentColumnNames.Add("HeaderID");
            relation.ChildColumnNames.Add("ParentHeaderID");
            radGridView1.Relations.Add(relation);


            GridViewTemplate secondChildtemplate = new GridViewTemplate();
            secondChildtemplate.DataSource = dt2;
            firstChildtemplate.Templates.Add(secondChildtemplate);

            GridViewRelation relation2 = new GridViewRelation(firstChildtemplate);
            relation2.ChildTemplate = secondChildtemplate;
            relation2.RelationName = "CAPFieldDetails";
            relation2.ParentColumnNames.Add("HeaderID");
            relation2.ChildColumnNames.Add("ParentHeaderID");
            radGridView1.Relations.Add(relation2);
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Mar 2020
5 answers
1.6K+ views

Hello,

 Am using Rad grid view with Multi column combo box.

 I created a Column type as GridViewMultiComboBoxColumn, attached the data source, also included the displaymember, valuemember,dropdwonstyle as RadDropDownStyle.DropDown. and added the column to the grid.

I am facing a problem that if i type in the  GridView MultiComboBox Column, the control is not filtering and showing result.

I got a documentation  saying

The drop-down element is an object of type MultiColumnComboBoxElement. Use this element to set the drop-down style, animation and sizing as you would do for the regular combobox.  
The EditorControl property of the MultiColumnComboBoxElement gives you a reference to the RadGridView control. Using that reference you can obtain the RadGridView object and work as with normal RadGridView control. Refer to RadGridView documentation for additional information on RadGridView.

The current version has one limitation that you should consider:
You cannot use the auto-complete mode of RadDropDownList
The RadGridView control hosted in the drop-down does not allow editing operations
The RadGridView control hosted in the drop-down does not support filtering, grouping and sorting operations.

kindly confirm me is it a limitation or do i need to include something else in my code.

I am including the code snip shot for your ref. 

bool isColumnAdded=false; 

private void Form1_Load(object sender, EventArgs e)
        {
            filldata();​

     }

 

private void filldata()
        {
            SqlCommand cmmdata = new SqlCommand();
            cmmdata.Connection = constkbal;
            cmmdata.CommandText = "select top 50 stockno from itemmaster";
            SqlDataReader srdtls = cmmdata.ExecuteReader();
            DataTable dtdetails = new DataTable();
            dtdetails.Load(srdtls);
            srdtls.Close();
            GridViewMultiComboBoxColumn col = new GridViewMultiComboBoxColumn();
            col.DataSource = dtdetails;
            col.DisplayMember = "stockno";
            col.ValueMember = "stockno";
            col.FieldName = "stockno";
            col.HeaderText = "stockno";
            col.Width = 400;
            col.DropDownStyle = RadDropDownStyle.DropDown;
            col.FilteringMode = GridViewFilteringMode.DisplayMember;
            
            this.griditemdisplay.Columns.Add(col);
     }

private void griditemdisplay_CellBeginEdit(object sender, GridViewCellCancelEventArgs e)
        {
            if (this.griditemdisplay.CurrentColumn is GridViewMultiComboBoxColumn)
            {
                if (!isColumnAdded)
                {
                    isColumnAdded = true;
                    RadMultiColumnComboBoxElement serchengineElement = (RadMultiColumnComboBoxElement)this.griditemdisplay.ActiveEditor;
                    serchengineElement.DropDownSizingMode = SizingMode.UpDownAndRightBottom;
                    serchengineElement.DropDownMinSize = new Size(550, 300);
                    serchengineElement.DropDownMaxSize = new Size(550, 300);
                    serchengineElement.EditorControl.MasterTemplate.AutoGenerateColumns = false;
                    serchengineElement.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
                    serchengineElement.AutoSizeDropDownToBestFit = false;
                    serchengineElement.DropDownAnimationEnabled = false;
                    serchengineElement.EditorControl.Columns.Add(new GridViewTextBoxColumn("Stockno"));
                    FilterDescriptor filtercustomername = new FilterDescriptor("Stockno", FilterOperator.Contains, string.Empty);
                    serchengineElement.EditorControl.FilterDescriptors.Add(filtercustomername);

                }
            }

        }​​

 

 

 

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Mar 2020
2 answers
172 views

Is it possible to have a custom shaped screen tip? 

I have created a custom screen tip class, set the Shape property of the element to be a shape and it appears to work visually but it's leaving a grey background in the spots where I want it to be transparent. See attached. 

 

I have also tried doing the same but with an image, making the background of the image transparent, but the same thing happens. 

 

Thanks. 

 

 

Daniel
Top achievements
Rank 1
 answered on 27 Mar 2020
5 answers
199 views
Hello, Is it possible to merge a commandbar from a child with the parent commandbar?
thanks,
francis
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Mar 2020
11 answers
4.6K+ views
Hello,

I have a DocumentWindow (part of a RadDock) which has a FlowLayoutPanel inside of it set to Dock Fill.  The FlowLayoutPanel has the FlowDirection set to "TopDown".

Inside the FlowLayoutPanel I want to have full width Panels.  The Panels themselves are meant to act as containers for "comment boxes" which will are to be stacked vertically in the DocumentWindow (see poor ascii art below).  I've set the Panel "Anchor" property to "Left-Right" but the Panels will not expand to fit the entire FlowLayoutPanel.

My questions are:

1.  Should this work?
2.   If not, what is a good way to do this type of layout?

Thank you!

Best Regards,

Ed


Here is what I'm trying to acheive (the box made of '+' signs is the FlowLayoutPanel which is inside of a DocumentWindow)

+++++++++++++++++++
+ ---------------------------   +
+ |                               |   +
+ |         Panel 1          |   +
+ ----------------------------  +
+                                     +
+ ---------------------------   +
+ |                               |   +
+ |         Panel 2          |   +
+ ----------------------------  +
+++++++++++++++++++


Brendan
Top achievements
Rank 1
 answered on 26 Mar 2020
2 answers
214 views

In a RadMap I have several layers with each layer showing a different category of items, each with its own colored icon. 
For each layer I would like to change the color of the round icon containing the number of elements per cluster, is this possible? 
I would have expected a Behavior property on each MapLayer object,

 

Entropy69
Top achievements
Rank 1
Veteran
 answered on 25 Mar 2020
21 answers
435 views

I'd like to position a Shape's text outside of the shape itself. Can this be accomplished?

Initially I thought I might have to have a separate Label shape associated with every shape, to achieve this. I also need to apply alignment, e.g. left, center, right, so perhaps a separate Label shape would be better, then group it with its shape (as they are inseparable).

 

Example

 

Nadya | Tech Support Engineer
Telerik team
 answered on 25 Mar 2020
2 answers
218 views

How can I completely localize hyperlink tooltip? I see that parameter value for RichTextBoxLocalizationProvider.GetLocalizedString is "Documents_RadRichTextBox_HyperlinkToolTipFormatString". I have to return my version of text "{0} {1} to follow link", but I don't see a way to localize those two parameters inside, I suppose "Ctrl +" and "Click".

I could just return a finished string without parameters, my version of "Ctrl + Click to follow link" instead of "{0} {1} to follow link", but could I run into a situation where those two parameters are not "Ctrl +" and "Click"?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Mar 2020
6 answers
246 views

Hello,

I have a RadContextMenu specified in the properties of my RadListview and the fist right click will display the context menu just fine, but it doesn't have the focus. Meaning when I mouse over it, the items don't get selected and you cant click on it. When I right click again, the menu works as expected. Meaning it gets the mouse over events and highlights as expected.... Which is to say the first right click always results in a menu that is not usable. Subsequent context menus work just fine... its bizarre. Also, if i don't specify the context menu via the property and display it manually with code, it does the same thing. So weird.

I've attached a small picture that shows the mouse over the menu. You can see no menu item is highlighted. 

Thanks for reading,

Michael.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Mar 2020
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)
Form
Chart (obsolete as of Q1 2013)
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
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
CollapsiblePanel
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?