Telerik Forums
UI for WinForms Forum
1 answer
170 views

Hello,

My colleague and I have recently come across a problem with the way the designer generates code for Telerik controls. The problems happens when both of us are editing the same file at the same time, for instance one of us will use the designer to add some columns to a gridview while the other does the same to a completely different gridview. Everything works fine for each of our environments until it becomes time to check in our code to our TFS, where we run into conflicts of having duplicate names for objects. We noticed that every time one of us adds a column to a gridview using the designer, the auto generated code will name the column "gridViewTextBoxColumn123" where the number at the end is auto incremented from the previous column in our local designer.cs file. With both of us editing things at the same time, it repeats this process, and when we try to merge our code together, obvious conflicts arise where the only way to fix them is to either accept one version of the file and redo missing work, or to take both versions and then tediously go through the file renaming things.

For the time being we have made a pact to check in any designer changes as soon as we make them, so the amount of re-work needed doesn't get too big, but I feel there should be a better way to handle our situation so these naming conflicts don't occur in the first place.

Is there some setting we are missing to allow us to name the objects ourselves, or a better way to work around the problem?

Dimitar
Telerik team
 answered on 21 Mar 2016
4 answers
457 views

I have a user control that contains a radlabel and a radmaskedtextbox. I need to change the backcolor of the textbox to match the forecolor of the radlabel when the user control is disabled. Everything works fine if the user control is initially enabled. However, If I set the initial state of the user control disabled, then upon running the program, the maskedtextbox's backcolor is black while the forecolor of the radlabel is gray. Here is the code: 

Color disableColor;
 
private void maskedTextBox_EnabledChanged(object sender, EventArgs e)
{
 
        if (!this.maskedTextBox.Enabled)
        {                 
            //Set disable color the same as the label text color
            this.radLabel.LabelElement.VisualState = "RadLabelElement.Disabled";                   
            disableColor = this.radLabel.LabelElement.ForeColor;
 
            //Change the backcolor of the maskedtextbox
            this.maskedTextBox.MaskedEditBoxElement.TextBoxItem.BackColor = disableColor;
 
        }
        else
        {
            //Reset values
             
        }
    }
     
}
Dimitar
Telerik team
 answered on 21 Mar 2016
1 answer
108 views

Im use this function for editing the style (ex color, font) of radelement

RadElementHierarchyEditor

http://www.telerik.com/products/winforms/element-hierarchy-editor.aspx

Now i need to change the color of form element but radform does not have RadElementHierarchyEditor

How to change the color Green to Red for example?

I found several solutions in our forum, but all change the "theme", not only the color.

I develop many applications in C #. Net for Windows Forms and am considering the purchase of various frameworks, according to the most changeable.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 21 Mar 2016
6 answers
228 views
Hi,

I have a strange problem with trackballs. It happens when the chartview has multiple y-axis and multiple types of series (e.g. line series and bar series). The problem is that the trackball shows only for one or two categories starting from the left. I have attached a picture, in which there is a chartview with four categories, three series and two y-axis. In this case the trackball shows for the first two categories only. When I move the mouse over the third or fourth category, no trackball appears.

This problem seems to have something to do with two things:
1.) the order the different serie types are added to the chartview
2.) incomplete series

 In my case the problem happens when the bar series is added first to the chartview and then the line series, and the series are incomplete. However, it doesn't happen for all cases having these two conditions, so there must be some third factor affecting to this.

I'm populating the chartview dynamically from datatable. The trackball is added to the chartview like following:

     Dim Trackball As New ChartTrackballController()
     AddHandler Trackball.TextNeeded, AddressOf trackball_textNeeded
     Trackball.InfoElementOffset = New System.Drawing.Point(0, -20)
     rChartView.Controllers.Add(Trackball)

The formatting for the trackball texts is done in trackball_textNeeded  event handler.

I'm using Telerik Q1/2013
Dimitar
Telerik team
 answered on 21 Mar 2016
3 answers
397 views

    The Web-Version of RadGridView, has the EditForm Mode, to edit the Content of a row, with some customized Control.

In the WinForms Version of RadGridView I'm missing this Mode.

There are GridViewTemplates and Grouping and Hierarchy Staff, that 'expand' a Row,

