Telerik Forums
UI for WinForms Forum
1 answer
130 views

Hello sir,

Am using vb.net.
I am using radmulti column combobox with FILTER and Autocompletemode as suggest.

I have attached 2 files as Odd row & even row selection images.
Odd rows selection in drop down highlights correct with arrow mark in first column of each rows.
But if i select 2,4,6th.... rows in drop down, first half of the text hides as like in second image "even rows selection"

Also If i try to filter then the drop down height and width changes while opening the drop down.

How to rectify it sir?
I have to use AutoSizeDropDownToBestFit = True, because combobox holds values of size 200.

Thank you
Jayanthi

 

Svett
Telerik team
 answered on 09 Jan 2012
2 answers
190 views
Hello,
I seem to have a problem on my GridView : I add a column and specify its datatypeconverter this way :
Dim col As New GridViewTextBoxColumn("Code", "Code")
col.DataTypeConverter = New CodePluginConverter()
gvHistorique.Columns.Insert(0, col)
It works fine, the CanConvert and Convert methods are called as expected

However, what I need is an image column. If I change the previous code to this :
Dim col As New GridViewImageColumn("Code", "Code")
col.DataTypeConverter = New CodePluginConverter()
gvHistorique.Columns.Insert(0, col)
All my column's cells remain empty, and I never step in any of the TypeConverter's methods.

Is there anything obvious I don't see ? (I'm using the Q3 2011 version of the controls)

Thanks in advance !
Philippe
Top achievements
Rank 1
 answered on 09 Jan 2012
1 answer
112 views
The standard windows ComboBox fires the DropDown event when the button in the combobox is clicked. What is the equivalent event in the RadDropDownList control?
Peter
Telerik team
 answered on 06 Jan 2012
5 answers
519 views
Hi to all,
I have problem to use value from cell in summary row.

On my winform I have two radgridviews with their summary rows. How can I use that values to calculate their sum and show that result in some radlabel?

RadLabel1.Text = sum of column "days" on RadGridView1+ sum of column "items" on RadGridView2



Thanks,
sadly stripy
Svett
Telerik team
 answered on 06 Jan 2012
5 answers
111 views
Using VS Express 2010, Win 7 w/.Net 4 and .Net EF 4.1.   So far, to add controls, I have to go to toolbox and manual add each Telerik control I want to use.   That's okay if this is the way I have to do it.   Eventually, I will get all the ones I want to play with.

I am trying to find my way around.   One simple task is I would like to create oval-shaped buttons.   I can go into the root properties and dig around until I find that I can select an ellipse shape, and it even appears like an ellipse in my designer.   But when I debug, it totally ignores my shape selection.  I also tried changing background color, but it totally ignores that, as well.   Of course, I can do all the regular C# things, such as make the button bigger or smaller, or change its text.   But I can't seem to "Telerik" it.

I am using a straight-forward Windows Form.

Telerik looks promising, but I'd sure like to be able to kick the tires as much as possible before my trial runs out.....

Thanks.

EDIT:   I see that disabling theming allowed it to recognize the background color I picked.   That issue is solved.   Now, how about getting my ellipse shape to render at runtime?
Ivan Petrov
Telerik team
 answered on 06 Jan 2012
2 answers
101 views
Hey all,

I'm trying to do a very simple carousel, with just 3 buttons, each with a 128px image and text underneath. The layout I'm trying to achieve (I keep getting close, but cannot get it right), is to have the main/active button to be front and center, with the 2 other buttons aligned evenly behind and to the side (respectively) of the main/active button. The 2 inactive buttons would ideally be slightly opaque to help the main/active button stand out.

I've attached a crude, but simple drawing of what the layout should look like (although I don't think the pic is perfectly aligned).

Any chance someone can help me with the carousel path settings? Maybe someone already has done this and can just provide the correct settings.

Thank you so much for any help you can provide!
Peter
Telerik team
 answered on 06 Jan 2012
1 answer
96 views
I have encountered a problem where I enabled a GridCommandCellElement in the ViewCellFormatting event handler. The cell/button is enabled but it appears disabled (grayed out). The cell/button only appears enabled (not grayed out) after the focus is shifted to the row that contains the cell/button.

I have attached a sample project that I used to reproduce the issue. To reproduce this issue:

