Telerik Forums
UI for WinForms Forum
5 answers
264 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.5K+ 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
306 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
523 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
287 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
116 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
268 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
132 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
14 answers
844 views
Hi

Is it possible to set the focus to the next [index++ in current sortorder] or to a named propertyfield when pressing Tab-Key in Editing-Mode. It seems that the Preview Key only works on Labels or Fields with Readonly Attribute.
private void radPropertyGridPAZ_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
    switch (e.KeyCode)      
    {
        case Keys.Tab:
            switch (radPropertyGridPAZ.SelectedGridItem.Name) 
            {
                case "JobNo":
                    radPropertyGridPAZ.Items["TaskNo"].Select(); 
                    break;
            }
            break;
    }
}

Thanks in advance :-)
Daniel Kaelin
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Jun 2018
1 answer
93 views

Could you help me to understand what I need to do in order to 'duration gross' field calculate average TimeSpan

I attached a couple of pictures what I did already.

Thanks in advance.

Hristo
Telerik team
 answered on 22 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)
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
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
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?