Telerik Forums
UI for WinForms Forum
1 answer
122 views
Hi everyone,

This is my first time working with the ribbon bar. I created a ribbon form and then added a tab and then a group. It looks fine in the default theme. When i change the theme to one on the right side of the image it looks like the bottom part of the group is cut off. Is this right? Also, why does the title text look like it does?

Thanks for your help!
Warren

George
Telerik team
 answered on 20 Jan 2014
3 answers
184 views

Hi,

Do you offer a control that is ideally TextBox -based that has AutoComplete functionality, much like "out-of-box" TextBox, but with additional support for "contains" logic, in addition to "starting with" logic?

For example, when typing in "p", both "Pear" and "Apple" would be suggested, as both contain "p".

Or optionally, it could be a ComboBox - based control, but allowing free-form entry by user without having to add entered value to Items collection.

Is my current understanding correct that you guys currently don't have this as TextBox-based, according to: http://www.telerik.com/community/forums/winforms/editors/intellisense-autocomplete-in-textbox-like-in-outlook.aspx ? And that your TextBox only shows one suggestion, even though there could be multiple options for autocomplete?

Thanks!

Stefan
Telerik team
 answered on 20 Jan 2014
1 answer
107 views
Hi,

I have a grid with groupings by customer ID. When I iterate in code through the data groups, the header property is returning the value but the first character is truncated off.

the Text on the group header band shows "Customer ID: 1235" but when i check the group.header value, its returning "235". Every group that has a number does this. the string headers seem to work ok.

-Kim

 
Dimitar
Telerik team
 answered on 20 Jan 2014
11 answers
208 views
Hi ,

I am facing one issue when I am trying to select item from grid dropdown for example

1. I have one dropdown in grid and having four items let say
     SName
     PName
     QName
     ZName
2.On my form(windows), I have a button(&Save) with hotkey S.
3.Now when I click on dropdown cell  and press key "S" to select item starting from "S", ideally it should select SName but it is firing Save Event(Alt + S) of form and this is the issue?
4.I have set Me(form).KeyPreview = True.

Need your help.

Thanks,
Rajesh Kumar
George
Telerik team
 answered on 20 Jan 2014
1 answer
286 views
Hi,

I tried to display some charts in a Grid like the attached picture, so I need to pass the data to the cell and I used following code:

Random r = new Random ();
  
GridServer.Rows.Add ("1");
  
for (int i= 1; i <= 16; i++)
{
   
   DataTable table = new DataTable ();
   table.Columns.Add ("DateTime", typeof (DateTime));
   table.Columns.Add ("Value", typeof (double));
   table.Rows.Add (DateTime.Now, r.Next (100));
   table.Rows.Add (DateTime.Now.AddSeconds (30), r.Next (100));
   table.Rows.Add (DateTime.Now.AddSeconds (60), r.Next (100));
   table.Rows.Add (DateTime.Now.AddSeconds (90), r.Next (100));
   table.Rows.Add (DateTime.Now.AddSeconds (120), r.Next (100));
   table.Rows.Add (DateTime.Now.AddSeconds (150), r.Next (100));
  
   GridServer.Rows[0].Cells[i].Value = table;
  
}

Basing on the definition, the type of GridServer.Rows[0].Cells[i].Value is object

public class GridViewCellInfo : IEquatable<GridViewCellInfo>
   {
 
     // Summary:
      //     Gets or sets the value.
      public object Value { get; set; }
      //
}

So the GridServer.Rows[0].Cells[i].Value should get the reference of my DataTable, but the actually value of Value is a empty string.

Is this a bug or anything wrong in my code?

Thanks

Charles
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 Jan 2014
1 answer
210 views
I have a gridView in a winform. I have set one of the column "Note" to:
wraptext= true
multiline= true

