Telerik Forums
UI for WinForms Forum
3 answers
163 views
This question may belong in a different WinForms controls forum. If so, I apologize.

Ultimately, I am wanting to show a carousel full of RadGridViews, but for performance's sake I am converting the RadGridView's into RadImageItems to be loaded into the carousel.

I'd like to be able to put a label above the RadGridView as a title for the grid. So far I've tried adding a RadLabel and RadGridView to a RadItemsContainer, and then using the "GetAsBitmap" function to no avail.  

RadImageItem image1 = new RadImageItem();
image1.Image = rl.RootElement.GetAsBitmap(Brushes.White, 0, new SizeF(1, 1));
rl.RootElement.GetAsBitmap(Brushes.White, 0, new SizeF(1, 1));
 
RadImageItem image2 = new RadImageItem();
image2.Image = grid.RootElement.GetAsBitmap(Brushes.White, 0, new SizeF(1, 1));
 
RadItemsContainer ric = new RadItemsContainer();
ric.Items.Add(image1);
ric.Items.Add(image2);
 
RadImageItem image3 = new RadImageItem();
image3.Image = ric.GetAsBitmap(Brushes.White, 0, new SizeF(1, 1));
image3.ImageKey = imageKey;

(rl = previously declared RadLabel, grid = previously declared RadGridView)

Thanks,

Rob
Peter
Telerik team
 answered on 06 Jul 2011
1 answer
266 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
128 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
169 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
181 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
858 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
228 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
123 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
167 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
266 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
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?