Telerik Forums
UI for WinForms Forum
3 answers
216 views

Hello,
I use a event View_CreateCell  to set custom filter cell element but the event not fire for all columns in grid. How can I change that?

private void ListaPlikowRadGridView_CreateCell(object sender, GridViewCreateCellEventArgs e)
        {
            if (e.CellType == typeof(GridSearchCellElement))
            {
                e.CellType = typeof(MyGridSearchCellElement);
            }
           
            if (e.CellType == typeof(GridFilterCellElement) && e.Column.GetType() != typeof(GridViewTextBoxColumn))
            {
                e.CellElement = new CustomGridFilterCellElement(e.Column as GridViewDataColumn, e.Row);
            }
        }

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 21 Sep 2021
1 answer
780 views

Hello everyone,

 

I have a little problem with the property StartPosition of a radForm.

When I create a radForm which will be opened with ShowDialog as a modal window at runtime, the start position CenterScreen is not applied. Depending on the size I choose, the modal is sometimes not even fully visible on the screen. How can I resolve this?

I've uploaded a test project which shows the problem:

https://easyupload.io/n58n8v

Thank you in advance and have a nice week!

Stoyan
Telerik team
 answered on 20 Sep 2021
5 answers
136 views
Hi.

Using dll version 2021.2.615.40

I want to use the "Move to Previous Tab Group" included in the demo application, but it is not displayed in my application.

Are there any conditions under which this menu item is valid?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 Sep 2021
1 answer
223 views

Hi 

I have added points to RadMap and on each point I have placed an image and a text (as shown in the attached screenshot image). 

My questions

1) can I move the text below the point because it is currently on top of the added image ?

2) can I add a background color to the text to make sure it is visible to end users?

 

The code I am using is below:

    PointG racheer = new PointG(Latitude, Longitude);
    MapPoint point = new MapPoint(racheer);
    point.Image = Properties.Resources.myImage;
    point.Size = new Size(15, 15);
    point.Text = "TEXT";
    point.ForeColor = Color.Red;
    radMap1.MapElement.Layers["myLayer"].Add(point);

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 Sep 2021
1 answer
764 views

Hi.

Is it possible to set the CheckState of a parent node independently of how the child nodes are set? In my code, it won't let me change the state if there are different states in child node.

Here's the code, just a simple form with a RadTreeView named "tree" on it:

 

Imports Telerik.WinControls
Imports Telerik.WinControls.UI

Public Class frmTest
    Private Sub frmTest_Load(sender As Object, e As EventArgs) Handles Me.Load
        Me.tree.CheckBoxes = True
        Me.tree.AutoCheckChildNodes = False
        Me.tree.TriStateMode = True

        For i As Integer = 1 To 2
            Dim node As New RadTreeNode("Parent " + i.ToString)
            Me.tree.Nodes.Add(node)
            For j As Integer = 1 To 3
                node.Nodes.Add("Child " + j.ToString)
            Next
        Next

        Me.tree.ExpandAll()

    End Sub

    Private Sub tree_NodeMouseClick(sender As Object, e As RadTreeViewMouseEventArgs) Handles tree.NodeMouseClick

        e.Node.Current = True
        Select Case e.Node.CheckState

            Case Enumerations.ToggleState.On
                e.Node.CheckState = Enumerations.ToggleState.Off
            Case Enumerations.ToggleState.Off
                e.Node.CheckState = Enumerations.ToggleState.Indeterminate
            Case Enumerations.ToggleState.Indeterminate
                'won't change the state on a parent node if not all child nodes are checked!
                e.Node.CheckState = Enumerations.ToggleState.On
        End Select
        e.Node.Current = False

    End Sub

    Private Sub tree_NodeCheckedChanging(sender As Object, e As RadTreeViewCancelEventArgs) Handles tree.NodeCheckedChanging
        If Not e.Node.Current Then
            e.Cancel = True
        End If
    End Sub
