Telerik Forums
UI for WinForms Forum
1 answer
326 views
Is there a way (ideally a property) to stop the grid from automatically selecting the newest row when one is added to the datasource?  

See the example below.  When an item is added to the bindinglist, I want to prevent the row selection from occuring.  I know I can set a variable before adding the item, and then cancel the row change on the "changing" event.  But ideally, I could just turn off the functionality.

It also needs to NOT automatically scroll to it.

Thoughts?

Please note:  This behavior does NOT occur on the MS datagrid.

Imports System.ComponentModel
 
Public Class Form1
 
    Private myList As BindingList(Of MyObject)
 
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
        myList = New BindingList(Of MyObject)()
        myList.Add(New MyObject(1, "Outdoor"))
        myList.Add(New MyObject(2, "Hardware"))
        myList.Add(New MyObject(3, "Tools"))
        myList.Add(New MyObject(4, "Books"))
        myList.Add(New MyObject(5, "Appliances"))
        AddHandler myList.ListChanged, AddressOf myList_ListChanged
        RadGridView1.DataSource = myList
    End Sub
    Sub myList_ListChanged(ByVal sender As Object, ByVal e As ListChangedEventArgs)
 
    End Sub
    Private Sub RadButton1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadButton1.Click
        myList.Add(New MyObject(6, "Plants"))
        ' DO NOT CHANGE SELECTION!
    End Sub
 
 
 
    Public Class MyObject
        Public Sub New(ByVal myInt As Integer, ByVal myString As String)
            _myInt = myInt
            _myString = myString
        End Sub
        Private _myInt As Integer
        Public Property MyInt() As Integer
            Get
                Return _myInt
            End Get
            Set(ByVal value As Integer)
                _myInt = value
            End Set
        End Property
        Private _myString As String
        Public Property MyString() As String
            Get
                Return _myString
            End Get
            Set(ByVal value As String)
                _myString = value
            End Set
        End Property
    End Class
 
End Class
Jason Parrish
Top achievements
Rank 1
 answered on 04 Nov 2011
1 answer
139 views
I have noticed that checking a checkbox does not immediately update the datasource.  It isn't until I click on another control that the databinding occurs.

This seems inconsistent with how the standard winforms controls behave.

What is the most normal way of duplicating the standard behavior?
Peter
Telerik team
 answered on 04 Nov 2011
2 answers
217 views

Hello All,

I have added a handler to try and capture the double click of an editing cell on a grid - it never reaches the stop statement, the keydown item fires fine. Can anyone give me some pointers?

 

Private Sub radGridView1_CellEditorInitialized(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles RadGridView1.CellEditorInitialized
       Dim tbEditor As RadTextBoxEditor = TryCast(Me.RadGridView1.ActiveEditor, RadTextBoxEditor)
       If Not tbEditor Is Nothing Then
           If (Not tbSubscribed) Then
               tbSubscribed = True
               Dim tbElement As RadTextBoxEditorElement = CType(tbEditor.EditorElement, RadTextBoxEditorElement)
               tbElement.TextBoxItem.Tag = Me.RadGridView1.Name
               AddHandler tbElement.TextBoxItem.KeyDown, AddressOf tbElement_KeyDown
               AddHandler tbElement.DoubleClick, AddressOf tbElement_DoubleClick
           End If
       End If
   End Sub
   Private Sub tbElement_DoubleClick(ByVal sender As Object, ByVal e As EventArgs)
       Stop
   End Sub
 
 
   Private Sub tbElement_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs)
 
       If e.KeyCode = Keys.F1 Then
           Stop
       End If
 
 
 
   End Sub
Brad
Top achievements
Rank 1
 answered on 03 Nov 2011
3 answers
144 views
Hi,

I noticed that the OnKeyPress, OnKeyUp, and OnKeyDown don't 'work' the same as the microsoft text box, it's been documented here in this forum, and there were a few other events that don't work as expected.

Is there a full list of events in this and other controls that I should be wary about when converting all our .net controls to telerik ones?

I'm using version 2011.2.11.831.

Thanks,
Clive
Stefan
Telerik team
 answered on 03 Nov 2011
1 answer
514 views
Hi
I need to change the font for one column of my RadGridView in runtime. Is this possible?
If Yes, can you help me with the code in VB.NET?
Thanks
Ivan Petrov
Telerik team
 answered on 03 Nov 2011
1 answer
154 views
Hello all,
      I need help in setting up a multi user / resource
scheduler. I am having problems getting help...
                                                      regards,                                      
                                                        Jeff Link

     these two lines of code will not do it alone (VB.NET)
      
                   
Me.RadScheduler1.GroupType = GroupType.Resource
            Me.RadScheduler1.ActiveView.ResourcesPerView = 2
       
Ivan Todorov
Telerik team
 answered on 03 Nov 2011
3 answers
192 views
Hi,

Have a grid that mainly presents start and end time for a workshift.
When I edit this grid, i would like to input '1000' and validate this and correct it to 10:00, or input 130 and validate this and correct it to 01:30. Or 2350 - > 23:50. And if the user inputs 10:20 it should only validate and it should be ok. But if the user inputs 1080, 1667 or 10:98. It should all give an exception while validateing. It should happen when the cursor leaves the cell.

How can this be done most efficiently. 

Regards
Svein Thomas
Jack
Telerik team
 answered on 03 Nov 2011
14 answers
290 views
I created a custom combobox that I want to use in the grid view during editing.  When the user is editing the data I want to allow then to beable to choose from a list of items, enter in new items (like a text box and save when done typing or lost focus) and also allow the user to click on an x next to an item and remove it from the list items.  Is this possible?  So, is it possible to customize the list itmes to have a image (x) and use a click event on the fire a method to delte the item?


Stephen
Nikolay
Telerik team
 answered on 03 Nov 2011
1 answer
136 views
i created an recursive appointment after that i want to extend the time of particular date for i opened that appointment in occurrence  mode .
modified the appointment time then  When i submitting the appointment i got this exception.

"object reference not set"  and my application is terminated.

-Sivaram.
Ivan Todorov
Telerik team
 answered on 03 Nov 2011
1 answer
181 views
Hi,

I would like to be able to prevent the user to change the value on certain situations but I cannot find an event that would help me do that.

I've found the MultiColumnComboBoxElement.TextChanging event, but that only works when the modification is made with the keyboard. I would need to be able to handle also the modifications made by the mouse, including the mouse wheel.

Any ideas?

Thanks!
Stefan
Telerik team
 answered on 03 Nov 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)
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
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
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
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?