Telerik Forums
UI for WinForms Forum
1 answer
318 views

I would love to avoid having to create columns by hand, and just rely on auto generation. I know I can set a title of the column by adding a DisplayName attribute. However, when I try to set a date format, it's breaking.

Here's what I am trying to do

[DisplayName("Invoice Date")]
[DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}")]
public DateTime? InvoiceDate { get; set; }

However, the date still displays with the time.

Also, is there a way to get a column to be hidden through attributes alone?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 11 Nov 2016
31 answers
1.6K+ views
Hi,
I am currently trying to create controls inside a column of the grid view dynamically. My requirement is like i want to create textbox or combo box and bind it into the column depending on the condition. Is it possible to have textbox and combobox in the same column?

Can you please enlighten us with some sample code?

Thanks in advance,
Veda
Dimitar
Telerik team
 answered on 10 Nov 2016
3 answers
385 views

how can move between controls by using enter

if ((e.KeyCode == Keys.Enter) )
            {
                this.SelectNextControl((Control)sender, true, true, true, true);
            }

is not working

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Nov 2016
2 answers
1.5K+ views

I have a GridViewDateTimeColumn that I am trying to format to show only the date in the format:  "MM/dd/yyyy", but instead I get the time in the form of all zeros following the date. (see screen shot).

Property Settings:

Format:  Custom

FormatInfo: en-IN

CustomFormat:  MM/dd/yyyy

EditorType:  DateTimePicker

FilteringMode: Date

Is it possible to get rid of the time and just display the date? If so, how?

 

 

 

Gone2TheDogs
Top achievements
Rank 2
Iron
Veteran
 answered on 09 Nov 2016
4 answers
988 views
I want to be able to distinguish between different tabs using color. How can I change the tabs to look something like this?
Pavel
Top achievements
Rank 1
 answered on 09 Nov 2016
1 answer
151 views

Hi,

As you probably know, Telegram has introduced its Gaming Platform recently which supports HTML5.
I developed a WinForms application with the help of your UI for WinForms product (e.g., GridView and ...). I know that you have a product called Kendo UI which supports HTML5, too. My question is that, is it possible to build an HTML5 page using Kendo UI and then render it into Telegram? If so, how?

Actually, since Telegram supports HTML5 from now on and since your Kendo UI supports HTML5, so I want to make some HTML5 pages (Specially GridView) and load them into Telegram and users can interact with my WinForms application using their Telegram app.

I you have any idea about this, please help.

Thanks in advance.

Alex Hajigeorgieva
Telerik team
 answered on 09 Nov 2016
3 answers
189 views
Hi,

I am having troubles with the DropDownList. I have bound the "SelectedValue"-property of the DropDownList to an int:
myDropDownList.DataBindings.Add("SelectedValue", this, "myID", false, DataSourceUpdateMode.OnPropertyChanged);

When typing something in the DropDownList everything is OK. But I a remove the typed Text I get a very strange exception:

System.ArgumentException was unhandled
  Message=Object of type 'System.DBNull' cannot be converted to type 'System.Int32'.
  Source=System
  StackTrace:
       at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
       at System.Windows.Forms.BindToObject.SetValue(Object value)
       at System.Windows.Forms.Binding.PullData(Boolean reformat, Boolean force)
       at System.Windows.Forms.Binding.Target_PropertyChanged(Object sender, EventArgs e)
       at Telerik.WinControls.UI.RadDropDownList.OnSelectedValueChanged(Object sender, Int32 newIndex, Object oldValue, Object newValue)
       at Telerik.WinControls.UI.RadDropDownList.element_SelectedValueChanged(Object sender, ValueChangedEventArgs e)
       at Telerik.WinControls.UI.RadDropDownListElement.OnSelectedValueChanged(Object sender, ValueChangedEventArgs e)
       at Telerik.WinControls.UI.RadDropDownListElement.NotifyOwner(PopupEditorNotificationData notificationData)
       at Telerik.WinControls.UI.PopupEditorElement.listElement_SelectedValueChanged(Object sender, EventArgs e)
       at Telerik.WinControls.UI.RadListElement.OnSelectedValueChanged(Int32 newIndex)
       at Telerik.WinControls.UI.RadListElement.OnSelectedIndexChanged(Int32 newIndex)
       at Telerik.WinControls.UI.RadListElement.SetSelectedIndex(Int32 value)
       at Telerik.WinControls.UI.RadDropDownListElement.set_SelectedIndex(Int32 value)
       at Telerik.WinControls.UI.RadDropDownListElement.OnTextChanged(RadDropDownListEditableAreaElement sender, EventArgs args)
       at Telerik.WinControls.UI.RadDropDownListElement.NotifyOwner(PopupEditorNotificationData notificationData)
       at Telerik.WinControls.UI.RadDropDownListEditableAreaElement.textBox_TextChanged(Object sender, EventArgs e)
       at Telerik.WinControls.RadItem.OnTextChanged(EventArgs e)
       at Telerik.WinControls.RadItem.OnPropertyChanged(RadPropertyChangedEventArgs e)
       at Telerik.WinControls.RadObject.RaisePropertyNotifications(RadPropertyValue propVal, Object oldValue, Object newValue, ValueSource oldSource)
       at Telerik.WinControls.RadObject.SetValueCore(RadPropertyValue propVal, Object propModifier, Object newValue, ValueSource source)
       at Telerik.WinControls.RadElement.SetValueCore(RadPropertyValue propVal, Object propModifier, Object newValue, ValueSource source)
       at Telerik.WinControls.RadObject.OnTwoWayBoundPropertyChanged(PropertyBinding binding, Object newValue)
       at Telerik.WinControls.PropertyBinding.UpdateSourceProperty(Object newValue)
       at Telerik.WinControls.RadPropertyValue.SetLocalValue(Object value)
       at Telerik.WinControls.RadObject.SetValueCore(RadPropertyValue propVal, Object propModifier, Object newValue, ValueSource source)
       at Telerik.WinControls.RadElement.SetValueCore(RadPropertyValue propVal, Object propModifier, Object newValue, ValueSource source)
       at Telerik.WinControls.UI.RadTextBoxItem.TextBoxControl_TextChanged(Object sender, EventArgs e)

Can anybody help?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 09 Nov 2016
5 answers
218 views

Hello,

I have a chart which display will should display timeserie data which could vary from a few point to hunderds. And of course the chart could be resized. In some this end up in an unreadable chart with too much tick label (or not enough).

It will be great if the chartview control could be able to update automatically the MajorTickInterval to prevent this. Just like the chart in Excel !

I attach two screenshot (one of the ChartView, one of Excel) to illustrate.

Hristo
Telerik team
 answered on 08 Nov 2016
3 answers
91 views

Hi,

 

I have been trying to override CellFormatting to reformat a string value to look like 2 labels, one above the other (in the same cell) e.g.:

Freddy Smith (standard font)

  On the phone (smaller font)

 

To do this I have been trying to create 2 RadHostControls, each one hosting a Label control and using .Location. .MaxSize etc properties to try to position the 2 labels (or their host controls) within the cell.

But somehow the first RadHostControl seems to take over all the spacein the cell (If I put the background to red I can see it occupies the whole cell).

Do you have any example where you have used multiple labels?

Many thanks.

 

(Using Q1 2016)

 

Dimitar
Telerik team
 answered on 08 Nov 2016
5 answers
182 views

Hello, I have a custom column, that is bound to a custom type, the custom type is a complex type, that have a (public string Display) property, that is the one I wish to use to filter the grid.

The excel like filter is working, maybe because the compex type have a "tostring" method, i attach a screenshot of the grid.

The standard filter is not working instead. All the filters are disabled. How can I make the filter cell to work with the complex type? I think i have to create a new filter cell descending from Telerik.WinControls.UI.GridFilterCellElement

then on my custom column:

public override Type GetCellType(GridViewRowInfo row)
       {
           if (row is GridViewDataRowInfo)
           {
               return typeof(LookupGridColumnElement);
           }
           else if (row is Telerik.WinControls.UI.GridViewFilteringRowInfo)
           {
               return typeof(LookupGridColumnFilterElement);
           }
                        
           return base.GetCellType(row);
       }

 

Is that the correct way? What do i need to override on my filter cell to let it work as if it were bound to a string field?

 

 

Dimitar
Telerik team
 answered on 08 Nov 2016
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
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?