Telerik Forums
UI for WinForms Forum
1 answer
116 views
Hello,

I want to use RadScheduler to build a master/detail form as timeline views:
=> on top, a radscheduler component displaying a global timelineview of summarized tasks, with timescales as months, 12 months displayed.
=> on bottom, another radscheduler displaying a more detailed timeline view, with timescales as days, 30 days displayed.

It seems that any change in one component affects the other one.

                radScheduler1.GetTimelineView().ShowTimescale(Telerik.WinControls.UI.Timescales.Weeks);
                radScheduler1.GetTimelineView().GetScaling().DisplayedCellsCount = 12;

                radScheduler2.GetTimelineView().ShowTimescale(Telerik.WinControls.UI.Timescales.Days);
                radScheduler2.GetTimelineView().GetScaling().DisplayedCellsCount = 30;    

This piece of code results in having both controls displaying 30 days (Moreover with display glitches on the first one).
What am I doing wrong?
(I'm using 2012.1.12.215)

Regards,
Ivan Todorov
Telerik team
 answered on 12 Jun 2012
12 answers
478 views
How do I set make my ShapedForm's background color transparent? Setting in in the Visual Studio designer throws exception "Control does not support transparency". I am using an image with rounded corner as the background for the form, so unless the background color is transparent, there will be a small area at the form's corners having the same color as the form's background color, which doesn't look nice.

Thanks
Nikolay
Telerik team
 answered on 12 Jun 2012
2 answers
215 views
We have decided to go with an editable RadGridView for a particular project. We have run into some snags along the way which the forums have been very helpful. However, I have not noticed that anyone else has encountered this problem.

I have a Decimal Column with the DecimalPlaces property set to 2. When there is already data in the column lets say "50.00" and you move over to that column, without entering edit mode, and just start typing a new value like "123.50", the GridSpinEditor allows the user to overwrite the first digits (as it should), but when you get to typing the decimal in 123.50 it stops the overwriting and starts inserting.

This leaves a final text value of "123.50.00". When you hit enter the value magically changes to "1" in the grid.


Can anyone explain this?

I have a sample project. You can enter a value of 50 in column one. Then press enter to finalize it. Then, while the current cell is that same 50 cell, start typing 123.50. You will get 123.50.00 before the cell ends edit. And when it does end edit the final value will be 1.

namespace RadControlsWinFormsApp2
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components;
 
        /// <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.GridViewDecimalColumn gridViewDecimalColumn2 = new Telerik.WinControls.UI.GridViewDecimalColumn();
            this.radGridView1 = new Telerik.WinControls.UI.RadGridView();
            this.radSpinEditor1 = new Telerik.WinControls.UI.RadSpinEditor();
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radSpinEditor1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            this.SuspendLayout();
            //
            // radGridView1
            //
            this.radGridView1.Location = new System.Drawing.Point(0, 0);
            //
            // radGridView1
            //
            gridViewDecimalColumn2.FieldName = "VALUE";
            gridViewDecimalColumn2.HeaderText = "column1";
            gridViewDecimalColumn2.Name = "column1";
            this.radGridView1.MasterTemplate.Columns.AddRange(new Telerik.WinControls.UI.GridViewDataColumn[] {
            gridViewDecimalColumn2});
            this.radGridView1.Name = "radGridView1";
            this.radGridView1.Size = new System.Drawing.Size(240, 150);
            this.radGridView1.TabIndex = 0;
            this.radGridView1.Text = "radGridView1";
            //
            // radSpinEditor1
            //
            this.radSpinEditor1.Location = new System.Drawing.Point(93, 180);
            this.radSpinEditor1.Name = "radSpinEditor1";
            //
            //
            //
            this.radSpinEditor1.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren;
            this.radSpinEditor1.ShowBorder = true;
            this.radSpinEditor1.Size = new System.Drawing.Size(100, 20);
            this.radSpinEditor1.TabIndex = 1;
            this.radSpinEditor1.TabStop = false;
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(292, 266);
            this.Controls.Add(this.radSpinEditor1);
            this.Controls.Add(this.radGridView1);
            this.Name = "Form1";
            //
            //
            //
            this.RootElement.ApplyShapeToControl = true;
            this.Text = "Form1";
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radSpinEditor1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
 
        }
 
        #endregion
 
        private Telerik.WinControls.UI.RadGridView radGridView1;
        private Telerik.WinControls.UI.RadSpinEditor radSpinEditor1;
    }
}


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data;
 
namespace RadControlsWinFormsApp2
{
    public partial class Form1 : Telerik.WinControls.UI.RadForm
    {
        public Form1()
        {
            InitializeComponent();
 
            (radGridView1.Columns[0] as Telerik.WinControls.UI.GridViewDecimalColumn).DecimalPlaces = 2;
 
        }
    }
}
Peter
Telerik team
 answered on 12 Jun 2012
1 answer
112 views
Hello Telerik Team,

In Winforms, is it possible to create a custom GridViewRichTextBoxColumn for RadGridview? If yes please help thanks :).
Stefan
Telerik team
 answered on 12 Jun 2012