This is my print button:
private void BtnPrint(object sender, EventArgs e)
        {
            GridPrintStyle style = new GridPrintStyle();
            style.FitWidthMode = PrintFitWidthMode.FitPageWidth;     
            style.PrintHeaderOnEachPage = true;
            this.radGridView1.PrintStyle = style;
            this.radGridView1.PrintPreview();       
        }
despite the above, the result I get, see picture attached, is not the expected one.The multilines field doesn't shows properly the content. Part of the text is out of the visible box.
I have tried with several printers but the problem is always the same.
What I can do to solve this problem?
Ralitsa
Telerik team
 answered on 20 Jan 2014
4 answers
166 views
Hi Telerik Team 

I customize to inherit GridViewMultiComboBoxColumn, BaseGridBehavior and RadMultiColumnComboBox. Example MeGridBehavior (inherited form BaseGridBehavior), MeGridViewMultiComboBoxColumn(inherited form GridViewMultiComboBoxColumn)MeMultiColumnComboBox (inherited form RadMultiColumnComboBox), MeMultiColumnComboBoxElement (inherit RadMultiColumnComboBoxElement)

when init GridView i set this.GridBehavior = new MeGridBehavior(), if column is Combobox editor i create MeGridViewMultiComboBoxColumn column and i  override event  OnEditorRequired and CreateMultiColunmnComboboxElement ;

//On MeMultiColumnCombobox
protected override RadMultiColumnComboBoxElement CreateMultiColumnComboBoxElement()
{
    return new MeMultiColumnComboBoxElement(this.Name,this);
}
 
// on GridView
protected override void OnEditorRequired(object sender, EditorRequiredEventArgs e)
{
    if (this.CurrentColumn is MeGridViewMultiComboBoxColumn)
    {
        var column = this.CurrentColumn as MeGridViewMultiComboBoxColumn;
      MeMultiColumnComboBox cbx= CreateDataComboBox("Countries");
      e.Editor = cbx.MeMultiColumnComboBoxElement;        
    }
}
 