that link to different tables or different rows.

 

I haven't found any example, to expand just an Edit Control of the Row, with a more appealing presentation, when inside cells, for example.

How do I edit the row itself in the expanded part - without having a Hierarchie of anything.

The overwie page, has something almost like that:

http://docs.telerik.com/devtools/winforms/gridview/overview
But this is Non-Edit (I assume)

and it does not come with the source Code.

Also the Webinar does not handle GridViewTemplates.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 21 Mar 2016
5 answers
592 views

Hello,

  I have created a GridViewTextBoxColumn(), on _CellPaint() I am painting three images starting from the left to right.  I would like to detect a mouse click on the rectangle that corresponds to the image but I can't get the Cell.Size information on the CellClick() event.

I have tried creating a custom control that holds three buttons but the UI doesn't fit my needs.

In order to determine what was clicked on the cell, I need to know the click x/y and the current cell rectangle.

Thanks!

 

void grid_CellPaint(object sender, GridViewCellPaintEventArgs e)
        {
            GridDataCellElement dataCell = e.Cell as GridDataCellElement;
            if (dataCell != null && dataCell.ColumnInfo.FieldName == "ID")
            {
                Size cellSize = e.Cell.Size;
                Rectangle rct = new Rectangle(0, 0, cellSize.Height, cellSize.Height);
                //using (Pen p = new Pen(Color.Black))
               // {
                 
  //Flag
                    rct.Inflate(-2, -2);
                    e.Graphics.DrawImage(global::DIRC.UITools.Properties.Resources.Flag_red_icon16x16, rct);
           

                    //Information Icon
                    rct = new Rectangle(cellSize.Height, 0, cellSize.Height, cellSize.Height);
            
                    rct.Inflate(-2, -2);
                    e.Graphics.DrawImage(global::DIRC.UITools.Properties.Resources.information_icon_16x16, rct);

                    //Comment Icon
                    rct = new Rectangle(cellSize.Height * 2, 0, cellSize.Height, cellSize.Height);
                     
                    rct.Inflate(-2, -2);
                    e.Graphics.DrawImage(global::DIRC.UITools.Properties.Resources.comment_icon16x16, rct);
               // }
            }
        }

Hristo
Telerik team
 answered on 18 Mar 2016
8 answers
400 views

I'm creating a GridViewColorColumn and I would like to modify it's look. I just want the color box showing the color and the button, no text. It would be nice if I could make the color box wider also.

 VB code please.

   Private Sub grdMainGrid_DataBindingComplete(sender As Object, e As GridViewBindingCompleteEventArgs) Handles grdMainGrid.DataBindingComplete

        Dim colorBoxColumn As New Telerik.WinControls.UI.GridViewColorColumn
        colorBoxColumn.DataType = GetType(Color)
        colorBoxColumn.HeaderText = "Staff Color"
        grdMainGrid.Columns(2) = colorBoxColumn
        grdMainGrid.AllowEditRow = True
        grdMainGrid.Columns(2).ReadOnly = False

​end sub

 

Later

Art

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Mar 2016
4 answers
206 views

I'm using 2016 Q1 Jan and the VisualStudio2012Light theme. I'm using a RadDropDownList with AutoCompleteMode = SuggestAppend.

I have a problem where if the values for the items in the list are very long then when you start typing and the suggestions appear then they overlap and make it very difficult to read.

When viewing the items in the list normally there is no problem and the items have ellipses.

Can you please assist?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Mar 2016
4 answers
665 views

I need to change the background color of many Rad controls when they are disabled, RadDropDownList is one of them. I have searched up the forum but have not found a satisfactory answer. I am wondering if there is a built-in property that I can just set, so that each time RadDropDownList is disabled, its background color changes to black or gray, instead of the default disable-color. 

I understand that there is a built-in property to set default disable paint to false, it is shown in the code below. But then, how can I set up a custom disable paint? 

UseDefaultDisabledPaint = false;  

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Mar 2016
2 answers
100 views

From filtering box, when I select Null and then select All then the following error occurs:

Item has already been added. Key in dictionary: '(Blanks)'  Key being added: '(Blanks)'

Please see the attached screenshot.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Mar 2016
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
CheckedDropDownList
ProgressBar
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
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
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
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?