Telerik Forums
UI for WinForms Forum
2 answers
128 views
In my application 
I  have  Telerik.WinControls.UI.RadPanelBarGroupElement 
panel called "panelCompany"  , and it has collections  of three items of type
RadButtonElement

items called 
addCompany 
deleteCompany 
updateCompany

 in  my application  ,  i prevent some users to use delete option , so hide "deleteCompany "

FormMain.deleteCompany.Visibility = Telerik.WinControls.ElementVisibility.Hidden

at this  point any thing is OK  , but when i click on panel "panelCompany " ,  the button "deleteCompany" is visible again 
what can i do to hide RadButtonElement  control forever ?
khaled
Top achievements
Rank 1
 answered on 21 Mar 2016
9 answers
345 views
Hi there,

I am building a custom pan/zoom lasso control and am looking at how to find out the exact coordinates of the rectangle relative to the plotted grid area, also be handy for a mouse location based pan/zoom control via the mouse wheel.

It seems to some combination of the ChartviewArea minus the various sizes and marigns for the Chart and the title and the legend plis their sizes.

I haven't had any luck finding them and I haven't had any luck finding the Axes Length and Width.

This will be useful for also adding my own annotations.

Also plan to add a view dataset which will change the number of records displayed depending on the pan zoom controls for my datasets which are from 1 to 16000 dtapoints.

Hopefully if I solve all this I can post up  a demo project which handles these various circumstances for complex chart data analysis.

Alternatively would I be better off embedding the Chart control from Reporting to achieve these various features, (probably need to anyway to achieve vector graphic charts for the pdf exports).

Best regards,

Kurt Scholz
LogTag Recorders Ltd
Lead Software Developer
DevCraft Complete
Hristo
Telerik team
 answered on 21 Mar 2016
1 answer
177 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
474 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
114 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
236 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
410 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
617 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
406 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
217 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
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?