Telerik Forums
UI for WinForms Forum
6 answers
701 views
I have what I hope is a simple problem.   I have a simple WinForms application in which I'm providing a generic ObservableCollection<> of a simple public business object type as a data source for a RadGridView (version Winforms 2011_1_11_419), .  

For whatever reason, i cannot get it to auto-sort by clicking on the column headers.  (My understanding after reading the Help is that this should be automatic if the "GridView.EnableSorting" and "GridView.MasterTemplate.EnableSorting" properties are both true).   I do have AutoGenerateColumns also set to True, since the business object is still evolving and gaining/adding/changing properties in between builds..

I've tried setting the grid's DataSource property directly to the ObservableCollection<MyObjectType>.  I've tried creating an intermediate BindingSource and setting the grid's DataSource to that.   I've tried creating several SortDescriptors for the columns on which I most need to sort.   I've tried removing all such SortDescriptors.   I've tried creating a custom SortableObservableCollection (which works in binding in WPF) instead of the ObservableCollection.   Etc. 

The data always displays correctly in the GridView; but doesn't sort or show sort direction indicators in the column headers.

There has to be something simple I'm missing.

Thanks!
-Bob
Michael
Top achievements
Rank 1
 answered on 27 Oct 2013
2 answers
135 views
from
Demo Application - RadControls for WinForms.
Gridview -> Custom Painting.

I want to move the drawing image in grid view.
- change cursor on mouse over
- drag and drop drawing
- show image moving 

please help me...
Lek
Top achievements
Rank 1
 answered on 26 Oct 2013
1 answer
173 views
Hello,

We currently trying the controls and encountered some bugs..
On the form load event, when setting image list to the toolbar and imagekey to a specific menu button some of the buttons does not get refresh and some do..

Is there a way to force refresh to all the buttons after changing the image key?

Thank you
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Oct 2013
12 answers
1.5K+ views
With RadControls 2008 Release 3 1204 (control version 8.1.0.0) I'm facing the following issue:

I handle the ValueChanging and ValueChanged events of a GridViewComboBoxColumn in a data bound GridView control. I set e.Cancel=true in the ValueChanging event handler to prevent modification of the cell value. I would expect not to receive the ValueChanged event in this case - but I'm wrong: The event will be fired although I requested to cancel the changes. Is this intended?

The second thing I don't understand is: why are the Changing / Changed events actually fired even if the cell value did not change at all?

Assume the following scenario: As I said above I have a data bound GridView with an also data bound GridViewComboBoxColumn. I drop down a cell's editor and select the entry with the same value as the cell already contains. The Changing / Changed events will be fired. Even worse, the bound data source (in my case a DataSet/DataTable) will also be changed and contains changed data rows after this - but all values of the row are obviously the same as before.

Now I could at least try to compare the old and new values of the cell manually and cancel the editing if I find that they are equal - but this won't work because of the behaviour described on top.

So could tell my if this is a bug - or at least how I can cancel the cell editing and - more important - the modification of the bound data source?

Regards,
ReneMT


Nikolay
Telerik team
 answered on 25 Oct 2013
1 answer
291 views
In the new version of the WinForms controls (2013.3.1016.40) opening a context menu will cause the form to loose focus and flash.

This also makes the context menu not close all the time on the first click away form the menu since the form regains focus on the first click and then registers the click away on the second click.

This seems to be happening on all controls even when using the default context menu like in the grid view.
George
Telerik team
 answered on 25 Oct 2013
1 answer
132 views
1. Click on a combo property to start edit
2. Move mouse over vertical center dividing line to get mouse to transition to resize pointer
3. Move moue to the right back over the combo box that has been activated for edit
4. The mouse pointer will not transition back to the arrow, it will stay on the resize pointer

I have attached an image of this.
Dimitar
Telerik team
 answered on 25 Oct 2013
3 answers
176 views
#1
How can I configure radDateTimePicker to allow any type of input so I can parse the input into a valid date (or set to null if invalid)?

Examples:

- Users want to be able to key in 7 (today's day part) and have the date parsing assume current month and year => 08/07/2013;

- Key in 9/7 ... date parsing will assume current year => 09/07/2013;

I will write the parsing rules ... but how can I configure the control to accept text only ... without the '/' and without trying to format as a date while the user is typing?


#2
How can I make the control (and all other Telerik controls) look like the rest of the controls on my form?  I am using Win7 ... but others may be on Win8 or Vista.

#3
How can I make the control not nullable - so a date must be entered?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Oct 2013
1 answer
480 views
Hello,

I have a solution (see example below) how to use RadMultiColumnComboBox auto filter and it's EditorControl's column filters enabled at the same time. Howewer, there is a problem and I'd be glad if you have any solution.

I've attached a picture of working and non working example of filtering.

Filtering as shown on page http://www.telerik.com/help/winforms/multicolumncombobox-filtering.html is not enaugh for what I am trying to do.
My goal is to have RadMultiColumnComboBox auto filtering and also it's EditorControl columns filtering enabled at the same time.
This example shows how to solve this. But it only works when manipulating with short strings in the RadMultiColumnCombobox's DataSource (which is DataTable). 
But as soon as longer string is placed inside DataTable, strange problem accures. 
Try two things:
1.) Run the program. Click on the RadMultiColumnComboBox. Popup with RadGridView accures automatically. Now click on the LastName filter. Enter character 0. Filtering works for now.
2.) Now erase this character and enter another one - z. There is no last name that contains letter z, true... but that should not crach the application. The application crashes. Why? If you shorten the first name in the first row and run the application again, this doesn't happen.

