Telerik Forums
UI for WinForms Forum
1 answer
157 views
Hello.

I have Gridview with ColorColumn which is binded to database varchar field. Data displays correctly, but when I want  to change it, error [Input string was not in correct format.] is thrown. I think it has something to do with changing data from string to System.Drawing.Color.

Regards.
Stefan
Telerik team
 answered on 31 Jan 2012
1 answer
123 views
I just want to make sure I'm doing this correctly.  In my constructor I have this:
            HamsGrid.MasterTemplate.SortComparer = new HamsCustomComparer();

That works as expected.  Now I also want the user to be able to sort individual columns if they so choose, so I added two radio buttons to the screen, one called Default the other User.  When User is clicked I want to clear the custom comparer, so I do this:
            HamsGrid.MasterTemplate.SortComparer = null; //line 1807 in code

Then, of course in the Default handler I have:
            HamsGrid.MasterTemplate.SortComparer = new HamsCustomComparer();

Setting it to null is causing an exception (I only have from my call at line 1807 on up):
System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Collections.Generic.AvlTree`1.LastIndex(ValueT value)
   at Telerik.Collections.Generic.AvlTree`1.InsertWithDuplicates(ValueT value)
   at Telerik.Collections.Generic.AvlTree`1.Add(ValueT item)
   at Telerik.WinControls.Data.AvlIndex`1.Perform()
   at Telerik.WinControls.Data.AvlIndex`1.get_Items()
   at Telerik.WinControls.Data.RadDataView`1.get_Items()
   at Telerik.WinControls.Data.RadCollectionView`1.GetEnumerator()
   at Telerik.WinControls.UI.GridViewInfo.Refresh()
   at Telerik.WinControls.UI.GridViewInfo.get_ChildRows()
   at Telerik.WinControls.UI.GridViewTemplate.get_ChildRows()
   at Telerik.WinControls.UI.ViewInfoTraverser.SetCollectionForStage(Boolean initializeCollection)
   at Telerik.WinControls.UI.ViewInfoTraverser.SetCollectionForStage()
   at Telerik.WinControls.UI.ViewInfoTraverser.ChangeCollectionForward()
   at Telerik.WinControls.UI.ViewInfoTraverser.MoveNextCore()
   at Telerik.WinControls.UI.ViewInfoTraverser.MoveNext()
   at Telerik.WinControls.UI.GridTraverser.MoveNextCore()
   at Telerik.WinControls.UI.GridTraverser.MoveNext()
   at Telerik.WinControls.UI.ItemScroller`1.UpdateScrollRange()
   at Telerik.WinControls.UI.RowScroller.UpdateScrollRange()
   at Telerik.WinControls.UI.GridTableElement.UpdateNoDataText()
   at Telerik.WinControls.UI.GridTableElement.UpdateAll()
   at Telerik.WinControls.UI.GridTableElement.UpdateViewCore(Object sender, DataViewChangedEventArgs args)
   at Telerik.WinControls.UI.GridTableElement.UpdateView(Object sender, DataViewChangedEventArgs args)
   at Telerik.WinControls.UI.GridTableElement.ProcessTemplateEvent(GridViewEvent eventData)
   at Telerik.WinControls.UI.GridTableElement.Telerik.WinControls.UI.IGridViewEventListener.ProcessEvent(GridViewEvent eventData)
   at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessCollection(GridViewEvent gridEvent, PriorityWeakReferenceList list, GridEventProcessMode processMode)
   at Telerik.WinControls.UI.GridViewEventProcessEntity.Process(GridViewEvent gridEvent)
   at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessEvent(GridViewEvent gridEvent)
   at Telerik.WinControls.UI.GridViewSynchronizationService.NotifyListeners(GridViewEvent gridEvent)
   at Telerik.WinControls.UI.GridViewSynchronizationService.FlushEvents()
   at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewEvent gridEvent)
   at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewTemplate template, GridViewEvent eventData, Boolean postUI)
   at Telerik.WinControls.UI.GridViewTemplate.DispatchEvent(GridViewEvent gridEvent, Boolean postUI)
   at Telerik.WinControls.UI.GridViewTemplate.DispatchDataViewChangedEvent(Object sender, DataViewChangedEventArgs args)
   at Telerik.WinControls.UI.GridViewTemplate.OnViewChanged(Object sender, DataViewChangedEventArgs e)
   at Telerik.WinControls.UI.GridViewTemplate.OnViewChanged(DataViewChangedEventArgs e)
   at Telerik.WinControls.UI.GridViewTemplate.CollectionView_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.WinControls.Data.RadCollectionView`1.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at Telerik.WinControls.Data.RadDataView`1.RebuildData(Boolean notify)
   at Telerik.WinControls.Data.RadDataView`1.RefreshOverride()
   at Telerik.WinControls.Data.RadDataView`1.OnNotifyPropertyChanged(PropertyChangedEventArgs e)
   at Telerik.WinControls.Data.RadDataView`1.set_Comparer(IComparer`1 value)
   at Telerik.WinControls.UI.GridViewTemplate.set_SortComparer(IComparer`1 value)
   at TCS.TDOC.DispatchScreen.SortCustomRadio_ToggleStateChanged(Object sender, StateChangedEventArgs args) in C:\Work\TCS\Source\TCS\TCS\ContentScreens\DispatchScreen.cs:line 1807

Svett
Telerik team
 answered on 31 Jan 2012
1 answer
91 views
Hi.. 
Im using PropertyGrid for my own class.
that class have nonbasic type..
that type is kind of class. ex) Point,SizeF
If I try change Some Data at unexpand mode
Look at example picture.
at there if I write some bad string like "20,A"
in typeconverter make exception but that exception make program dead.
system.windows.form.propertygrid just show popupmessage.
but radpropertygrid make program dead.

even RadControl Demo also Dead.. please tell me about solution or fix that bug..
thanks...

Ivan Petrov
Telerik team
 answered on 31 Jan 2012
1 answer
266 views
Hi,

I want to use a RadListView in Icons View Type showing long label.
Here is the code :

'
'RadListView1
'
Me.RadListView1.AllowArbitraryItemHeight = True
Me.RadListView1.AllowEdit = False
Me.RadListView1.AllowRemove = False
Me.RadListView1.FullRowSelect = False
Me.RadListView1.GroupItemSize = New System.Drawing.Size(200, 20)
Me.RadListView1.ImageList = Me.ImageList1
ListViewDataItem1.Image = CType(resources.GetObject("ListViewDataItem1.Image"), System.Drawing.Image)
ListViewDataItem1.ImageKey = ""
ListViewDataItem1.Text = "ListViewItem 1 With a long label"
ListViewDataItem1.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
ListViewDataItem2.Image = CType(resources.GetObject("ListViewDataItem2.Image"), System.Drawing.Image)
ListViewDataItem2.ImageIndex = 0
ListViewDataItem2.Text = "ListViewItem 2 With a long label"
ListViewDataItem2.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
ListViewDataItem3.Image = CType(resources.GetObject("ListViewDataItem3.Image"), System.Drawing.Image)
ListViewDataItem3.ImageIndex = 0
ListViewDataItem3.Text = "ListViewItem 3 With a long label"
ListViewDataItem3.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
Me.RadListView1.Items.AddRange(New Telerik.WinControls.UI.ListViewDataItem() {ListViewDataItem1, ListViewDataItem2, ListViewDataItem3})
Me.RadListView1.ItemSize = New System.Drawing.Size(148, 20)
Me.RadListView1.Location = New System.Drawing.Point(329, 34)
Me.RadListView1.Name = "RadListView1"
Me.RadListView1.Size = New System.Drawing.Size(155, 94)
Me.RadListView1.TabIndex = 0
Me.RadListView1.Text = "RadListView1"
Me.RadListView1.ViewType = Telerik.WinControls.UI.ListViewType.IconsView

The problem is when the list size is to small, a scroll bar appears, but an empty space appears too on the top of the list, and the last item of the list becomes hidden (even in scrolling down the list)

The first image shows the list with all items, the second one has too little width (and an empty space on the top), the third shows the list with an invisible item

Could you help me with this?
Thanks

Regards,
Ivan Todorov
Telerik team
 answered on 31 Jan 2012
7 answers
437 views
Hello,

I'm totally new to creating charts with Telerik's controls. What I need to create is a gantt chart that will display employee names on the Y-Axis and a time range on the x-axis.

So basically my data would come in the form of this:

John Doe - Worked from: 11:00, to: 17:00
Martha S. - Worked from: 5:00 to 11:00

So, the names would appear at the vertical plane, while a time range would be at the horizontal plane.

Help please!

I know I should've searched, but since i'm really new to this, I wouldn't exactly know what to look for.

Thanks in advance guys.
Giuliano Caetano
Top achievements
Rank 1
 answered on 30 Jan 2012
1 answer
106 views
Hi there,
    I have a datatable that I am using as the source of my datagrid. The datagrid is a self referencing hierarchy. When I add a row to the datatable, it does not appear in the grid. If I add a second row, or click around in the grid it appears. It is as though the grid is not being repainted. I need to mention that this grid allows for drag and drop from another grid.

Code under my add button:

nCount += 1

 


Dim
dr As DataRow

 

dr = dtTable2.NewRow

dr("Item Number") = nCount
dr(
"ParentItem") = 0

dr("Item Desc") = ""

dr("Quantity") = 0

dr("UOM") = ""

dr("Vendor") = ""

 

dtTable2.Rows.Add(dr)

 

dgBOM.DataSource = dtTable2

 

 

 

Julian Benkov
Telerik team
 answered on 30 Jan 2012
1 answer
83 views

Hi
I m having this error. Can anyone please help me. frmSetCountry Variable has value in it.
Thanks
Shah
Top achievements
Rank 1
 answered on 28 Jan 2012
10 answers
283 views
Hi,

Is it possible to change appointment layout?
In RadScheduler control for asp.net we can customize appointment template and i want to do the same in RadScheduler for Windows Forms. What i want to do is something like the appearance in image attached. The round rectangle named "report" is a clickable button.
Karl
Top achievements
Rank 1
 answered on 27 Jan 2012
3 answers
185 views
How to re-order the stripitems in desgin view? Thanks.
Ivan Todorov
Telerik team
 answered on 27 Jan 2012
3 answers
276 views
Hi,

When I want to add a new row (by the 'add new row line') to my grid, it works fine when I commit the new row by pushing the 'enter' key. But when I fill in some new data in the new row line and I click (by mouse) in the empty space in the grid. The new row appears in the grid but its not commited,& it does not fire the UserAddedRow event.
How is it possible to make the new data is commited not by pressing the 'enter' key but by clicking in the empty space in the grid?

Kind regards
Jack
Telerik team
 answered on 27 Jan 2012
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
Iron
Iron
Sergii
Top achievements
Rank 1
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
Iron
Iron
Sergii
Top achievements
Rank 1
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?