Telerik Forums
UI for WinForms Forum
2 answers
101 views

Hi, very basic question for noob, I searched & tried to find someone just doing a basic gridview row save...thing

I have a RadGridView bound to a  SQL database

I am wondering what the generally accepted method is, of updating a row to the database?

A button to fire off an update statement?

 

Thanks,

Rich

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Apr 2020
1 answer
172 views

Greetings,

Is there any StartMenu event such as clicking event to control?

As it isn't considered a ribbonbar's tab, it can not be controlled using tab events.

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 01 Apr 2020
1 answer
147 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
651 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
162 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
185 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.5K+ 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
170 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
409 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
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
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
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
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?