Telerik Forums
UI for WinForms Forum
1 answer
133 views

Is there a Winforms example of a RadCheckedDropDownList as an Editor for a PropertyGrid?

There is a sample for WPF, https://docs.telerik.com/devtools/wpf/controls/radpropertygrid/features/radenumeditor

There is sample for Winforms Gridview, https://docs.telerik.com/devtools/winforms/controls/dropdown-listcontrol-and-checkeddropdownlist/checkeddropdownlist/how-to/use-as-radgridview-editor

but nothing for Winforms PropertyGrid.

How would I get the following to appear as a checked drop down editor inside a property grid in winforms?


using CommunityToolkit.Mvvm.ComponentModel;

namespace ProjectXYZ.Model.Enums;

public enum BroadcastPlanEnum
{
    Plan1, Plan2, Plan3, Plan4, Plan5, Plan6
}

public sealed partial class BroadcastPlanActive : ObservableObject
{
    [ObservableProperty]
    private BroadcastPlanEnum broadcastPlan;

    [ObservableProperty]
    private bool selected;
}

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 31 Oct 2022
1 answer
136 views

I am not having any luck finding a way to adjust the height of status string on my form.

 

TIA for any help

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 31 Oct 2022
2 answers
130 views

How can I add a Datetime to the exported file name

spreadExporter.RunExport(@"C:\#support\Reports\AlarmsRpt\AlarmsReport.xlsx", renderer);

Does not allow for overloads, so, how can I do it?

Thanks,

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 31 Oct 2022
1 answer
356 views

Hi,

I’m a litte bit confused concerning checkboxes in the Telerik GridView. For this a made an example program to show the confusing point. It has to do with checkboxes, states and filtering.

I’ve a grid with a twoState checkbox and one with a threeState checkbox. The threeState one is doubled, one based on the nullable boolean and one with a typeconverter.

My goal is when I’ve a twostate checkbox column, to also have a twostate filter. When I let the code default, I get a threestate checkbox in the filter area. The third state is a filled box (Indeterminate). In my opinion it has no value because the filtering is treated like ‘I don’t care what the content is’ or simply ‘no filtering’. Ok.. I could live with that. The meaning of the Indeterminate status is the same as no filtering.

Now the first threestate one (bool?). when I start the application there is no checkbox in the filter area and it says ‘no filter’. If I want to filter I’ve to click explicitly on the filtericon, then the checkbox appears and I can click on it. The third state (Indeterminate) is like the first column. I see all the records. What I see as a problem is that I can’t filter on records who has Indeterminate (or null) as value. Thereby the meaning of the Indeterminate is not clear anymore. The filtering is treated like ‘no filter’ but in the records it means ‘there is no value’. Also I can’t get control on the appearance of the filterbox. Try playing with it by clicking on the checkbox and clicking ‘no filter’ in the contextMenu. Sometimes the filter checkbox disappears or its not clickable anymore. ??

The third checkbox column is one with a typeConverter behind it. At start of the application there is a checkbox in the filterarea and its stated as Indeterminate. I see all the records so it’s meaning should be the same as the first column – ‘no filtering’. Now when I start clicking on the filtercheckbox the meaning changes. Now it filters on Indeterminate. When I remove the filter through the contextMenu, the filterbox disappears. This is actually correct but it’s start state is not.

So, I’m pretty confused now.

Of course I’ve searched around on the internet and I found something interesting. In one the items on the Telerik forum I saw a possibility for breaking in on the filter checkbox appearance – it’s the ViewCellFormatting event. It looks like that when I’ve a twostate column, the filtercheckbox gets threestate and visaversa. Is this a bug??

In my example application I changed that (see code). A twoState column gets also a two state filtercheckbox by setting it explicitly. So please enable the eventhandler and run the program again.

Now I almost get what I would expect. The first column which is twostate, can only be filtered on 2 states. True or false. If one want to see all, remove the filter. Sounds logically.

The first threestate column (bool?) has no checkbox at start of the application. When I set filtering through the contextMenu, it appears and the meaning of Indeterminate is like ‘no filter’. If I remove the filter, the checkbox does not and the state is Indeterminate. ??

The second threestate (with a converter) reacts the same as without the eventhandler. It starts with a checkbox in the filter area which has the Indeterminate state, but I see all the records. After clicking it, it starts to filter it correctly. At removing the filter, the filterbox is empty.

As you can probably understand the current situation is not acceptable for us because of ambiguous meanings and inconsistency concerning the start situation and after working in the grid.

 What’s going on?? What is the intention of Telerik and where do I get confused??

 What I would like to have is in case of a two state column, a two state filtercheckbox and the working of the column with the converter except not with that starting state. At start the filterbox should be empty.

Please help me out of this.

Dinko | Tech Support Engineer
Telerik team
 answered on 28 Oct 2022
2 answers
108 views

When exporting a RadDataGridView with the Export-Visuals enabled this handled what I needed (export conditional formatting), however it slowed the export down greatly. My solution was to swap to Async export. This did make the GUI better, but broke the export of conditional formatting. I jury-rigged a solution that works well enough, although not great. Figured I'd pass this along just in case it helps others


