Telerik Forums
UI for WinForms Forum
5 answers
237 views
Hi,
i want to customize scheduler by changing style of cells. I want to do it dynamiclly. Etc i want some cells to be red other to be green. How can i access cells while control is loading to set cell style?

Thanks
Marcin
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Sep 2019
11 answers
299 views
Hi,
            I want to increase or decrease the row height of the schedular there is no such property rowheight for radscheduler how can i do it.....can anyone explain it


Thanks
Divya
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Sep 2019
1 answer
255 views

Dear Admins,

I want to Show the Desktop alert specific position on the screen

Like I have a Parent Form which covers the full screen. A Child form is Called from the Parent as ShowDialog.

The requirement is to Display the Alert on the Location of Child Form (Bellow the Tittle Bar of Child Form). the width of Alert will be Equal to the Width of Form.

 

How can i achieve this behavior.

Dimitar
Telerik team
 answered on 24 Sep 2019
1 answer
147 views

Hello,

With the R3 2019 release of the UI for WPF suite, you have introduced a brand new VisualStudio2019 theme.

Is there a chance this theme will also soon be available for WinForms ?

Thanks,

Best regards

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 Sep 2019
2 answers
144 views

I'm using tags to selectively format cells and using automatic layout saving/loading. When a layout is loaded, cell tags are lost. Example code below. I feel like the cell tag should remain intact and this is a bug? I tried to include a project but only images are allowed on the forum.

 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Telerik.WinControls;
using Telerik.WinControls.UI;
 
namespace TestGridViewTagsLayout
{
    public class Form1 : Form
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
 
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
 
        #region Windows Form Designer generated code
 
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            Telerik.WinControls.UI.TableViewDefinition tableViewDefinition3 = new Telerik.WinControls.UI.TableViewDefinition();
            this.radGridView1 = new Telerik.WinControls.UI.RadGridView();
            this.cmdLoadLayout = new System.Windows.Forms.Button();
            this.cmdSaveLayout = new System.Windows.Forms.Button();
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1.MasterTemplate)).BeginInit();
            this.SuspendLayout();
            //
            // radGridView1
            //
            this.radGridView1.Location = new System.Drawing.Point(12, 12);
            //
            //
            //
            this.radGridView1.MasterTemplate.ViewDefinition = tableViewDefinition3;
            this.radGridView1.Name = "radGridView1";
            this.radGridView1.Size = new System.Drawing.Size(776, 394);
            this.radGridView1.TabIndex = 0;
            this.radGridView1.CellFormatting += new Telerik.WinControls.UI.CellFormattingEventHandler(this.RadGridView1_CellFormatting);
            //
            // cmdLoadLayout
            //
            this.cmdLoadLayout.Location = new System.Drawing.Point(12, 415);
            this.cmdLoadLayout.Name = "cmdLoadLayout";
            this.cmdLoadLayout.Size = new System.Drawing.Size(75, 23);
            this.cmdLoadLayout.TabIndex = 1;
            this.cmdLoadLayout.Text = "Load Layout";
            this.cmdLoadLayout.UseVisualStyleBackColor = true;
            this.cmdLoadLayout.Click += new System.EventHandler(this.CmdLoadLayout_Click);
            //
            // cmdSaveLayout
            //
            this.cmdSaveLayout.Location = new System.Drawing.Point(93, 415);
            this.cmdSaveLayout.Name = "cmdSaveLayout";
            this.cmdSaveLayout.Size = new System.Drawing.Size(75, 23);
            this.cmdSaveLayout.TabIndex = 1;
            this.cmdSaveLayout.Text = "Save Layout";
            this.cmdSaveLayout.UseVisualStyleBackColor = true;
            this.cmdSaveLayout.Click += new System.EventHandler(this.CmdSaveLayout_Click);
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(800, 450);
            this.Controls.Add(this.cmdSaveLayout);
            this.Controls.Add(this.cmdLoadLayout);
            this.Controls.Add(this.radGridView1);
            this.Name = "Form1";
            this.Text = "Form1";
            this.Load += new System.EventHandler(this.Form1_Load);
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1.MasterTemplate)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).EndInit();
            this.ResumeLayout(false);
 
        }
 
        #endregion
 
        private Telerik.WinControls.UI.RadGridView radGridView1;
        private System.Windows.Forms.Button cmdLoadLayout;
        private System.Windows.Forms.Button cmdSaveLayout;
 
        private string layoutXml = null;
        public Form1()
        {
            InitializeComponent();
        }
 
        private void Form1_Load(object sender, EventArgs e)
        {
            List<TestEntity> list = new List<TestEntity>();
            list.Add(new TestEntity() { a = "1", b = "1", c = "1" });
            list.Add(new TestEntity() { a = "1", b = "2", c = "2" });
            list.Add(new TestEntity() { a = "3", b = "1", c = "1" });
            list.Add(new TestEntity() { a = "1", b = "1", c = "1" });
 
            radGridView1.AutoGenerateColumns = false;
 
            GridViewTextBoxColumn textBoxColumn = new GridViewTextBoxColumn();
            textBoxColumn.Name = "a";
            textBoxColumn.HeaderText = "A";
            textBoxColumn.FieldName = "a";
            textBoxColumn.AutoSizeMode = BestFitColumnMode.AllCells;
            radGridView1.MasterTemplate.Columns.Add(textBoxColumn);
 
            textBoxColumn = new GridViewTextBoxColumn();
            textBoxColumn.Name = "b";
            textBoxColumn.HeaderText = "B";
            textBoxColumn.FieldName = "b";
            textBoxColumn.AutoSizeMode = BestFitColumnMode.AllCells;
            radGridView1.MasterTemplate.Columns.Add(textBoxColumn);
 
            textBoxColumn = new GridViewTextBoxColumn();
            textBoxColumn.Name = "c";
            textBoxColumn.HeaderText = "C";
            textBoxColumn.FieldName = "c";
            textBoxColumn.AutoSizeMode = BestFitColumnMode.AllCells;
            radGridView1.MasterTemplate.Columns.Add(textBoxColumn);
 
            radGridView1.DataSource = list;
            HighlightFieldChanges();
            radGridView1.TableElement.Update(GridUINotifyAction.Reset);
        }
 
        private void HighlightFieldChanges()
        {
            for (int i = 1; i < radGridView1.RowCount; i++)
            {
                GridViewRowInfo prevRow = radGridView1.Rows[i - 1];
                GridViewRowInfo curRow = radGridView1.Rows[i];
 
                for (int j = 0; j < prevRow.Cells.Count; j++)
                {
                    if (!(Convert.ToString(prevRow.Cells[j].Value).Equals(Convert.ToString(curRow.Cells[j].Value))))
                    {
                        prevRow.Cells[j].Tag = true;
                    }
                }
            }
        }
 
        private void RadGridView1_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
        {
            if (((e.Row.Cells[e.ColumnIndex].Tag) as bool?).GetValueOrDefault(false) == true)
            {
                e.CellElement.DrawFill = true;
                e.CellElement.BackColor = Color.LightYellow;
                e.CellElement.NumberOfColors = 1;
            }
            else
            {
                e.CellElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local);
                e.CellElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local);
                e.CellElement.ResetValue(LightVisualElement.NumberOfColorsProperty, ValueResetFlags.Local);
            }
        }
 
        private void CmdSaveLayout_Click(object sender, EventArgs e)
        {
            MemoryStream ms = new MemoryStream();
            radGridView1.SaveLayout(ms);
            ms.Flush();
            ms.Position = 0;
            StreamReader sr = new StreamReader(ms);
            layoutXml = sr.ReadToEnd();
        }
 
        private void CmdLoadLayout_Click(object sender, EventArgs e)
        {
            MemoryStream ms = new MemoryStream();
            StreamWriter sw = new StreamWriter(ms);
            sw.Write(layoutXml);
            sw.Flush();
            ms.Position = 0;
            radGridView1.LoadLayout(ms);
            radGridView1.TableElement.Update(GridUINotifyAction.Reset);
        }
    }
 
    public class TestEntity
    {
        public string a { get; set; }
        public string b { get; set; }
        public string c { get; set; }
    }
}
Dimitar
Telerik team
 answered on 23 Sep 2019