Below there is a Form1.vb with all the code needed. In designer I only have one RadMulticolumnComboBox1 control, placed on Form1.

Imports Telerik.WinControls.UI
Imports Telerik.WinControls.Data
 
Public Class Form1
    Private shouldNotCancelPopup = True
 
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim dt As New DataTable
        dt.Columns.Add("FirstName")
        dt.Columns.Add("LastName")
        dt.Rows.Add("Selectt one", "")
        dt.Rows.Add("Very very loooong looong first name", "Last Name 0") 'This one is the troublemaker. I do not know why.
 
        dt.Rows.Add("Short first name 1", "Last Name 1")
        dt.Rows.Add("Short first name 2", "Last Name 2")
 
        Me.RadMultiColumnComboBox1.DataSource = dt
        Me.RadMultiColumnComboBox1.EditorControl.Rows(0).IsPinned = True
        Me.RadMultiColumnComboBox1.DisplayMember = "FirstName"
        Me.RadMultiColumnComboBox1.ValueMember = "LastName"
        setChangeableVisibilityStyle(RadMultiColumnComboBox1)
        enableEditorControlFiltering(Me.RadMultiColumnComboBox1)
        linkComboBoxFilterWithHisEditorControlFilter(RadMultiColumnComboBox1)
    End Sub
 
    Public Sub enableEditorControlFiltering(ByRef cb As RadMultiColumnComboBox)
        cb.EditorControl.ShowRowHeaderColumn = False
        cb.EditorControl.EnableFiltering = True
        cb.EditorControl.ShowFilteringRow = True
        AddHandler cb.EditorControl.MouseLeave, AddressOf cb_EditorControl_MouseLeave
        AddHandler cb.DropDownClosing, AddressOf cb_DropDownClosing
        AddHandler cb.EditorControl.CellClick, AddressOf cb_GridWithoutCheckBoxes_CellClick
    End Sub
 
    Private Sub cb_DropDownClosing(ByVal sender As System.Object, ByVal args As Telerik.WinControls.UI.RadPopupClosingEventArgs)
        If shouldNotCancelPopup Then
            args.Cancel = True       
        End If
    End Sub
 
    Private Sub cb_EditorControl_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) 'Handles cb_EditorControl_MouseLeave.MouseLeave
        shouldNotCancelPopup = False
    End Sub
 
    Private Sub cb_GridWithoutCheckBoxes_CellClick(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs)
        Try
            If e.RowIndex >= 0 Then            'If valid row
                shouldNotCancelPopup = False
            Else
                shouldNotCancelPopup = True
            End If
        Catch ex As Exception
        End Try
    End Sub
 
    Public Sub setChangeableVisibilityStyle(ByRef cb As RadMultiColumnComboBox)
        cb.EditorControl.BestFitColumns()
        cb.MultiColumnComboBoxElement.AutoSizeDropDownToBestFit = True
    End Sub
 
    Public Sub linkComboBoxFilterWithHisEditorControlFilter(ByVal cb As RadMultiColumnComboBox)
        cb.AutoFilter = True
        Dim filter As New FilterDescriptor()
        filter.PropertyName = cb.DisplayMember
        filter.Operator = FilterOperator.Contains
        cb.EditorControl.MasterTemplate.FilterDescriptors.Add(filter)
    End Sub
End Class

George
Telerik team
 answered on 25 Oct 2013
1 answer
156 views
Hello all,

link manager dialog displays with radtoolbar reappear above modal overlay when user clicks all properties button on insert link dialog
need to prevent users click any editor tools.
navigated code but I could not find any triggers that.
I am just assuming CSS issues.

Thank you
Kate
Telerik team
 answered on 25 Oct 2013
1 answer
167 views
Hi Telerik Team,

I have a problem with multi-column gridview printing. When I try to print a big radgridview e.g 100 rows and 50 columns everything is OK in vertical state because when is no space for rows on one page the rest is printing on another one. The problem is when there is no space for columns, then there are not moved on another page but cutted. So then I have e.g. only 30 columns instead of 50. Is there any possibility to print all of them to obtained view of whole gridview or this function is not available? It would be great if for example first column of gridview which is common to rest would be visible on each page where columns, which can't fit to the first page, were moved.

Best regards
Krystian
Ivan Petrov
Telerik team
 answered on 24 Oct 2013
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?