Telerik Forums
UI for WinForms Forum
1 answer
274 views
Hi;

i use DropDownList control, i added many items and set "Text" properties for each item, but how to set a value to item, i need the selected value.

i do not see any field lets me fill the value of item,

see the attachment
Peter
Telerik team
 answered on 06 Jul 2011
2 answers
130 views
Hi All,

i have the following code to convert a integer value (seconds) to double and i wish to oput it like 00:10:15 (615 seconds) in my summary row.

Private Sub rgvWechselProtokoll_GroupSummaryEvaluate(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GroupSummaryEvaluationEventArgs) Handles rgvWechselProtokoll.GroupSummaryEvaluate
       If e.Parent Is Me.rgvWechselProtokoll.MasterTemplate Then
           Dim fulltime As String
           fulltime = Date.FromOADate(CDbl(e.Value) / 86400)
           e.FormatString = String.Format("Gesamtzeit = {0:T}", fulltime)
       End If
   End Sub

This is working while m grid is not grouped.

I want to have the same formatting when grouped. Currently my code looks like this

        Me.rgvWechselProtokoll.Columns.Add("Sekunden")
      Me.rgvWechselProtokoll.Columns("Sekunden").IsVisible = False
 
      Dim summaryItem As New GridViewSummaryItem()
      summaryItem.Name = "Start"
      summaryItem.AggregateExpression = "Sum(Sekunden)"
      summaryItem.FormatString = "Gesamt = {0}"
 
 
      Dim summaryRowItem As New GridViewSummaryRowItem()
      summaryRowItem.Add(summaryItem)
     
      Me.rgvWechselProtokoll.SummaryRowsBottom.Add(summaryRowItem)
 
so that i will see my seconds as Integer. When i change my first block to

Private Sub rgvWechselProtokoll_GroupSummaryEvaluate(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GroupSummaryEvaluationEventArgs) Handles rgvWechselProtokoll.GroupSummaryEvaluate
    If e.Parent Is Me.rgvWechselProtokoll.MasterTemplate Or IsNumeric(e.Value) Then
        Dim fulltime As String
        fulltime = Date.FromOADate(CDbl(e.Value) / 86400)
        e.FormatString = String.Format("Gesamtzeit = {0:T}", fulltime)
    End If
End Sub

then the formatting is also added when my summery value isNumeric, but this way seems just to be a workaround.

How to apply the same formatting from my first code block using Events or AggregateExpression and FormatString the correct way

Kind regards

Martin Gartmann
Martin Vasilev
Telerik team
 answered on 06 Jul 2011
3 answers
173 views

Hi

I have in my object couple columns of type DateTime.  I use built in functionality for sorting. On the column header user can type date. My problem is that I can define only date, hours, minutes and seconds are always zero (take a look at the screenshot).

Is there any possibility to let the user define also hours?

 

Regards

Martin Vasilev
Telerik team
 answered on 06 Jul 2011
7 answers
187 views
I'm binding to a grid and I'm getting a weird error when I try to bind a datasource:

This is the statement that causes the error:
RootBindingSource.DataSource = _model;

This is the error:

Value of '1' is not valid for 'Value'. 'Value' must be between 'Minimum' and 'Maximum'.
Parameter name: Value

at Telerik.WinControls.UI.RadScrollBarElement.set_Value(Int32 value)\r\n  
at Telerik.WinControls.UI.GridTableElement.EnsureRowVisible(GridViewRowInfo rowInfo)\r\n  
at Telerik.WinControls.UI.GridTableElement.UpdateCurrentPosition()\r\n  
at Telerik.WinControls.UI.GridViewInfo.SetCurrentRow(GridViewRowInfo row, Boolean setPosition, Boolean shift, Boolean control)\r\n  
at Telerik.WinControls.UI.GridViewTemplate.SetCurrentRow(GridViewRowInfo rowInfo)\r\n  
at Telerik.WinControls.Data.DataAccessComponent.InitDataGrid()\r\n  
at Telerik.WinControls.Data.DataAccessComponent.currencyManager_ListChanged(Object sender, ListChangedEventArgs e)\r\n  
at System.Windows.Forms.CurrencyManager.OnListChanged(ListChangedEventArgs e)\r\n  
at System.Windows.Forms.CurrencyManager.List_ListChanged(Object sender, ListChangedEventArgs e)\r\n  
at System.Windows.Forms.BindingSource.OnListChanged(ListChangedEventArgs e)\r\n  
at System.Windows.Forms.BindingSource.SetList(IList list, Boolean metaDataChanged, Boolean applySortAndFilter)\r\n  
at System.Windows.Forms.BindingSource.ResetList()\r\n  
at System.Windows.Forms.BindingSource.ParentCurrencyManager_MetaDataChanged(Object sender, EventArgs e)\r\n  
at System.EventHandler.Invoke(Object sender, EventArgs e)\r\n  
at System.Windows.Forms.CurrencyManager.OnMetaDataChanged(EventArgs e)\r\n  
at System.Windows.Forms.CurrencyManager.List_ListChanged(Object sender, ListChangedEventArgs e)\r\n  
at System.Windows.Forms.BindingSource.OnListChanged(ListChangedEventArgs e)\r\n  
at System.Windows.Forms.BindingSource.SetList(IList list, Boolean metaDataChanged, Boolean applySortAndFilter)\r\n  
at System.Windows.Forms.BindingSource.ResetList()\r\n   at System.Windows.Forms.BindingSource.set_DataSource(Object value)\r\n  

 
I can't figure out what is wrong based on the error description.

