Telerik Forums
UI for WinForms Forum
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
1 answer
363 views

I've been thinking about it for a few days and couldn't find a solution, so I'm asking for help.

This chart displays product weight values.

In this chart, I want to draw a line according to the change condition of the maximum and minimum criteria.

In this chart, there is no problem in drawing lines without changing based on the minimum and maximum settings.

However, if the min and max values are changed in the middle, I want to draw a new line based on that criteria.

            foreach (DataRow row in dataTable.Rows)
            {
                lineSeries4.DataPoints.Add(new CategoricalDataPoint(double.Parse(row["PRODUCT WEIGHT"].ToString()), row["REC.TIME"].ToString()));
            }

            radChartView.Series.Add(lineSeries4);

            // x축 라벨
            CategoricalAxis categoricalAxis = radChartView.Axes[0] as CategoricalAxis;
            categoricalAxis.LabelInterval = dataTable.Rows.Count / 5;

            // y축 라벨
            LinearAxis verticalAxis = radChartView.Axes[1] as LinearAxis;
            verticalAxis.MajorStep = 0.200;
            verticalAxis.Maximum = double.Parse(sValue[2]) + 0.1;
            verticalAxis.Minimum = double.Parse(sValue[1]) - 0.5;
            //verticalAxis.LabelInterval = 2;
            verticalAxis.LabelFormat = "{0:F3}";

            // 눈금 표현
            CartesianArea area = radChartView.GetArea<CartesianArea>();
            area.ShowGrid = true;
            CartesianGrid grid = area.GetGrid<CartesianGrid>();
            grid.DrawHorizontalFills = true;
            grid.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Solid;

            // max
            CartesianGridLineAnnotation annotation1 = new CartesianGridLineAnnotation();
            annotation1.Axis = radChartView.Axes[1] as CartesianAxis;
            annotation1.Value = double.Parse(sValue[2]);
            annotation1.BorderColor = Color.Red;
            annotation1.BorderDashStyle = DashStyle.Solid;
            annotation1.BorderWidth = 1;
            annotation1.Label = sValue[2];
            radChartView.Annotations.Add(annotation1);

            // average
            CartesianGridLineAnnotation annotation2 = new CartesianGridLineAnnotation();
            annotation2.Axis = radChartView.Axes[1] as CartesianAxis;
            annotation2.Value = double.Parse(sValue[0]);
            annotation2.BorderColor = Color.Blue;
            annotation2.BorderDashStyle = DashStyle.Solid;
            annotation2.BorderWidth = 1;
            annotation2.Label = sValue[0];
            radChartView.Annotations.Add(annotation2);

            // min
            CartesianGridLineAnnotation annotation3 = new CartesianGridLineAnnotation();
            annotation3.Axis = radChartView.Axes[1] as CartesianAxis;
            annotation3.Value = double.Parse(sValue[1]);
            annotation3.BorderColor = Color.Green;
            annotation3.BorderDashStyle = DashStyle.Solid;
            annotation3.BorderWidth = 1;
            annotation3.Label = sValue[1];
            radChartView.Annotations.Add(annotation3);
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Sep 2021
1 answer
249 views

We have a customized save option and is implemented under the File --> Save (overridden) method. However, the default Ctrl+S is opening up the Savefiledialog and the users are enabled to save a copy. We need to restrict the save to the local disk. Any options on how to override all the possible save options?

 

Thanks,

Kishore

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

I am required to call an API endpoint, which is return a list of strings. This I have working.

Each item within that list is a daily announcement which is a block of text, that needs to be displaying within a scrolling parent frame. Please refer to the attached .PNG file with a screenshot of the mockup I got from our project managers.

I am not sure which is the best way to do this, as I'm relatively new to Telerik Winform UI. I am looking at either a:

DataGridView
ListControl
List of labels within a panel.