End Class

I hope that makes sense..
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Sep 2021
1 answer
471 views

Hi,

I have a RadForm. It has a borderwidth of 4,1,4,4. When I inspected, found that there's a FormImageBorderPrimitive and it has a width of 3,0,3,3. I tried changing the visibility of this element but still the border is there. Is there to remove this border and have only border width of 1,1,1,1

Thanks

Todor
Telerik team
 answered on 17 Sep 2021
0 answers
164 views

Hi,

I'm trying to change the size of the buttons in dock window. I tried changing it via RadControlSpy in runtime as well. But it doesn't seem to change. It is always 22px*22px.

I tried the below code

toolTabStrip.AutoHideButton.ImagePrimitive.Size = new Size(14, 14);
toolTabStrip.AutoHideButton.Size = new Size(14, 14);

Is there a way to change these size ?

Thanks

Kumaran
Top achievements
Rank 1
Iron
 updated question on 17 Sep 2021
3 answers
252 views

In my ListViewType.DetailsView, RadListView control, I have a simple item format method as follows.

        private static void RlvScanMeterNumber_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e)
        {

            if (e.VisualItem.Selected)
            {
                e.VisualItem.BackColor = Color.Red;
            }
            else
            {
                e.VisualItem.ResetValue(VisualElement.BackColorProperty, ValueResetFlags.None);
            }
        }

Before when I had the reset flag of that ResetValue function set to ValueResetFlags.Local, it DID NOT WORK.

However, after some experimentation, I found that if I used ValueResetFlags.None, it does work!

I am manually adding the list items to the list view, as per the unbound data scenario. So would that have something to do with it?

Why is that?

What do these ValueResetFlags mean?

Stoyan
Telerik team
 answered on 16 Sep 2021
1 answer
567 views

I am currently changing the background row on my RadListView, when click selected via the visual item formatting event like this:


        private static void RadListView_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e)
        {

            if (e.VisualItem.Selected)
            {
                e.VisualItem.BackColor = Color.Red;
            }
            else
            {
                e.VisualItem.ResetValue(VisualElement.BackColorProperty, ValueResetFlags.None);
            }
        }

This works great when I click on a row to select it. It does change to a red background.

If you click on another row that is not selected, the state does appear to change with the old row reverting back and the new row changing to a red background.

However if you click the same row, the one you just selected, nothing appears to happen.

How can you code up a toggle of a given row's selection state, if you click it once to select and click it again to deselect?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 16 Sep 2021
1 answer
1.0K+ views

I have a databound radgridview. 

 

I have added a GridViewHyperLinkColumn as seen below to the grid after the databound.

GridViewHyperlinkColumn col = new GridViewHyperlinkColumn();

                    col.Width = 200;
                    col.FieldName = "Title";
                    col.HeaderText = "Title";
                    col.Name = "Title";
                    col.HyperlinkOpenAction = HyperlinkOpenAction.SingleClick;
                    gvResults.Columns.Insert(5, col);

 

On the CellFormatting I have added the follow to show a short text but a different Hyperlink

 private void gvResults_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
        {
            if(e.Column.Name == "Title")
            {
                string LinkUrl = e.Row.Cells["Path"].Value.ToString();
                string LinkTitle = e.CellElement.Text;
                e.CellElement.Text = $"<html> <a href=\"{LinkUrl}\" >{ LinkTitle}";
                e.CellElement.DisableHTMLRendering = false;
                e.CellElement.ToolTipText = LinkUrl;
            }
        }

 

I have registered

gvResults.HyperlinkOpening += gvResults_HyperlinkOpening;

 

And perform some items during this that include Opening the link using the ProcessStart.

 

My issue is the link opens in a browser before the gvResults_Hyperlink event is called.

I DO NOT want the LINK to open automatically, I want the gvResults_HyperLinkOpening event to do the open.

 

Any suggestions?

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Sep 2021
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
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
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
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?