Telerik Forums
UI for WinForms Forum
1 answer
101 views
In the example listed at http://www.telerik.com/help/winforms/editors-autocompletetextbox-creating-custom-blocks.html .  At the very bottom you have some code for 

radAutoCompleteBox1.TextBlockFormatting += new TextBlockFormattingEventHandler(radAutoCompleteBox1_TextBlockFormatting);
this.radAutoCompleteBox1.Text = "Euro;USD;GBP;";

Only new textblocks created are formatted with the new style.  These 3 text blocks 'Euro' 'USD' and 'GBP' are in the old format.  The TextBlockFormatting code is not listed.

I need this to finish up my custom TextBlock.

Thanks

Stefan
Telerik team
 answered on 24 Apr 2013
2 answers
208 views
I would like to change the BackColor a datagridview row. While searching around it 's clear that I will have to access the GridDataRowElement or GridDataCellElement to do it. From that  after creating a variable of the type  we can call something  RowElement.BackColor = Color.Gray or CellElement.BackColor = Color.Gray

I have already tried this but it only colors row while the mouse is hovering at it (very strange...)
Dim rwInfo As GridViewRowInfo = myGrid.Rows(i)
myGrid.GridViewElement.TableElement.GetRowElement(rwInfo).BackColor = System.Drawing.Color.PaleGoldenrod


Now with the code below as a pointer, my problem is that I'm trying to cast a gridview row as GridDataRowElement it always results in epic failure.


For i = 0 To myGrid.Rows.Count - 1
Dim r As GridViewRowInfo = myGrid.Rows(i)
Dim rwInfo As GridViewRowInfo = myGrid.Rows(i)
For Each cInfo As GridViewCellInfo In rwInfo.Cells
Dim row As GridDataRowElement = TryCast(myGrid.Rows(i), GridDataRowElement)
Next
  For Each c In myGrid.Columns
Dim cell As GridDataCellElement = CType(rwInfo.Cells(c.Index), GridDataCellElement)
Next
Next


Could someone please point me to the right direction on how this can be done?

Thanks
Stefan
Telerik team
 answered on 24 Apr 2013
1 answer
138 views
The width of a resource does not always match the column(s) underneath it, resulting in the resources shifting to the left in relation to the column(s) below. It appears to be about 1 pixel  difference per resource which becomes more noticeable with multiple resources . I looks like some sort of difference in rounding when calculating available space, because if you gradually resize the form the resources will come close to matching the column(s) before jumping back to the full difference again. This issue can be demonstrated in the Scheduler->Grouping demo if you gradually resize the form, however as there are only 2 resources, the issue is hard to spot, but it is there.
Peter
Telerik team
 answered on 23 Apr 2013
1 answer
150 views
I need to find the absolute screen coordinates of a floating dockwindow from within code running inside a form hosted inside this dockwindow. I have tried different things but all I get back is the screen location of the original form that the rad dock control is hosted.

Any ideas how I can achieve this?

Regards,

George
Paul
Telerik team
 answered on 23 Apr 2013
