Telerik Forums
UI for WinForms Forum
1 answer
105 views
How can change range of a label, if I have a RadLinearGauge with RangeStart=0 and EndRange=85 and Count=2,but I don't want to my label to be segmented like:0,42.5,85 . I want particular range of labels,but how?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 28 Jun 2018
1 answer
188 views
private void radGridView5_CellEditorInitialized(object sender, GridViewCellEventArgs e)
        {
            if (e.Column.Name == "operati")
            {
                RadDropDownListEditor editors = (RadDropDownListEditor)e.ActiveEditor;
                RadDropDownListEditorElement elements = (RadDropDownListEditorElement)editors.EditorElement;
 
                switch (_endOperationSoc)
                {
                    case "принят":
                        elements.Items.RemoveAt(4);
                        elements.Items.RemoveAt(1);
                        break;
                    case "приостановлен":
                        elements.Items.RemoveAt(3);
                        elements.Items.RemoveAt(1);
                        break;
                    case "снят":
                        elements.Items.RemoveAt(4);
                        elements.Items.RemoveAt(3);
                        elements.Items.RemoveAt(2);
                        break;
                    case "возобновлен":
                        elements.Items.RemoveAt(4);
                        elements.Items.RemoveAt(1);
                        break;
                }
            }
 
            if (e.Column.HeaderText == "соц. работник")
            {
                RadDropDownListEditor editors = (RadDropDownListEditor)e.ActiveEditor;
                RadDropDownListEditorElement elements = (RadDropDownListEditorElement)editors.EditorElement;
                if (radGridView5.RowCount != 0)
                    elements.SelectedIndex = elements.FindString(radGridView5.Rows[radGridView5.RowCount - 1].Cells[1].Value.ToString());
            }
 
            RadDropDownListEditor editor = e.ActiveEditor as RadDropDownListEditor;
 
            if (editor == null)
            {
                return;
            }
 
            RadDropDownListElement element = editor.EditorElement as RadDropDownListEditorElement;
 
            int scrolBarWidth = 0;
 
            if (element.DefaultItemsCountInDropDown < element.Items.Count)
            {
                scrolBarWidth = 35;
            }
 
            foreach (RadListDataItem item in element.Items)
            {
                string text = item.Text;
                Size size = TextRenderer.MeasureText(text, element.Font);
 
                if (element.DropDownWidth < size.Width)
                {
                    element.DropDownWidth = size.Width + scrolBarWidth;
                }
            }
        }

here is this moment:

switch (_endOperationSoc)
                {
                    case "принят":
                        //elements.Items[4].IsVisible = false;
                        elements.Items.RemoveAt(4);
                        elements.Items.RemoveAt(1);
                        RadMessageBox.Show("принят", "Ошибка", MessageBoxButtons.OK, RadMessageIcon.Exclamation);
                        break;
                    case "приостановлен":
                        elements.Items.RemoveAt(3);
                        elements.Items.RemoveAt(1);
                        RadMessageBox.Show("приостановлен", "Ошибка", MessageBoxButtons.OK, RadMessageIcon.Exclamation);
                        break;
                    case "снят":
                        elements.Items.RemoveAt(4);
                        elements.Items.RemoveAt(3);
                        elements.Items.RemoveAt(2);
                        RadMessageBox.Show("снят", "Ошибка", MessageBoxButtons.OK, RadMessageIcon.Exclamation);
                        break;
                    case "возобновлен":
                        elements.Items.RemoveAt(4);
                        elements.Items.RemoveAt(1);
                        RadMessageBox.Show("возобновлен", "Ошибка", MessageBoxButtons.OK, RadMessageIcon.Exclamation);
                        break;
                }
            }

How do I not delete items but just hide or display them?
It is necessary to do it in this moment.
Thank you.

 

Dimitar
Telerik team
 answered on 27 Jun 2018
5 answers
276 views

Good afternoon.

I want to change the color according to the Data value of a certain column in Cardview.
Cardview does not have a CellFormatting in the Gridview or Listview.

I change the color of the entire item using Cardview's VisualItemFormatting.

 

        private void RadCardView1_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e)
        {
            if (e.VisualItem.Data["EIFSTATUS"].Equals("OFF"))
            {
                e.VisualItem.BackColor = Color.Red;
                e.VisualItem.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
            }
        }


But I do not want it.

I would like to change Backcolor only for "OFF" value only when the column value of "EIFSTATUS" is "OFF" instead of whole.

I want to change it like the Grid screen below.

 