[Main Export Method ...]
BtnExportExcel.Enabled = false;
try
{
    GridViewSpreadExport spreadExporter = new GridViewSpreadExport(this.radGridView1);
    spreadExporter.ExportChildRowsGrouped = true;
    spreadExporter.HiddenColumnOption = Telerik.WinControls.UI.Export.HiddenOption.DoNotExport;
    spreadExporter.HiddenRowOption = Telerik.WinControls.UI.Export.HiddenOption.DoNotExport;
    spreadExporter.FileExportMode = FileExportMode.CreateOrOverrideFile;
    SpreadExportRenderer exportRenderer = new SpreadExportRenderer();
    spreadExporter.ExportVisualSettings = true;
    lastFileName = fileName;
    using (var bgw = new BackgroundWorker())
    {
        pgb_Saving.Value = 0;
        pnlSaving.Visible = true;
        var bgwFileName = fileName;
        bgw.DoWork += (o,e)=> spreadExporter.RunExport(bgwFileName, exportRenderer);
        bgw.RunWorkerCompleted += SpreadExporter_AsyncExportCompleted;
        bgw.RunWorkerAsync();
    }
                        
}
catch (Exception ex)
{
    BtnExportExcel.Enabled = true;
}
[...]

private void SpreadExporter_AsyncExportCompleted(object sender, AsyncCompletedEventArgs e)
{
    pgb_Saving.Value = 0;
    pnlSaving.Visible = false;
    tsbDataGridViewExportExcel.Enabled = true;
    if (e.Error is null && System.IO.File.Exists(lastFileName))
    {

        string szTemp = "'" + lastFileName + "' created.\r\n\r\nWould you like to open the spreadsheet?";
        var iRet = MsgBox.ConfirmMsg(szTemp, MessageBoxButtons.YesNo, "Spreadsheet Created");
        if (iRet == DialogResult.Yes) System.Diagnostics.Process.Start(lastFileName);
    }
    SwapForExport(false);
}

private void pnlSaving_VisibleChanged(object sender, EventArgs e)
{
    if (pnlSaving.Visible)
    {
        if (pnlSaving.Tag  as Timer is null) {
            var tmr = new Timer() { Interval = 250 };
            tmr.Tick += Timer_Tick;
            pnlSaving.Tag = tmr;
                }
        ((Timer)pnlSaving.Tag).Start();
    }
    else
    {
        if(pnlSaving.Tag is Timer tmr)
        {
            tmr.Stop();
        }
    }
}

private void Timer_Tick(object sender, EventArgs e)
{
//pgb_Saving is a Progress Bar
    pgb_Saving.Value = (pgb_Saving.Value + 1) % pgb_Saving.Maximum;
}

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Oct 2022
1 answer
316 views

Hello,

I have a small terminal type app that displays some data in a RadTextBoxControl as it arrives. Events are fired and data is displayed on the screen by way of the RadTextBoxControl. That part works great.  

When certain strings arrive, I'd like to replace it with a hyperlink or button of sorts. I found the example for Creating Custom Blocks (https://docs.telerik.com/devtools/winforms/controls/editors/textboxcontrol/creating-custom-blocks) and this looked really promising. But, the issue I had there is that this event fires on on lots of different characters. Meaning, you can't use it to parse out a line of text and then replace it with a custom object. You parse each block as it comes in.

Ideally, I want certain types of text, like "<link cmd=".cm*">Run custom command</link>" to be replaced with some text that looks like "Run custom command" but in a way that it acts like a hyperlink where I can register for its click event and do whatever I need to do. This is proving to be pretty tricky for me but I have a feeling Telerik controls probably have a way :)

Thanks,

Michael

Dinko | Tech Support Engineer
Telerik team
 answered on 26 Oct 2022
1 answer
143 views

Hello Telerik,

 

Sorry, is it possible to create something like (I'm not really sure what it calls) flow or line with nodes or checkpoint ? Maybe like this image

 

Or like, if we played an adventure game, an on that game there was a map that shows where we were and what was the next quest or city, or anything.


Thanks before.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Oct 2022
1 answer
155 views

Hello Team,

In cell biginedit, the text is selected and focused at the end of the value. If I click the cell, the text shows the front text. clicking on the tab key. The cell value again shows the last value. It should show the first value.

Using this code to bind the grid cell - Microsoft.VisualBasic.Val(7)/1000 & Left (CD & Space (20), 20)

Here, the cell value shows "7", but we need to show a "CD" on the front. Please help us resolve this issue. A video link has been added for your convenience.

Video link : https://suganya-gmail.tinytake.com/df/1379872/thumbnail?type=attachments&version_no=0&file_version_no=0&thumbnail_size=preview

Screenshot : https://prnt.sc/_ZlhOr-sovVe

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Oct 2022
1 answer
257 views

Hi,

I am trying to do Drag&Drop as show in the Telerik documentation (see https://docs.telerik.com/devtools/winforms/controls/gridview/rows/drag-and-drop).

I tried to implement it in three different ways:

1) after reading the doc, I downloaded the code and build it with VS2022. This code uses .Net Framework 4.6.1 and works exactly as expected.

2) Then, I tried to add it to my current project using .Net 6 and the current Telerik Library. I did it both in the form where it should be used and in a dedicated form with the exact code provided. In both cases, I have the 'strange' behavior that the drag works but as soon as the grabed row is movingout of its origin,  a "no entry" sign is shown both in some area of the initial grid view and everywhere in the destination one (see picture).

3 Then I tried to do it in a brand new .Net 6 project to dismiss a potential setup in my project. In this third one evrything compile and run nicely, BUT there is absolutely no drag and drop behavior.

I attached this last project, but it is really exactly the downloaded code.

So can someone explain what is wrong in this code or my way to use it ?

Many thanks

Patrick

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Oct 2022
1 answer
180 views

Hi.

I'm trying to draw a specific graph using RadChartView.

However, I couldn't find a way to remove the border line, which is marked with a red arrow in the attached image.

The background color must be Transparent.

Please tell me how to remove only those lines.

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Oct 2022
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?