Jack
Telerik team
 answered on 06 Jul 2011
6 answers
886 views
Hello,

In my WinForms app, I am using a RibbonBar along with a custom resizing function.  Since I use a custom resizing solution, I have noticed a bug/issue with my RibbonBar.  The default RibbonBar height is 141, and I can seem to change that :S.  During runtime, I add a control to the RadRibbonBarChunk.  This control is of a certain size so that is causes the RibbonBar to grow in height.  Since I can't seem to edit the height of the RibbonBar at design time to make everything work, I have to find some way to adjust the location/size of the control below the RibbonBar that's getting affected, or find a way to force the RibbonBar's height to be greater than 141 at design time.

Any help you can give me with this problem would be wonderful!

--UIDev
Peter
Telerik team
 answered on 06 Jul 2011
2 answers
237 views
Hi All,

Based on this forum thread I tried to obtain the affected child window of the DockWindowClosing event :

private void raddock_DockWindowClosing(object sender, Telerik.WinControls.UI.Docking.DockWindowCancelEventArgs e)
{
    //closing windows
    System.Windows.Forms.Form WindowClosing;
     
    //dockwindow
    if (e.DockWindow is Telerik.WinControls.UI.Docking.HostWindow)
 
        //can convert
        if (((Telerik.WinControls.UI.Docking.HostWindow)e.DockWindow).Content is System.Windows.Forms.Form)
 
            //save the closing window
            WindowClosing = (System.Windows.Forms.Form)((Telerik.WinControls.UI.Docking.HostWindow)e.DockWindow).Content;

But, the ((Telerik.WinControls.UI.Docking.HostWindow)e.DockWindow).Content is always null.

Is there any problem in my code, or it is a bad feature?


Best regards,

Peter
Peter Szintai
Top achievements
Rank 1
 answered on 05 Jul 2011
2 answers
127 views
I need to be able to refresh the appointments in my scheduler periodically or on demand. I am Data Binding to a collection in a repository class which has an Appointments property. When I make changes to the Appointments collection in the custom repository class, how can I force the scheduler to pick up this new data and re-draw?
RachelThornton
Top achievements
Rank 1
 answered on 05 Jul 2011
3 answers
174 views

Hi,

In my GridViewComboboxColumn, the display member is string and value is integer. User can do filtering. But the operations shown on this column in the filtering row are for integer instead for string (please see attachment). Can you please tell me how can I solve this?

The second problem is when I copy(either by context menu or ctrl + c) the combobox value, integer value is copying. I want to copy the text value. What is the best way to do? Can I get the display member? My copy/paste code is working fine with other columns. I only have problem with combobox columns.

Thanks

Regards

Zerka

 

Zerka
Top achievements
Rank 1
 answered on 05 Jul 2011
1 answer
269 views
I can't seem to find the event that is fired when the Title Bar of a RadForm is double clicked.
My form is maximized at all times and I don't want the user to change the size of the windown by double clicking the title bar. Form should always stay at maximized state and this (this.WindowState = System.Windows.Forms.FormWindowState.Maximized) is not preventing the resize on Title Bar double click.

 MaximizeBox property is set to False to prevent the user from clicking the form's maximize button. This part is working fine.
Ivan Petrov
Telerik team
 answered on 05 Jul 2011
2 answers
160 views
How do you reset a grid's ViewDefinition back to the default table view?  Setting it to nothing does appear to work.
Jack
Telerik team
 answered on 05 Jul 2011
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
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
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
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?