1 answer
195 views
HI dudy,
I`m programming a project in C# language, How can I change width of item column in PageViewer in backstage mode?
and i dont know how can I move the vertical line near items, or change its property such as size, width, color and elc, I think knowing it will helps me.
Thanks alot
Paul
Telerik team
 answered on 23 Apr 2013
1 answer
162 views
Hey Telerik!

I would like to determine if a newly created text block was from the autocompleteitems list or not.

I noticed that your AutoCompleteItems used a RadListDataItemCollection.  Is it possible to use a collection of objects ?

If not, I will be adding items to the AutoCompleteItems in the form of 

items.Add(New RadListDataItem("Joe Smith", "GUID HERE"))

I was assuming the CreateTextBlock event could be used to determine if there was a GUID value attached or not.  I could use this as a way to determine if the item was from the AutoCompleteItems.  I am not sure how to get the data value for the text block element or hopefully custom class for the newly created block.

Thanks





Stefan
Telerik team
 answered on 23 Apr 2013
3 answers
223 views
Pressing the tab key while the RadRichTextBox has focus, always takes the focus away from the control, even when AcceptsTab is set to true.
Am I missing something? Please help.
Martin Horst
Top achievements
Rank 1
 answered on 23 Apr 2013
2 answers
167 views
Recent  I have been having trouble unseeing themes for rad controls. I have visual studio 2012 ultimate and premium the same thing happens on both.

Ive attached screen shots. the name of the screen shot tells which step it is. e.g picture "1" shows the first thing I did and so on.


Please help and thanks in advance.
Benj
Top achievements
Rank 2
 answered on 23 Apr 2013
2 answers
208 views
I want to show thumbnail images in a ListView in IconView. I got the thumbnail images in a fixed size and I want to show them smaller. I set the image property of the listviewdataitem to the thumbnail and the Itemsize property of the listview to a size smaller than the thumbnails. Now I only see a part of the thumbnail in the listviewdataitems. Can I zoom the images to see the whole image in the listviewdataitem?
Thanks in advance!
Elke
Top achievements
Rank 1
 answered on 21 Apr 2013
3 answers
311 views
Hi, I have a very special requirement to address.

I'm looking to manipulate the RadGridView to some sort of PivotTable, but I need to edit the objects that the grid will be bound to (would be great to run in bound mode), and by edit I mean drag and drop the 'Projects' to different weeks of months (but that's another problem).

My current problem is about altering the UI of the grid, so that it can be more intuitive for the user and also easier to maintain.

Please see the screenshots in attachment to understand my goal.

Thanks,

--
Francois




using System;
using System.Collections.Generic;
using System.Data;
using System.Windows.Forms;
using Telerik.WinControls.UI;
 
namespace WindowsFormsApplication3
{
    public  class Form1 : Form
    {
        private const string WeekDisplayedName = "Week";
 
        private RadGridView Grid { get { return this.radGridView1; } }
 
        private struct ColsGrid
        {
            public const string Level1 = "Level 1 Criteria";
            public const string Level2 = "Level 2 Criteria";
            public const string FakeLevel = "Fake row";
        }
 
        public Form1()
        {
            InitializeComponent();
 
            InitializeGrid();
        }
 
        /// <summary>
        ///
        /// </summary>
        private void InitializeGrid()
        {
            this.Grid.ShowFilteringRow = false;
            this.Grid.ShowGroupPanel = false;
            this.Grid.SelectionMode = GridViewSelectionMode.CellSelect;
            this.Grid.AllowAddNewRow = this.Grid.AllowDeleteRow = false;
 
            // Data
            var table = new DataTable();
 
            table.Columns.Add(ColsGrid.Level1, typeof(string));
            table.Columns.Add(ColsGrid.Level2, typeof(string));
            table.Columns.Add(ColsGrid.FakeLevel, typeof(string));
 
            var lst = new List<Tuple<string, string>>();
 
            lst.Add(new Tuple<string, string>("Level 1-A", "Level 2-A"));
            lst.Add(new Tuple<string, string>("Level 1-A", "Level 2-B"));
            lst.Add(new Tuple<string, string>("Level 1-A", "Level 2-C"));
            lst.Add(new Tuple<string, string>("Level 1-B", "Level 2-A"));
            lst.Add(new Tuple<string, string>("Level 1-B", "Level 2-B"));
            lst.Add(new Tuple<string, string>("Level 1-B", "Level 2-C"));
 
            this.Grid.AutoExpandGroups = true;
            this.Grid.DataSource = table;
 
            //this.Grid.GroupDescriptors.Add(new GroupDescriptor("Project"));
            this.Grid.Columns.Add(new GridViewTextBoxColumn(ColsGrid.Level1));
            this.Grid.Columns.Add(new GridViewTextBoxColumn(ColsGrid.Level2));
            this.Grid.Columns.Add(new GridViewTextBoxColumn(ColsGrid.FakeLevel));
 
            this.Grid.Columns[ColsGrid.Level1].Width = 100;
            this.Grid.Columns[ColsGrid.Level2].Width = 100;
            this.Grid.Columns[ColsGrid.FakeLevel].IsVisible = false;
 
            // Create fake lines for each level1/level2
            int nbLines = 3;
            foreach (var item in lst)
            {
                for (var i = 0; i < nbLines; i++)
                {
                    table.Rows.Add(item.Item1, item.Item2, i);
                }
            }
 
            // Add timeline columns
            string[] months = new string[] { "January", "Febuary", "March", };
 
            for (int i = 0; i < months.Length; i++)
            {
                for (int j = 1; j <= 4; j++)
                {
                    GridViewTextBoxColumn column = new GridViewTextBoxColumn(months[i] + WeekDisplayedName + j);
                    column.HeaderText = WeekDisplayedName + " " + j.ToString();
                    column.Width = 75;
 
                    this.Grid.Columns.Add(column);
                }
            }
 
            // Group the 3 first columns
            var def = new ColumnGroupsViewDefinition();
            var colGroup = new GridViewColumnGroup("Row header group");
            colGroup.ShowHeader = false;
            colGroup.Rows.Add(new GridViewColumnGroupRow());
            colGroup.Rows[0].Columns.Add(this.Grid.Columns[ColsGrid.Level1]);
            colGroup.Rows[0].Columns.Add(this.Grid.Columns[ColsGrid.Level2]);
            colGroup.Rows[0].Columns.Add(this.Grid.Columns[ColsGrid.FakeLevel]);
            def.ColumnGroups.Add(colGroup);
 
            // Create a group for each month, each containing 4 weeks
            for (int i = 0; i < months.Length; i++)
            {
                def.ColumnGroups.Add(new GridViewColumnGroup(months[i]));
                def.ColumnGroups[1 + i].Rows.Add(new GridViewColumnGroupRow());
 
                for (int j = 1; j <= 4; j++)
                {
                    def.ColumnGroups[1 + i].Rows[0].Columns.Add(this.Grid.Columns[months[i] + WeekDisplayedName + j]);
                }
            }
 
            this.Grid.ViewDefinition = def;
 
            // Create fake data
            this.Grid.Rows[0].Cells[months[0] + WeekDisplayedName + "1"].Value = "Project 1";
            this.Grid.Rows[1].Cells[months[0] + WeekDisplayedName + "1"].Value = "Project 2";
            this.Grid.Rows[9].Cells[months[0] + WeekDisplayedName + "3"].Value = "Project 3";
            this.Grid.Rows[4].Cells[months[1] + WeekDisplayedName + "2"].Value = "Project 4";
            this.Grid.Rows[7].Cells[months[1] + WeekDisplayedName + "3"].Value = "Project 5";
        }
 
        #region Designer stuff
        /// <summary>
        /// Variable nécessaire au concepteur.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
 
        /// <summary>
        /// Nettoyage des ressources utilisées.
        /// </summary>
        /// <param name="disposing">true si les ressources managées doivent être supprimées ; sinon, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
 
        #region Code généré par le Concepteur Windows Form
 
        /// <summary>
        /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
        /// le contenu de cette méthode avec l'éditeur de code.
        /// </summary>
        private void InitializeComponent()
        {
            this.radGridView1 = new Telerik.WinControls.UI.RadGridView();
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).BeginInit();
            this.SuspendLayout();
            //
            // radGridView1
            //
            this.radGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.radGridView1.Location = new System.Drawing.Point(0, 0);
            this.radGridView1.Name = "radGridView1";
            this.radGridView1.Size = new System.Drawing.Size(1137, 629);
            this.radGridView1.TabIndex = 0;
            this.radGridView1.Text = "radGridView1";
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(1137, 629);
            this.Controls.Add(this.radGridView1);
            this.Name = "Form1";
            this.Text = "Form1";
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).EndInit();
            this.ResumeLayout(false);
 
        }
 
        #endregion
 
        private Telerik.WinControls.UI.RadGridView radGridView1;
        #endregion
    }
}
Peter
Telerik team
 answered on 19 Apr 2013
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)
Form
Chart (obsolete as of Q1 2013)
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?