protected override void OnCellValidating(object sender, CellValidatingEventArgs e)
{
    //if value not in list of countries ?
    var cbxCol = e.Column as MeGridViewMultiComboBoxColumn;
    var detectError = ComboBoxValidating(text, e);
    if (detectError)
    {
        e.Cancel = true;
        base.OnCellValidating(sender,e);
        ShowValidateError(); 
        return;
    
}


When i click to another cell it throw exeption on mouseup event of MeGridBehavior 

Unable to cast object of type 'MeMultiColumnComboBoxElement' to type 'Telerik.WinControls.UI.BaseGridEditor'.

   at Telerik.WinControls.UI.GridViewEditManager.EndEditCore(Boolean validate, Boolean cancel)
   at Telerik.WinControls.UI.GridViewEditManager.CloseEditor()
   at Telerik.WinControls.UI.RadGridViewElement.CloseEditor()
   at Telerik.WinControls.UI.GridRowBehavior.OnMouseUpLeft(MouseEventArgs e)
   at Telerik.WinControls.UI.GridRowBehavior.OnMouseUp(MouseEventArgs e)
   at Telerik.WinControls.UI.BaseGridBehavior.OnMouseUp(MouseEventArgs e)
   at ......OnMouseUp(MouseEventArgs e) in d:\\MeProject\GridView\MeGridViewBehavior.cs

This error throw when I update to telerik rad control winforms version Q3 2013  but it work with version Q1 2013

Any one can help me ! 
Thanks .
Le
Top achievements
Rank 1
 answered on 18 Jan 2014
5 answers
1.5K+ views
Hi, I have this old winforms application that I am updating.
I want the RadGridView I have just added to it to use a different theme than default, but whatever I do, nothing happens..

I tried setting the ThemeName on the grid to "TelerikMetro", I also tried;
ThemeResolutionService.ApplicationThemeName = "TelerikMetro";
That sounded like the right thing to do after googling a bit - didn't work either from Program.cs or main.cs (the form with the grid)

I just don't get it.. how the heck do you get themes to work?

I've added references to Telerik.WinControls, t.w.gridview, t.w.themes.telerikmetro,t.w.ui, t.w.ui.design, t.windows.controls, t.w.c.data, t.w.c.datavisualization, t.w.c.gridview

This is driving me off the edge at the moment :(

  // Regards, Morten
Dimitar
Telerik team
 answered on 17 Jan 2014
2 answers
1.4K+ views
Hello guys, I hope you are doing great.

I'm working on a WinForms project. One of the requirements is to drag files from the Desktop (or Windows Explorer) and drop them on a RadListView component. 

I set the AllowDrop and AllowDragDrop properties of the my listView object, and then I added the following events:

private void listView_DragEnter(object sender, DragEventArgs e)
{
    MessageBox.Show("DragEnter");
}
 
private void listView_DragDrop(object sender, DragEventArgs e)
{
    MessageBox.Show("DragDrop");
}

When I drag an item from the Desktop and enter the listView area, I get the "DragEnter" message. If I comment that code out, and then drop an item on the listView, I don't get the "DragDrop" message. 

My first question is: is it possible to achieve what I'm trying to do? And if it is possible, my second question is: what am I doing wrong?

I created a small test project to isolate the situation. The following is the complete code of the form class:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls;
 
namespace DragFromDesktop
{
    public partial class DragFromDesktopForm : Telerik.WinControls.UI.RadForm
    {
        public DragFromDesktopForm()
        {
            InitializeComponent();
        }
 
        private void DragFromDesktopForm_Load(object sender, EventArgs e)
        {
 
        }
 
        private void closeButton_Click(object sender, EventArgs e)
        {
            this.Close();
        }
 
        private void listView_DragEnter(object sender, DragEventArgs e)
        {
            //MessageBox.Show("DragEnter");
        }
 
        private void listView_DragDrop(object sender, DragEventArgs e)
        {
            MessageBox.Show("DragDrop");
        }
    }
}

I'm also attaching an example of how the form looks like. The big white square is the list view which I want to drop the items to.

Thanks in advance.

Best regards,

Alejandro
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Jan 2014
0 answers
91 views
I have a grid which has to be filtered programatically based on user entry. More than one column has to be filtered and each column may have more than 1 value to be filtered upon. Like say, Col1, Col2, Col7, Col8 has to be filtered on {1,4}, {1,38}, {78,65} & {1,0} respectively.

I have written the below code for this but looks like it filters only on the last set of values i.e. 4,38,65,0.

public static void SetGridFilterComposite(RadGridView gridView, Dictionary<string, List<int>> filterValues)
        {
            CompositeFilterDescriptor mainDescriptor = new CompositeFilterDescriptor();
            List<int> values = null;
 
            if (filterValues == null || filterValues.Count == 0) return;
 
            ClearGridFilterColumns(gridView);
 
            foreach (string column in filterValues.Keys)
            {
                CompositeFilterDescriptor columnDescriptor = new CompositeFilterDescriptor();
                if (gridView.Columns.Contains(column))
                {
                    values = filterValues[column];
                    FilterDescriptor filterDescriptor = new FilterDescriptor();
                    foreach (int value in values)
                    {
                        filterDescriptor.PropertyName = column;
                        filterDescriptor.Operator = FilterOperator.IsEqualTo;
                        filterDescriptor.Value = value;                       
                        columnDescriptor.FilterDescriptors.Add(filterDescriptor);
                    }
                    columnDescriptor.LogicalOperator = FilterLogicalOperator.Or;
                    mainDescriptor.FilterDescriptors.Add(columnDescriptor);
                }
            }
            mainDescriptor.LogicalOperator = FilterLogicalOperator.And;
            mainDescriptor.IsFilterEditor = true;
            gridView.FilterDescriptors.Add(mainDescriptor);
        }
Priyam
Top achievements
Rank 1
 asked on 16 Jan 2014
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
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
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
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?