private void RadGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
        {
            if (e.CellElement.ColumnInfo.HeaderText == "EIFSTATUS")
            {
                if (e.CellElement.RowInfo.Cells["EIFSTATUS"].Value.Equals("OFF"))
                {
                    e.CellElement.DrawFill = true;
                    e.CellElement.GradientStyle = GradientStyles.Solid;
                    e.CellElement.BackColor = Color.Red;
                }
            }
        }

I would appreciate your help.

Hristo
Telerik team
 answered on 26 Jun 2018
21 answers
1.6K+ views
Hello,

I am currently trying to allow the user of a WinForms DateTimePicker to enter text. When they delete the current text in the DateTimePicker and begin to enter the date the DateTImePicker displays nothing, when they finally enter the correct format (e.g. 10/18/2010) the text appears. This text entry behavior seems completely wrong and I am wondering if this is how your control works or if there is a way for me to allow the user to see the text as they type it into the DateTimePicker?

Thanks
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Jun 2018
3 answers
330 views

I have a very simple RadLayoutControl with two LayoutControlItems inside it - each Control Item has a RadListControl - these are stacked on top of each other.

Each LayoutControlItem is the same height - a 50/50 split which is exactly what I want.

Unfortunately because of how WinForms are displayed - the form is first drawn as the same size as it is in the designer...then everything expands to the actual size of the form and you get this ugly double-painting effect...my RadLayoutControl is shown...then blink and it's redrawn at its Run-Time size and everything resizes correctly.

Well, I hate that WinForms do that...and I'm not smart enough to know how to tell the application, "Hey! Don't draw anything until the form has finished resizing!" so I fake it...anything that gives me this double-paint I set Visible = false and once the form's finished its resizing I set Visible = True.

My problem is this:  With the RadLayoutControl doing this:  The TOP panel is the same size as in the designer and only the bottom panel resizes to fill the rest of the space.

 

My question is this:  Is there any way I can tell the RadLayoutControl, "Take your current height and go resize everything equally" so I wind up with two panels the same height?

 

I've attached a couple of images to show you what I mean.  One shows you how I want it to look and the other shows how it does look.  Hopefully you can make sense of this post and I don't sound like some crazy guy trying to do something I shouldn't be...heck if anyone there knows anyway to tell a WinForm not to paint until it's resized that would solve everything :)

 

-C

 

 

Dimitar
Telerik team
 answered on 26 Jun 2018
3 answers
548 views

The following link has a great example for Button FillPrimitive.

https://docs.telerik.com/devtools/winforms/telerik-presentation-framework/override-theme-settings-at-run-time

However, I am having a lot of trouble trying to do the same thing with my RadButton's BorderPrimitive.

The following does not work.

this.radButton1.ButtonElement.SetThemeValueOverride(Telerik.WinControls.Primitives.BorderPrimitive.ForeColorProperty,Color.Red, "", (Telerik.WinControls.Primitives.BorderPrimitive));

What will work? I tried accessing this.radButton1.ButtonElement.BorderElement but there is no SetThemeValueOverride member.

Hristo
Telerik team
 answered on 26 Jun 2018
1 answer
302 views

Hi, 

I am very confused with validating data before sending it to the DB. 

My Grid is popultated with datatable (from Web service) and I would like to send row data each time the user finishes to edit the row (send via Web Service) and also I would like to send a new row data by using a web service call with the params as needed. 

The proble is that I do not know wich event to use sa there are a lot. 

I tried to use grid_RowsChanged but I do not know if I should also use RowValidating as rows_Changed occured before row_valdating. or should I use only rows_changed? there is also a user_added_row event... please help.. 

I want to let user finish add new row then check if everything is valid. If it is not valid I would like to prevent him from pushing data (rovalidating is the only way I have to cancel telerik grid action to add the new row or accept the current row changes. 

It is very consfusing, could you please help me. 

 

Yaron

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Jun 2018
1 answer
130 views

How can I disable the Complete Message Box from the SpellCheck in the RadRichTextEditor?

In RadSpellChecker I can use the property EnableCompleteMessageBox, but in RadRichTextEditor I can't find it.

 

Regards.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Jun 2018
5 answers
284 views

Hi

I have multiple datapoints in my barseries but when my radchartview is Smaller than specific size columns that have little value is hidden.

in Q1.png when windows is smaller size than Q2.png

what I do?!!

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Jun 2018
1 answer
139 views

I'm interested in changing the background of the plotting area to a custom background where the top half is one color and the bottom half is another color.  I've attached an image demonstrating the desired effect, though in the image the colors are "on-top" of the points, where I'd like them to be below.  How might I achieve this with Telerik's RadChartView?

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Jun 2018
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?