Telerik Forums
UI for WinForms Forum
3 answers
129 views

Hello Telerik,

I'm looking to reproduce one of the gauge of Yahoo finance (see objectiv.jpg) but I'm stuck with my prototype (see actual.jpg) and the following questions !

 

- How to change the text of labels ?

- How to customize the rendering of the needleIndicator and its label ? (In my prototype I can't put the label above the NeedleIndicator with TextOffsetIndicator because it go outside the border of the control and is not drawn)

 

Thank you for your support

Marco Guignard

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 07 Apr 2021
2 answers
538 views

Hello, does anybody have experience with printing gridview where one of the columns contains strings formatted with barcode font?

I have three columns in the grid and my goal is to print gridview where one column is formatted with barcode font and the rest of columns are formatted with different font. I am able to set the barcode font to all datacells. It seems that GridPrintStyle does not support such granular columns formatting.

private void btnPrintDispatchedContainers_Click(object sender, EventArgs e)
{
    GridPrintStyle style = new GridPrintStyle();
    style.FitWidthMode = PrintFitWidthMode.NoFit;
    style.PrintGrouping = true;
    style.PrintHeaderOnEachPage = true;
    style.PrintHiddenColumns = false;
    Font barcodeFont = new Font("Code 128", 20f, FontStyle.Regular);
    Font groupRowFont = new Font("Segoe UI", 12f, FontStyle.Bold);
    style.CellFont = barcodeFont;
    style.GroupRowFont = groupRowFont;
    rgvDispatchedContainers.PrintStyle = style;
    rgvDispatchedContainers.Print();
}

 

Any thoughts will be appreciated.

Tomas
Top achievements
Rank 2
Veteran
 answered on 06 Apr 2021
6 answers
330 views

Hi,

When I query a RadGridView column's FilterDescriptor (.ToString()) I am getting basically an SQL representation of the applied filter, for example:

([coupon] >= 0.5) AND (([analytics_model_class] LIKE '%Other%' OR [analytics_model_class] NOT LIKE '%Card%'))

However, when I have to set the FilterDescriptor programmatically, I need to use the code as described here:

https://docs.telerik.com/devtools/winforms/controls/gridview/filtering/setting-filters-programmatically-(composite-descriptors)

This is pretty hard if I load a previously created SQL-like clause and now need to parse it in order to set the FilterDescriptors for all the columns.

Seems to me that there should be a utility available for this kind of purpose already, especially since Telerik already converts FilterDescriptors to SQL-like clauses.

Is there something that can help?

Thank you

Peter

 

 

 

Pioter
Top achievements
Rank 1
 answered on 05 Apr 2021
1 answer
90 views

Hello,

 

I am currently using a Scheduler control in weekview where the range of hours that's visible is about 6 hours.

The appointments are shown in this view but the text is always aligned at the top of the AppointmentElement.

When the top of the AppointmentElement is outside the view, you see only a colored rectangle and it's not clear what appointment is shown

 

Is there a way to

- align the text at the top of the AppointmentElement when the start-time is within the view.

- align the text at the top of the Schedulerview when the start-time is NOT within the view. (the text will be shown somewhere in the middle of the rectange)

 

I have added a picture to clarify my question.

 

Best regards

Patrick Vossen

Nadya | Tech Support Engineer
Telerik team
 answered on 05 Apr 2021
1 answer
259 views

I'm having an issue with updates not occurring in a while scrolling ListView with SimpleListViewVisualItem children down - scrolling up works fine.  Figuring it has to do with virtualization/cell reuse and the VisualItemFormatting method is incomplete and needs to update the row.

Where am I going wrong?

Thanks,

_D

 

using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Telerik.WinControls.Layouts;
using Telerik.WinControls.UI;
 
namespace TelerikWinFormsApp4
{
    public partial class RadForm1 : Telerik.WinControls.UI.RadForm
    {
        public RadForm1()
        {
            InitializeComponent();
 
            this.radListView1.VisualItemCreating += new ListViewVisualItemCreatingEventHandler(this.radListView1_VisualItemCreating);
            this.radListView1.VisualItemFormatting += new ListViewVisualItemEventHandler(radListView1_VisualItemFormatting);
 
            // Populate BullJiveTestListItem with fluff
            BindingList<BullJiveTestListItem> rows = new BindingList<BullJiveTestListItem>();
            for (int alpha = 65; alpha < 85; alpha++) rows.Add(new BullJiveTestListItem(Convert.ToChar(alpha).ToString()));
 
            this.Size = new Size(500, 300);
            radListView1.DataSource = rows;
            radListView1.ItemSize = new Size(0, 100);
            radListView1.FullRowSelect = true;
        }
 
 
        private void radListView1_VisualItemCreating(object sender, ListViewVisualItemCreatingEventArgs e)
        {
            if (radListView1.ViewType == ListViewType.ListView)
            {
                e.VisualItem = new RowVisualItem();
            }
        }
 
 
        private void radListView1_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e)
        {
            if (radListView1.ViewType == ListViewType.ListView)
            {
                //BullJiveTestListItem v = (BullJiveTestListItem)e.VisualItem.Data.Value;
                //????
            }
        }
    }
 
    public class RowVisualItem : SimpleListViewVisualItem
    {
        private LightVisualElement hBox0, hBox1;
        private StackLayoutPanel horizontalLayout;
        private Point newSize = new Point(0, 100);
 
 
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
 
            horizontalLayout = new StackLayoutPanel();
            horizontalLayout.Orientation = Orientation.Horizontal;
 
            hBox0 = new LightVisualElement();
            hBox0.MinSize = new Size(newSize);
            horizontalLayout.Children.Add(hBox0);
 
            hBox1 = new LightVisualElement();
            hBox1.MinSize = new Size(newSize);
            horizontalLayout.Children.Add(hBox1);
 
            Children.Add(horizontalLayout);
        }
 
 
        protected override void SynchronizeProperties()
        {
            base.SynchronizeProperties();
 
            if (this.FindAncestor<RadListViewElement>() == null) return;
 
            this.Text = "<html><span style=\"color:black;font-size:14.5pt;\">Text</span>";
 
            hBox0.Size = new Size(newSize);
            hBox0.Text = "<html><span style=\"color:green;\">(hBox0)Value0: </span><span style=\"color:DarkMagenta;\">" + this.Data["Value0"] + "</span>" +
                         "<br><span style=\"color:red;\">(hBox0)Value1: </span><span style=\"color:blue;\">" + this.Data["Value1"] + "</span>";
 
            hBox1.Size = new Size(newSize);
            hBox1.Text = "<html><span style=\"color:darkblue;\">(hBox1)Value2: </span><span style=\"color:purple;\">" + this.Data["Value2"] + "</span>" +
                         "<br><span style=\"color:orange;\">(hBox1)Value3: </span><span style=\"color:gray;\">" + this.Data["Value3"] + "</span>";
 
            TextAlignment = ContentAlignment.TopLeft;
        }
 
 
        protected override Type ThemeEffectiveType
        {
            get
            {
                return typeof(SimpleListViewVisualItem);
            }
        }
    }
    public class BullJiveTestListItem
    {
        public BullJiveTestListItem(string s)
        {
            Value0 = s + "0";
            Value1 = s + "1";
            Value2 = s + "2";
            Value3 = s + "3";
        }
 
 
        public string Value0 { get; set; }
        public string Value1 { get; set; }
        public string Value2 { get; set; }
        public string Value3 { get; set; }
    }
}
Nadya | Tech Support Engineer
Telerik team
 answered on 05 Apr 2021
