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?
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
}
}
}
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.
Dim Trackball As New ChartTrackballController() AddHandler Trackball.TextNeeded, AddressOf trackball_textNeeded Trackball.InfoElementOffset = New System.Drawing.Point(0, -20) rChartView.Controllers.Add(Trackball)
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.
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);
// }
}
}
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
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?
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;
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.