Telerik Forums
UI for WinForms Forum
1 answer
97 views
Hi,

Is it possible to draw a filled polygon area (more than 4 points) on top of the grid. 

Points inside the area is of special interest.

Regards
Brian
George
Telerik team
 answered on 21 Jan 2014
1 answer
145 views
My need seems fairly straightforward, but after poring through help text, forum postings, example apps, and making many trials, I still can't make the whole picture work--I'm missing a couple of key pieces.

.NET C# Winforms, Telerik 2013.1.321.20

The RadGrid is unbound. The data is populated (so far) through creating a new row with "GridViewRowInfo row = Grid.Rows.NewRow(), and then iterating through the cells of the row and setting the value of the GridViewCellInfo.

I need multiple columns of a custom cell type. Each cell contains a multicolumn combo box bound to a datatable (the same for all cells), a text box or label to display a value, and a button. The combo box should display all the time (as would an individual one on the form), not just when the cell is selected. I need to catch the combo box change, and handle it, potentially through methods on the parent form. The label is display only. The button needs to open a dialog form with access to the info from the cell, and again I need to reach back to the parent form. I need to be able to change the formatting on cell initialization, for the selected cell, and when the data changes. And that's it. No new rows after initialization, no sorting, no filtering, no reordering columns.

I can create the elements in CreateChildElements on the cell, and I can arrange them in ArrangeOverride on the cell. I can do some formatting in the Grid_CellFormatting event.

So these seem to be my stuck places:

o I don't seem to be able to inherit my column from GridViewMultiColumnComboBoxColumn, because I need the combo box to show all the time, not just when the cell is in edit mode. AND because I cannot find a cell element for the Multi Column Combo parallel to GridComboBoxCellElement. I can bind and set up the combo box in Grid_CellBeginEdit, but in that case it only shows when it is in edit mode. So what is my best way to get the combo box set up for the cells? (Bind the datatable, set DisplayMember, and ValueMember, set up the MultiColumn grid dropdown, set an event handler.)

o I need to pass at least three values to the cell--the selected value for the combo box, the value to display in the label, and an ID. I believe I can pass all of these to the cell in a small object or tuple in the Value or Tag,. But how do I get them to populate the objects at the right time? I think I'm having some major misunderstanding between the logical cell and the visual cell. I need to store these values in the logical cell and populate the visual cell at the right time--but how exactly, because what I've tried has made everything confused, and the values changed on all the combo boxes at once.

o What is my best way to handle the SelectedIndexChanged or SelectedValueChanged event on the combo box and the Click event on the button, with access to (ideally) methods on the parent form and values from the cell? (I might be able to pass an object reference to the form or an object on the form in the tag, if there is no direct access to methods and properties of the parent form.)

o What is my best way to handle cell formatting, including formatting the controls within the cell (e.g., combobox backcolor) on initialization, on value changed, and on current? So far I haven't seen how to get to the child controls on the Grid_CellFormatting.

Any help will be greatly appreciated.


George
Telerik team
 answered on 20 Jan 2014
1 answer
93 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
155 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
90 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
173 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
235 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
150 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
140 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.3K+ 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
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
CheckedDropDownList
ProgressBar
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?