4 answers
267 views

I have a CheckedListBox with 3 columns.

But, I can't figure out how to set the width of each column even though I have used the code shown below;

    Private Sub BuildListBoxColumns()
        Dim nameColumn As New ListViewDetailColumn("Line Item Description")
        nameColumn.HeaderText = "Line Item Description"
        nameColumn.MinWidth = 800
        nameColumn.Width = 800
        Me.lbInvoiceItems.Columns.Add(nameColumn)
        Dim SKUColumn As New ListViewDetailColumn("SKU")
        SKUColumn.HeaderText = "SKU"
        SKUColumn.MinWidth = 120
        SKUColumn.Width = 120
        Me.lbInvoiceItems.Columns.Add(SKUColumn)
        Dim QtyColumn As New ListViewDetailColumn("Qty")
        QtyColumn.HeaderText = "Qty"
        QtyColumn.MinWidth = 80
        QtyColumn.Width = 100
        Me.lbInvoiceItems.Columns.Add(QtyColumn)
    End Sub

The MinWidth on each columns simply doesn't work.

How do I properly set the minwidth for each column?

it's probably something simple, but I cannot see why this isn't working

 

 

 

Nadya | Tech Support Engineer
Telerik team
 answered on 05 Apr 2021
3 answers
207 views

Good Morning.

I am trying to figure out how to programmatically (C#) add text to the editor with styles built into to the string. The codes that the editor control accepts doesn't matter to me as I can run a conversion from the string to what's acceptable by the control. I've looked through the documentation that I could find and only found things like "control.method" instead of the control actually reading the text to find out what to "Switch on and off", etc.

For a crude example, an html string might consist of "hello my <b>bold</b> string.". What would I replace <b> and </b> with so that the editor can translate them into bold and non-bold? I am only using HTML has an example, it could be anything.

Normally, I wouldn't use the editor control as it has a tons of stuff I would never use, but it seems to be the only control available for possibly support styles, colors, and inline images (emoticons).

Shann
Top achievements
Rank 1
 answered on 01 Apr 2021
2 answers
519 views

Hi, I'm using the code sample from this page:
Handling Users Input | Toast Notification | Telerik UI for WinForms

But after clicking on button_Click() - nothing happens.  E.g., the Toast Notification does not appear.
    Private Sub button_Click(ByVal sender As Object, ByVal e As EventArgs)
        Me.radToastNotificationManager.ShowNotification(1)
    End Sub

I must be missing something?!

I'm running on Windows 10 if that makes a difference or not.

Do I need to change a setting in windows 10 somewhere for the notifications to appear?

 

 

Nadya | Tech Support Engineer
Telerik team
 answered on 01 Apr 2021
1 answer
107 views

Hi!

I managed to hide the ApplicationButton of my RibbonBar by setting its visibility to hidden.

But the space where the button was is still visible, see attached screenshot 1, I would like have the first RibbonTab start at the very left, see screenshot 2.

Is this possible? If not, is it at least possible to set the color of the space where the button was to white?

Thanks a lot!

Screenshot 1:

 

Screenshot 2: It should look like this:

 

Nadya | Tech Support Engineer
Telerik team
 answered on 01 Apr 2021
3 answers
123 views

is there a way to capture when the Search Bar Text is chaging/changed?

 

TIA

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 01 Apr 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)
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?