Telerik Forums
UI for WinForms Forum
3 answers
183 views
Good Afternoon,

I recently upgraded to the new Radcontrols for Winforms 2009 Q3 and noticed an issue with code that was previously working.

In my grid's I was handling the "CurrentRowChanged" event as it seemed this event would fire after the current row had changed allowing me to look at "GridView1.CurrentRow.GridViewInfo.CurrentIndex" to get the new index of the row that was selected. From this I was able to get some information from a specific Cell that contained an ID and query my database to load assocaited information.

Unfortuantely since installing 2009 Q3, this event still fires, but the resulting Index is always 0 even though the grid itself visually does display the highlighted row properly.

Has something changed with the "CurrentRowChanged" event, should I be using "SelectionChanged" instead? If so I could not find any exampled for "SelectionChanged"

In reality all I am wanting to do is get the index of the newly selected row after it is clicked on.

Any help would be apprecaited.

Thank You,

Chris Eisnaugle

Jack
Telerik team
 answered on 18 Nov 2009
2 answers
131 views
Hi

I have a RadDock control (named dockManager) that I am listening to the drag/drop service on, using the following code in the form's constructor:
            DragDropService dragDrop = dockManager.GetService<DragDropService>();  
            dragDrop.DragDropMode = DragDropMode.Preview;  
            dragDrop.PreviewDockPosition += new DragDropDockPositionEventHandler(dragDrop_PreviewDockPosition);  
            dragDrop.Starting += new StateServiceStartingEventHandler(dragDrop_Starting);  
            dragDrop.AllowedStates = AllowedDockState.All & ~AllowedDockState.TabbedDocument;  
 
 
I need to determine whether I am dragging a ToolWindow, a DockTabStrip and also determine the type of toolwindow/DockTabStrip
At the risk of asking a stupid question, how do I determine what object I am dragging in dragDrop_Starting event handler and/or dragDrop_PreviewDockPosition?

Thanks in advance

Alan
Georgi
Telerik team
 answered on 18 Nov 2009
1 answer
75 views
Hi there,

Not sure if this is DEU syndrome or not, but I seem to have closed the windows in the StyleBuilder, and can't for the life of me figure out how to get them back.  This only seems to be the case from an instance that runs after being initiated from VS. If I run from the start menu, the proper windows are displayed.  I tried to rename the cfg file from ProgramData, but it didn't seem to make a difference.

Thanks.

Ashley
Nikolay
Telerik team
 answered on 18 Nov 2009
1 answer
125 views
I'm developing a project where i have to use the ADO.net architecture. I'm trying to understand the whole SchedulerDataDataSet, but i'm kinda stuck. If there any way to change everything and do it with a Business Entities Component and a Data Acces Layer Component.
Nikolay
Telerik team
 answered on 18 Nov 2009
1 answer
136 views
I'm trying to get the RadMarkupDialog working at runtime (using the code from http://www.telerik.com/help/winforms/radmarkupdialog.html). I have references to Telerik.WinControls, Telerik.WinControls.UI, Telerik.WinControls.UI.Design, TelerikCommon, and TelerikData (all 2009.3.9.1103) and can't find the RadMarkupDialog class in any of them. Did the runtime version not make it in to Q3 or am I missing something?
Svett
Telerik team
 answered on 18 Nov 2009