Just trying to find the most effective and simple way to do this. Any suggestions?

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 09 Sep 2021
1 answer
295 views
I have a radtreeview that is filled with a bindinglist from a database.. When I try to add an item to the bindinglist I get a System.OverflowException with the message "Radtreenode can contains 32767 level of items". I can't really figure out what is going wrong.

I don't know if it matters but I am still using the 2012 version because it's a legacy project and we are still upgrading.

Thanks.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 09 Sep 2021
1 answer
180 views

Hi,

Am using a telerik winform that contains a telerik textbox and the form can be resized which in turn would resize the textbox as well.

When we enter long text in the textbox and resize the textbox the text is not scrolled to show the text and cursor is at the end of the text which is fine.

For instance, in the image below the text is hidden and after resizing the text should scroll to show text depending on the length of the textbox.

Could you please help with a suitable solution, thank you!

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

Hello

I want to be able to modify the text content of the control programmically at runtime. Below is the code I have tried :

 Placeholder does not change the content
 Dim content_controls As IEnumerable(Of SdtRangeStart) =
        Me.radRichTextEditor1.Document.GetAnnotationMarkersOfType(Of SdtRangeStart)()
        For Each item In content_controls
            'MsgBox("Type: {0} ID:{1}", item.SdtProperties.Type, item.SdtProperties.ID)
            'MsgBox("Type: {0} ID:{1}", item.SdtProperties.Type, item.SdtProperties.ID)

            If item.SdtProperties.Type = SdtType.Text Then

                Dim properties As TextProperties = TryCast(item.SdtProperties, TextProperties)
                If properties.Tag IsNot Nothing AndAlso properties.Tag.ToUpper = "SERIALNO" Then
                    properties.Placeholder.PlaceholderText = "DWF324434244242"
                    properties.Placeholder.ShowPlaceholder = True
                End If
            End If
        Next
Thank You
Dimitar
Telerik team
 answered on 07 Sep 2021
21 answers
1.1K+ views
Radgridview's columns have default filter operation as "Contains :" .  How can i change them to "Start with".

Best Regards,
Kenghot
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Sep 2021
1 answer
226 views

Hello,

I am doing the following to rename a worksheet:

                Worksheet workSheet = sheetReturns.SpreadsheetElement.Workbook.Sheets.Add(SheetType.Worksheet) as Worksheet;
                workSheet.Name = "Missing Top 100";
                dtProvider.Import(_missingTop100, workSheet);
                sheetReturns.SpreadsheetElement.Workbook.ActiveWorksheet = workSheet;
                workSheet.Columns[workSheet.UsedCellRange].AutoFitWidth();

The new name of the sheet does not show unless another worksheet is added or I double click on the worksheet tab.

How can I code this so the new name shows immediately?

Thanks,
Doug

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Sep 2021
2 answers
283 views
Hi, I am using the following line of code to set FilterDescriptors.Expression programatically from a string in SQL-like format:

this.portfolioGrid.FilterDescriptors.Expression = newFiltersExpr;

I discovered the following issue when using a string like 

src_sec_prim_id in ('4008030','4008032','4010014','4025022','4029402','4032004','4150008','4150009','4150010','4150011','4150012')

Note that all the items in the above list have single quotes around them.  But the resulting FilterDescriptors.Expression looks like this:

[src_sec_prim_id] IN (4008030,4008032,4010014,4025022,4029402,4032004,4150008,4150009,4150010,4150011,4150012)

That is, all the single quotes got eliminated! I imagine the issue is the setter of FilterDescriptors.Expression recognizes all the items as numbers and decides to remove the single quotes.

To test this, I used a list that has some items that could not be mistaken for numerical, and indeed this did not happen!

This is an undesirable behavior for me, since I later need to use the FilterDescriptors.Expression to construct an actual SQL query, that breaks if the single quotes are absent.

Would you advise anything that could help me override this behavior?

Thank you!

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
SmartPasteButton
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?