8 answers
204 views

Hi,

I've created some style with Visual Style Builder and I'm using it with rad grid view.

I would like to hide a column border - but just between 2 column headers.

Particular grid view could have different data sources so I need to set this (hide column splitter) dynamically.

I've attached the screen shot with marked on the splitter I'd like to hide.

I browsed through column properties but still couldn't find any matching field to set, please help me with this one...

Regards.

Ivan Petrov
Telerik team
 answered on 12 Jun 2012
1 answer
135 views
Hi,

I have a relatively simple use for the RichTextBox. I'm using it to display log messages in an application.

I will have two types of messages: Information and Errors. I would like to display the error string in red while the information in black.

How can I change the font color as it is being inserted to the box?

Also, can the font and size be changed at design time? I have the standard font and size (8.25) but it looks much bigger than a standard RadTextBox. Also there seems to be some sort of padding above it as there is a large space between lines (something like a line height in HTML).

Thanks in advance.
Stefan
Telerik team
 answered on 12 Jun 2012
1 answer
157 views
Hello everybody

I've problem with radgridview.. Can i set auto collapse group in radgridview? Because i set the properties "AutoExpandGroup" to "False" but this code doesn't happen.. Can you give me another solution?

Cheers..
Stefan
Telerik team
 answered on 12 Jun 2012
1 answer
161 views
I'm currently developing a Word 2010 VSTO Document-Level Add-In that has to do extended operations on the open document. As these operations can take some seconds to complete, I'd like to indicate this to the users (so they don't get nervous and start clicking wildly around...). 

I've used the Telerik WPF RadBusyIndicator in a WPF project some time ago and really liked how easy it was to implement (and didn't obscure my code as well). It would be great if I could create the same effect using Telerik WinForms/WPF components.

Currently, the main thread directly operates on the document. I have not much experience in threaded programming, but I'd like to implement a clean and reusable solution that does not clutter the important part of my code. 

cheers
Nicolas
Boryana
Telerik team
 answered on 12 Jun 2012
1 answer
602 views
Hello
I used a datatable for fill Grid.
I add row in datatable in my Code and I want to show  changes in my Grid.
for this work I used "dt.AcceptChanges()".
but i need used "dt.GetChanges()".
Because I use "dt.AcceptChanges() ", " dt.GetChanges()" is empty.
Now how do I use "dt.GetChanges()".

Julian Benkov
Telerik team
 answered on 12 Jun 2012
2 answers
304 views
I have a large set of data with which server-side paging is implemented.  I need to requery the data source any time the GridView's filter is changed by the user.  The problem lies in the fact that rebinding the DataSource inside any of the FilterChanged, FilterChanging, or FilterExpressionChanged events of the grid causes a null reference exception at the application level.

To work around this, I have found the following code which will correctly refresh the data source after a filter change has been finalized.

private void TicketView_CellEndEdit(object sender, GridViewCellEventArgs e)
{
    if ((sender as GridViewEditManager).GridViewElement.CurrentCell is GridFilterCellElement)
    {
        RequeryGridData();
    }
}

While the data source now refreshed automatically on a text change, it still did not refresh on a filter type change (ie. "Contains" to "Does not contain").  I tried calling RequeryGridData() in the closed event of the filter popup menu as follows.

private void TicketView_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
{
    if (e.ContextMenuProvider is GridFilterCellElement)
    {
        e.ContextMenu.DropDownClosed +=
        new RadPopupClosedEventHandler(FilterContextMenu_Closed);
    }
}
 
void FilterContextMenu_Closed(object sender, EventArgs e)
{
    RequeryGridData();
}

This still caused a null reference exception.  I wondered what would happen if I delayed the datasource refresh until after the close event had finished and found myself with this code.

private void TicketView_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
{
    if (e.ContextMenuProvider is GridFilterCellElement)
    {
        e.ContextMenu.DropDownClosed +=
        new RadPopupClosedEventHandler(FilterContextMenu_Closed);
    }
}
 
void FilterContextMenu_Closed(object sender, EventArgs e)
{
    //HACK: Have to refresh grid contents, but MUST NOT do it from a filter changing event as
    //      updating the datasource while the filter change is finalized crashes the program
    System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer();
    timer.Interval = 1;
    timer.Tick += new EventHandler(FilterChangedTimer_Tick);
    timer.Start();
}
 
void FilterChangedTimer_Tick(object sender, EventArgs e)
{
    (sender as System.Windows.Forms.Timer).Dispose();
    RequeryGridData(); 
}

Which, as I suspected, works great.  No exceptions occurred.

My question is: Is there a cleaner way of detecting the filter change and performing a datasource change?  Perhaps this functionality is not the intended use of the GridView's filter controls, in which case I'll settle for the solution (read: hack) I've managed to come up with, but hopefully there is a better way to handle this.

Thank you for your time.
Chris Ward
Top achievements
Rank 1
 answered on 11 Jun 2012
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?