1 answer
100 views
What I am trying to do is add a new row to a grid and then automatically set it to edit mode. What i'm finding is this fails on the first row that is inserted, but for every other row it works fine. I have tried setting current row/column a few different ways and found the same behaviour. Have set up a basic example of it below.

        private void Form1_Load(object sender, EventArgs e) 
        { 
            radGridView1.MasterGridViewTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; 
            radGridView1.ShowGroupPanel = false
            radGridView1.MasterGridViewTemplate.EnableGrouping = false
            radGridView1.MasterGridViewTemplate.AllowAddNewRow = false
 
            GridViewComboBoxColumn col1 = new GridViewComboBoxColumn("Test1""Test1"); 
            col1.DropDownStyle = RadDropDownStyle.DropDownList; 
            col1.FieldName = "Test1"
            col1.DisplayMember = "Test1"
            col1.DataType = typeof (int); 
            col1.DataSource = new[] {1, 2, 3}; 
            col1.AutoCompleteMode = AutoCompleteMode.SuggestAppend; 
 
            radGridView1.Columns.Add(col1); 
        } 
 
        private void button1_Click(object sender, EventArgs e) 
        { 
            int rowCount = radGridView1.Rows.Count; 
 
            object[] values = {1}; 
            radGridView1.Rows.Add(values); 
            radGridView1.MasterGridViewInfo.CurrentRow = radGridView1.Rows[rowCount]; 
 
            radGridView1.Rows[rowCount].Cells["Test1"].BeginEdit(); 
        } 

What happens is the first row will get inserted without being in edit mode. if you click the button every other row works correctly.

Is there anything that i'm doing wrong in this case?

Version i'm using is: Q2 2009 SP1.

Have attached an image of the result. http://bayimg.com/image/maefbaaco.jpg

Jack
Telerik team
 answered on 18 Nov 2009
1 answer
215 views

During the CellBeginEdit event I need to supply a default value for the cell if there is no data in the cell and only during an Edit event. I initialized the default value during the CellEditorInitialized event and all works, the default value appears.
 

 

 

Private Sub gv_CellEditorInitialized(ByVal sender As ObjectByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles gv.CellEditorInitialized  
    If TypeOf gv.ActiveEditor Is RadTextBoxEditor Then 
        gv.ActiveEditor.Value = IIf(object.Data= 0, "",object.Data)  
    End If 
End Sub

Now when the Enter Key is pressed (accepting the default value) the CellEndEdit event is fired and I have the following code:
If IsNumeric(e.Value.ToString) Then 
  object.data = e.Value  
End If 
The issue is that the Cell Value (e.value) is never equal to the default value, it's empty.

Any help greatly appreciated.



Jack
Telerik team
 answered on 18 Nov 2009
3 answers
151 views
What's the recommended solution for expanding a tree view when bound to an object data source.  The created nodes are collapsed by default and I don't see a way to change the default behavior, nor do I see any events indicating when a node is added
Victor
Telerik team
 answered on 18 Nov 2009
1 answer
102 views
Hello!

I have a really strange behavior with my project. If I put a RadImageButton to the ToolStripItem and I assign an image with red in it, it is not showing it. In design mode everything works fine, but as soon as I start the program (even from VS), I got an empty space for the image. 

I tried with several pictures (mainly with cancel and stop and so on), but as soon as the red appears, my image disappear. Other images works fine. The images are all pngs with transparent background.

I attached two screenshots and you can download a simple project from http://www.wellensteyn.ro/temp/HQ.ZIP
Does anybody experienced something like this? What can be the problem? 

Thanks: Botond
Nikolay
Telerik team
 answered on 18 Nov 2009
3 answers
454 views
Hi,

I have a GridView with a GridViewComboBoxColumn that has a list of strings as the datasource and is bound to a string property in my ViewModel. Is it possible to let the user add new values to the string-list by typing in the GridViewComboBoxColumn editor and not reject those values when they are not already in the list?

At the moment, when I type a string that is not already in the bound list, the string is saved in the editor (when I enter the cell again after leaving it, the value is still there) but not propagated through the ValueChanging event and also not written to the underlying ViewModel.

I'm looking for a way to either
  1. Add the new value directly to the string-list and to the ViewModel's property
  2. Get notified about the change with the new, not-in-list value and be able to put it in the string-list manually

Is there a way to do this?

Thanks in advance.
Jack
Telerik team
 answered on 18 Nov 2009
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
ProgressBar
CheckedDropDownList
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
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?