Telerik Forums
UI for WinForms Forum
1 answer
99 views

Hello, I am trying to get data with raddropdownlist and in case the item value selected equals to "nouveau_scénario" it will open automaticly another form else messagebox will be showen but nothing happen in both cases.

I developed this function to get data from SQLSERVER database (this works correctly ) :

        private void Combobox_scénario1()
        {        
            string constr = @"Data Source=****;Initial Catalog=****;User ID=****;Password=****";
            using (SqlConnection con = new SqlConnection(constr))
            {
                using (SqlDataAdapter sda = new SqlDataAdapter("SELECT [LIBELLE],[OID] FROM [AffecAnalytique].[dbo].[DESCRIPTIF] order by [DATEMODIF] DESC", con))
                {
                   using (SqlConnection con = new SqlConnection(constr))
             {
                 using (SqlDataAdapter sda = new SqlDataAdapter("SELECT [LIBELLE],[OID] FROM [AffecAnalytique].[dbo].[DESCRIPTIF] order by [DATEMODIF] DESC", con))
                 {
                     //Fill the DataTable with records from Table.
                     DataTable dt = new DataTable();
                     sda.Fill(dt);
                     
                     //Insert the Default Item to DataTable.
                     DataRow row = dt.NewRow();
                     radDropDownListElement2.Text = "Choix du Scénario";
                     row[0] = "Nouveau_scénario";
                     dt.Rows.InsertAt(row, 0);

                     //Assign DataTable as DataSource.
                     radDropDownListElement2.DataSource = dt;
                     radDropDownListElement2.DisplayMember = "LIBELLE";
                     radDropDownListElement2.ValueMember = "OID";
                }
            }
        }

 

here the function of selected index of raddropdownlist :

         private void radDropDownListElement2_Click(object sender, EventArgs e)
         {
             Console.WriteLine("fef :"+radDropDownListElement2.SelectedValue);
             if (string.IsNullOrEmpty(textBox3.Text) || textBox3.Text == "System.Data.DataRowView")
             {
                 MessageBox.Show(" Veuillez sélectionner un scénario ");
             }
             else if (radDropDownListElement2.Text == "Nouveau_scénario")
             {
                 this.IsMdiContainer = true;
                 Nouveau_Scenario = new Form_Nouveau_Scénario();
                 Nouveau_Scenario.MdiParent = this;
                 Nouveau_Scenario.Show();
             }
             else
             {
                 string message1 = radDropDownListElement2.SelectedValue.ToString();
                 string message2 = radDropDownListElement2.Text;
                 textBox3.Text = message2;
                 textBox4.Text = message1;

             }
         }

Peter
Telerik team
 answered on 26 Jan 2021
5 answers
303 views

Hi,

How do adjust the image in the available area?

Considering that the image can be little or big.

I attach an image.

Thanks,


Nadya | Tech Support Engineer
Telerik team
 answered on 25 Jan 2021
5 answers
441 views

Hello,

We have a need to create a custom sort order for columns in a pivot grid.  (It's more like creating a Column Order rather than a Sort.)  For example, the columns are Size and the (Header) values are "S", "M", "L", "XL", "XXL" and the columns need to be displayed in this order.  The Row values would be the quantity ​for each size.  And to add a twist, the "Size" values are dependent on the product.  For example, a different product would have Size values of "S/M", "M/L", "L/XL".  So this functionality would need to be dynamic. 

Is this possible?

 

Thanks,

Mike

Nadya | Tech Support Engineer
Telerik team
 answered on 25 Jan 2021
2 answers
97 views

Hi,

 

I'm trying to use the autocompletebox in a way so I can use it to visualize filters in a search. In order to do that, I want to add a tag to the textblock element in order to later on identify the category of the text in the textblock element. I tried to play with the createtextblock event and formatting, but it doesn't quite work out. Can you give me some guideance? 

 

Thanks in advance!

Nadya | Tech Support Engineer
Telerik team
 answered on 25 Jan 2021
5 answers
360 views

I use a LineSeries show points in a ChartView with data binding.

I want to change specific point style by specific condition from bound data.

How to do that?

Example: if data value bigger than 10 and change the point size to bigger.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 22 Jan 2021
5 answers
133 views

As title.

I need to change specific point style on LineSeries.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 22 Jan 2021
1 answer
279 views
Hello, i have developed a c# windows form application and i have a problem deploing the solution in other computers.
PS: I must run,deploy the solution in other computer that doesn't have SQL SERVER or VS installed. (It worked with other solution)

What I have tried:

I worked with Telerik and I just for each Telerik assembly reference in the Solution Explorer, on properties and in the property grid set the Copy Local property of the reference to True.
When i try to install the .exe from other copmuter i get this error :

Cannot install or run app. this app requires Telerik.WinControls assembly version 2020.2.616.20, which must first be installed in the global assambly cache
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 22 Jan 2021
3 answers
224 views

How to add placeholder in empty node? So that when added to a node, the placeholder disappears, and if the number of objects becomes zero again, it appears again.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 22 Jan 2021
1 answer
281 views

I am following the following documentation for the RadTreeView on populating a Treeview through an XML Datasource.

However, The documentation doesn't really get in depth about how the XML schema and naming conventions correlates to the RadTreeview control itself or how the corresponding XML elements are being linked up.

The ID and parentID elements are obvious enough and those do appear to be referenced in the initialization of the RadTreeview control through the following code.

 

this.radTreeView1.ChildMember = "id";
this.radTreeView1.ParentMember = "parentId";

 

However, the XML "Title" element maps to the RadTreeView.DataMember property, which is not as obvious.

A RadTreeNode seems to have 4 different properties available to populate (Name, Tag, Text, Value). Again based on documentation I am not sure what the difference is in each of these values.

When populating the RadTreeView through XML Datasource, and then iterating through each of the nodes, it seems as though (Name, Text, and Value) are all populated with the XML value from the "Title" element, and that the RadTreeNode (Tag) value is left blank.

Can someone elaborate on the difference between (Name, Tag, Text, and Value) and what specific purpose each is intended to serve?

Can someone also elaborate on how the XML elements are being mapped?

Additionally can the XML schema be modified to populate these values? I am particularly interested in populating the (Tag) property, but would like to understand what else is possible with XML.

Right now I can iterate through the RadTreeView nodes after its loaded and manually set the Tag value, but this kind of defeats the purpose of using something like XML in the first place.

Any help much appreciated!

Dimitar
Telerik team
 answered on 22 Jan 2021
1 answer
231 views
Is there a way that you can order by the selected items in the CheckedList box?  So that when the dropdown list opens all the checked items are at the top.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 22 Jan 2021
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
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
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?