1. Delete the fourth row which has a Year  of '4'. This will enable the insert ('+') button for the third row.
2. You can click on the insert ('+') button for the third row even though it appears disabled and a new row will be inserted.
3. If you click in the row header for the third row, the insert ('+') button, will now appear enabled.

The issue is why does the cell/button appear to be disabled still after it has been enabled in the code.

Here is the cs file:

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 Telerik.WinControls.Primitives;
using Telerik.WinControls.UI;
 
namespace GridCellEnabled
{
    public partial class Form1 : Form
    {
        private GridViewTextBoxColumn _yearColumn = null;
        private GridViewTextBoxColumn _valueColumn = null;
        private GridViewCommandColumn _insertRowColumn = null;
        private GridViewCommandColumn _deleteRowColumn = null;
 
        public Form1()
        {
            InitializeComponent();
        }
 
        private void Form1_Load(object sender, EventArgs e)
        {
            SetupGrid();
        }
 
        private void SetupGrid()
        {
            // Add Columns
            {
                // Year Column
                {
                    _yearColumn = new GridViewTextBoxColumn();
                    _yearColumn.Name = "Year";
                    _yearColumn.HeaderText = "Year";
 
                    _grid.Columns.Add(_yearColumn);
                }
 
                // Value Column
                {
                    _valueColumn = new GridViewTextBoxColumn();
                    _valueColumn.Name = "Value";
                    _valueColumn.HeaderText = "Value";
 
                    _grid.Columns.Add(_valueColumn);
                }
 
                // Insert Row Column
                {
                    _insertRowColumn = new GridViewCommandColumn();
                    _insertRowColumn.Name = "InsertRow";
                    _insertRowColumn.HeaderText = string.Empty;
                    _insertRowColumn.UseDefaultText = true;
                    _insertRowColumn.DefaultText = "+";
                    _insertRowColumn.MinWidth = 20;
                    _insertRowColumn.TextAlignment = ContentAlignment.MiddleCenter;
 
                    _grid.Columns.Add(_insertRowColumn);
                }
 
                // Delete Row Column
                {
                    _deleteRowColumn = new GridViewCommandColumn();
                    _deleteRowColumn.Name = "DeleteRow";
                    _deleteRowColumn.HeaderText = string.Empty;
                    _deleteRowColumn.UseDefaultText = true;
                    _deleteRowColumn.DefaultText = "-";
                    _deleteRowColumn.MinWidth = 20;
                    _deleteRowColumn.TextAlignment = ContentAlignment.MiddleCenter;
 
                    _grid.Columns.Add(_deleteRowColumn);
                }
            }
 
            // Add Rows
            {
                for (int i = 1; i <= 5; i++)
                {
                    GridViewRowInfo row = _grid.Rows.AddNew();
 
                    row.Cells[_yearColumn.Name].Value = i;
                    row.Cells[_valueColumn.Name].Value = i * 10;
                }
            }
 
            _grid.BestFitColumns();
        }
 
        private void _grid_CommandCellClick(object sender, EventArgs e)
        {
            GridViewCellEventArgs args = e as GridViewCellEventArgs;
 
            if (args.Column == _insertRowColumn)
            {
                InsertRow(args.RowIndex);
            }
            else if (args.Column == _deleteRowColumn)
            {
                DeleteRow(args.RowIndex);
            }
        }
 
        private void InsertRow(int aRow)
        {
            GridViewDataRowInfo rowInfo = new GridViewDataRowInfo(_grid.MasterView);
 
            int startYear = Convert.ToInt32(_grid.Rows[aRow].Cells["Year"].Value) + 1;
 
            rowInfo.Cells[_yearColumn.Name].Value = startYear;
            rowInfo.Cells[_valueColumn.Name].Value = startYear * 10;
 
            _grid.Rows.Insert(aRow + 1, rowInfo);
        }
 
        private void DeleteRow(int aRow)
        {
            _grid.Rows.RemoveAt(aRow);
        }
 
        private void _grid_ViewCellFormatting(object sender, CellFormattingEventArgs e)
        {
            if (e.CellElement is GridCommandCellElement && e.RowIndex >= 0)
            {
                if (e.Column == _insertRowColumn)
                {
                    if (e.RowIndex + 1 < _grid.RowCount)
                    {
                        int startYear = Convert.ToInt32(_grid.Rows[e.RowIndex].Cells[_yearColumn.Name].Value);
                        int nextYear = Convert.ToInt32(_grid.Rows[e.RowIndex + 1].Cells[_yearColumn.Name].Value);
 
                        if ((startYear + 1) == nextYear)
                        {
                            e.CellElement.Enabled = false;
                        }
                        else
                        {
                            e.CellElement.Enabled = true;
                        }
                    }
                    else
                    {
                        e.CellElement.Enabled = true;
                    }
                }
                else if (e.Column == _deleteRowColumn)
                {
                    if (e.RowIndex == 0)
                    {
                        e.CellElement.Enabled = false;
                    }
                    else
                    {
                        e.CellElement.Enabled = true;
                    }
                }
            }
        }
    }
}

