Telerik Forums
UI for WinForms Forum
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
971 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
148 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
180 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
206 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
84 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
175 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
8 answers
1.1K+ views

I'm using Telerik.WinControls.GridView version 2012.2.912.40.

I validate a cell value in cell validating event.

I set e.Cancel = true in CellValidating event and then delete row of that cell with a command cell click event.

when the gridview's row count reach to zero and double click the gridview error occur "Exception thrown: 'System.NullReferenceException' in Telerik.WinControls.GridView.dll".

private void gvStockItemDetail_CellValidating(object sender, CellValidatingEventArgs e)
{

 if (!string.IsNullOrEmpty(Convert.ToString(e.Row.Cells["Stock ID"].Value)) && column.Name == "Quantity")
  {
    if (Convert.ToDecimal(string.IsNullOrEmpty(Convert.ToString(e.Value)) ? 0 : e.Value) <= 0)
     {
       e.Cancel = true;
       e.Row.Cells["Quantity"].BeginEdit();
       e.Row.ErrorText = BOL_Global_Message.STOCK.Msg_Quantity;                      
     }
    else
     {
       e.Row.ErrorText = string.Empty;
     }
   }

}

private void gvStockItemDetail_CommandCellClick(object sender, EventArgs e)
{
   if (gvStockItemDetail.CurrentRow.Index >= 0)
   {
    gvStockItemDetail.Rows.RemoveAt(gvStockItemDetail.CurrentRow.Index);

   }

}

Myo
Top achievements
Rank 1
 answered on 08 Nov 2016
1 answer
136 views

Collapsible Panels Controls Container is being focused on pressing ENTER key, however i have already set the following properties 

Focusable = false

TabStop = false

but focus is being transfer and tab is being stop 

can anybody guide what needs to be done here 

Regards

 

Dimitar
Telerik team
 answered on 08 Nov 2016
4 answers
137 views

Hi

How I can do to make the tab order do not appear in my radform radlabels? Please see the attached image.

Thanks

Angel

Angel
Top achievements
Rank 1
 answered on 07 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
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
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
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
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
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?