1 answer
95 views

My lineseries won't draw the line between points unless I use the category menu to change the palette at run time. I need to define my own palette.

What have I missed, or is this a bug?

Please see extracted solution that shows the problem. I've hand coded all the series etc as messing too much in the designer seems to corrupt the design file.

http://www.mediafire.com/file/0louxrb7fzx1ajt/testappchart.rar/file

Dimitar
Telerik team
 answered on 23 Sep 2019
3 answers
229 views
Normally in radlistview with multi Rows and Columns I can use arrowkey to move between subitems but my intention is to use tab to move faster, I wrote this code but it didn't work (using tabkey to activate arrowkey)
My initial idea was to locate the subitems (via the current column and the current listviewdataitem however I didn't know how to activate the subitems) like using vba to activate a certain cell in excel: Cells ( 1,1) .activate but I haven't found this function yet
Can you tell me can do it or not?
thanks you.
'---------------------------------
 
Private Sub RadListview_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles RadListview.PreviewKeyDown
        If Not (e.Modifiers = Keys.Shift) AndAlso e.KeyCode = Keys.Tab Then
            My.Computer.Keyboard.SendKeys("{right}", True)
            'SendKeys.Send("{right}")
 
        ElseIf e.Modifiers = Keys.Shift AndAlso e.KeyCode = Keys.Tab Then
 
            SendKeys.Send("{left}")
        End If
    End Sub

 

Dimitar
Telerik team
 answered on 23 Sep 2019
12 answers
1.3K+ views

Hi. I'm a new user of telerik radlistview control and I'm having some problems importing tables from excel into listview.
I think I can use loops to do this however I want to use datasource to import once. The problem is that I am not sure what type of data for datasource. Is it the same with listfillrange property (lisbox.list = variant) for listbox in excel like vba?
Can this work or not:

        Dim import As XlsxFormatProvider = New XlsxFormatProvider
        Dim wb As Workbook = import.Import(File.ReadAllBytes(exportfile))
        Dim ws As Worksheet = wb.Sheets(0)
        Radlistview.DataSource = ws.UsedRange

Thanks you!
Khanh
Top achievements
Rank 1
Iron
 answered on 20 Sep 2019
5 answers
1.1K+ views

Hi . I have set up some events for listview on windows form where some events (keydow, rightclick ..) will change listview's cell value, others will work if detecting this value change ( give notice to users, ....)
I used some events:
listview_ItemValuechanged
listview_Text
listview_ItemEdite
listview_ItemValuechanging
however they do not seem to be detected when a change in value occurs from another event

How can i implement this idea?

Thanks a lot

 

Nadya | Tech Support Engineer
Telerik team
 answered on 20 Sep 2019
3 answers
117 views

Hi,

As of now In SchedulerDayView we are able to get the next date by clicking the Previous view and Next view option on the context menu. We need an option to set it on a scroll bar. Please suggest. Attached video link & code screenshot for your reference.    

Video link  & Screenshot

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Sep 2019
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
NavigationView
VirtualKeyboard
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?