Here is the Designer.cs file:

namespace GridCellEnabled
{
    partial class Form1
    {
        /// <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()
        {
            this._grid = new Telerik.WinControls.UI.RadGridView();
            ((System.ComponentModel.ISupportInitialize)(this._grid)).BeginInit();
            this.SuspendLayout();
            //
            // _grid
            //
            this._grid.Location = new System.Drawing.Point(12, 12);
            this._grid.Name = "_grid";
            this._grid.Size = new System.Drawing.Size(260, 238);
            this._grid.TabIndex = 0;
            this._grid.ViewCellFormatting += new Telerik.WinControls.UI.CellFormattingEventHandler(this._grid_ViewCellFormatting);
            this._grid.CommandCellClick += new Telerik.WinControls.UI.CommandCellClickEventHandler(this._grid_CommandCellClick);
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(284, 262);
            this.Controls.Add(this._grid);
            this.Name = "Form1";
            this.Text = "Form1";
            this.Load += new System.EventHandler(this.Form1_Load);
            ((System.ComponentModel.ISupportInitialize)(this._grid)).EndInit();
            this.ResumeLayout(false);
 
        }
 
        #endregion
 
        private Telerik.WinControls.UI.RadGridView _grid;
    }
}
Ivan Petrov
Telerik team
 answered on 06 Jan 2012
4 answers
262 views

VB.NET
.NET 3.5

RadControls for WinForms Q1 2009 SP1
MS Visual Studio 2008

I have been able to do just about everything else I need to do in the Treeview control, except capturing click events in my form. The tree is generated from SQL tables and otherwise appears fine. Ultimately I am hoping to wire the tree nodes to files in the filesystem.
Following is the code to capture the DoubleClick event (copied from documentation):

Private

 

Sub RadTreeView1_DoubleClick(ByVal sender As Object, ByVal e As EventArgs)

 

 

 

Dim args As MouseEventArgs = TryCast(e, MouseEventArgs)

 

 

 

Dim clickedNode As RadTreeNode = RadTreeView1.GetNodeAt(args.X, args.Y)

 

 

 

If clickedNode <> Nothing Then

 

 

 

 

    MessageBox.Show("Node Text: " + clickedNode.Text + " Node Value: " + clickedNode.Tag)

 

 

 

End If

 

 

 

 

End Sub

 

 

 

 

 

 

The only other block of code in my form is my form load which loads the tree with data from the database.

I have 2 questions/problems:
1. Visual Studio is complaining about the IF statement: "Operator '<>' is not defined for types 'Telerik.WinControls.UI.RadTreeNode' and 'Telerik.WinControls.UI.RadTreeNode'. What does this mean?
2. It appears the DoubleClick event isn't being captured since nothing happens when I double click a node. Is the IF statement error related to this? What am I missing? For my testing I simply commented out the 'If...' and 'End If' lines.

Thanks in advance for any guidance you can provide.
Matt

Stefan
Telerik team
 answered on 05 Jan 2012
9 answers
90 views
I'm trying to find an example of creating a custom grid filter popup.  Anybody have one yet?
Ivan Petrov
Telerik team
 answered on 04 Jan 2012
2 answers
240 views
Hello

I clearly understand how to use the event associated with a CommandColumn click event (GridView_CommandCellClick). What I would like to do is gain access to the button's properties (GridViewCommandColumn Button) from another method. For example, if i have this method: "private void ChangeButtonText(GridViewRowInfo rowIndex, String buttonText)". This method is not associated with the click event of a CommandButton but this method needs to access CommandButton's properties for the given rowIndex and change the CommandButton.Text property equal to buttonText.

I am using VS 2010, C# and Q2 update.

Any help would be appreciated.

Thank You
Ivan Petrov
Telerik team
 answered on 04 Jan 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
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
ProgressBar
CheckedDropDownList
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
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?