Telerik Forums
UI for WinForms Forum
7 answers
908 views
I trying implement a Shift-F10 key to activate the ContextMenu.  I have the Key trapped inside the KeyDown Event, but I don't know how to activate the ContextMenu.  RadGridView.ContextMenuStrip is Nothing.

2009Q2 (2009.2.9.729), VS 2005 (v8.0.50727.762 SP.050727-7600), .Net2 (2.0.50727), XP SP3, Core2Duo 2.99GHZ with 3GB.



Martin Vasilev
Telerik team
 answered on 20 Nov 2009
6 answers
257 views
We're trying to automate testing of the WinControls using a couple of different tools (QTP and Project White) .  These tools use the Microsoft UI Automation framework.  We are using UI Spy to find Telerik controls in our WinForms application and they don't show up. 

We have an immediate need for UI automation.  What are your plans for providing support for Microsoft's UI automation framework?
Georgi
Telerik team
 answered on 19 Nov 2009
22 answers
1.2K+ views
I'm trying to implement keyboard shortcuts for expanding and collapsing hierarchical templates via the Right and Left Arrow Keys like you can do in the Folders Pane of Windows Explorer or Outlook.  I started by inheriting the BaseGridBehavior and overriding the ProcessKey Function (like you guys had suggested for implementing Ctrl-Home/-End Keys for Top/Bottom of Grid).  The Right key works fine for Expanding a Row.  The Left key works fine for Collapsing a Row if its currently Expanded.  However, if the Current Row is not Expanded, the Left key doesn't seem to do anything.  If I set the CurrentRow.Parent.IsExpanded = False, it'll collapse the Current Template, but then it doesn't set the Current / Selected Row in the Parent Template (no Row is highlighted until I move up or down or click on a Row in the Parent Template) even if I set CurrentRow =  ParentRow, SelectedRows(0) = CurrentRow and SelectedRows(0).IsCurrent = True and call CurrentRow and SelectedRows(0)'s  InvalidateRow() and EnsureVisible() methods.  However, I'm not sure I want it to immediately collapse the Current Row's Template.  In Windows Explorer and Outlook, if the CurrentRow is not Expanded when you press Left Arrow, it simply moves the Current Row up to it's Group / Template's Parent Row.  Then you collapse that Parent Row normally when you press the Left Arrow again since it would be an Expanded Current Row at that point.

Else ' -- Not Keys.Control, .Shift or .Alt  
 
    Select Case keys.KeyCode 
 
        Case Windows.Forms.Keys.Left 
 
            If Not .MasterGridViewTemplate.AllowEditRow Then 
                ' -- If Only One Row Selected 
                If .SelectedRows.Count = 1 Then 
                    ' -- If Selected Row is Expanded 
                    If .SelectedRows(0).IsExpanded Then 
                        .SelectedRows(0).IsExpanded = False 
                        Return True 
                    Else 
                        Dim oParentRow As GridViewDataRowInfo = .CurrentRow.ViewInfo.ParentRow 
                        If oParentRow IsNot Nothing Then 
                            .CurrentRow = oParentRow 
                            'oParentRow.IsExpanded = False 
                            .SelectedRows(0) = .CurrentRow 
                            .SelectedRows(0).IsCurrent = True 
                            .SelectedRows(0).InvalidateRow() 
                            .CurrentRow.InvalidateRow() 
                            .CurrentRow.EnsureVisible() 
                            .SelectedRows(0).EnsureVisible() 
                        End If 
                        Return True 
                    End If ' -- Else Not (Selected Row is Expanded) 
                End If ' -- Only One Row Selected 
 
                ' -- Don't allow Column selection on Master Template 
                Return True 
            End If ' -- Not AllowEditRow 
 
            ' -- End Case Windows.Forms.Keys.Left 
 
        Case Windows.Forms.Keys.Right 
 
                If Not .MasterGridViewTemplate.AllowEditRow Then 
                    If .SelectedRows.Count = 1 Then 
                        .SelectedRows(0).IsExpanded = True 
                    End If 
                    Return True 
                End If ' -- Not AllowEditRow 
 
                ' -- End Case Windows.Forms.Keys.Left 
 
    End Select ' -- keys.KeyCode 
 
End If ' -- Else Not Keys.Control, .Shift or .Alt  
 

Jack
Telerik team
 answered on 19 Nov 2009
6 answers
115 views
I just installed Telerik Q3 2009 WinForms BETA (2009.2.9.1016) over Q2 2009 (2009.2.9.729) and the Up and Down keys stopped working in at least the following scenario:

  1. Click on any Row in a ChildGridViewTemplate of the MasterGiewTemplate.
  2. Switch to a Sibling (not Cousin) of that ChildGridViewTemplate,
  3. If the CurrentRow jumps up to the Parent Row of the ChildGridViewTemplate, press the Down Key to move the CurrentRow into Sibling ChildGridViewTemplate, else proceed to step 4.
  4. Pressing Up and Down Key after the 1st 0 to 1 times no longer move the CurrentRow (unless I click on another Row).

The only RadGridView change mentioned was removing separate Vertical Scroll Bars for Grids with ChildGridViewTemplates.

Telerik 2009Q3 Beta (2009.2.9.1016), VS 2005 (v8.0.50727.762 SP.050727-7600), XP SP3 on Core2Duo 2.99GHZ with 3GB.
Jack
Telerik team
 answered on 19 Nov 2009
1 answer
119 views
Hello

I'm populating a radcombobox control programatically with the code shown below. I know combo is filled with all the items it must, (i can test this using items.count or selecteditem properties), but the fact is that when I click the dropdown arrow, the combo doesn't dropdown, just stays as a single textbox showing only the current item.

This is the code sample:
 

 

 

 

Public Sub CargarMarcas(ByRef cmbMarcas As Telerik.WinControls.UI.RadComboBox)  
            Using ta As New ArqBD.dsERPConfigTableAdapters.MARCASTableAdapter  
                Using dt As New ArqBD.dsERPConfig.MARCASDataTable  
                    ta.Fill(dt)  
                    cmbMarcas.DisplayMember = "Nombre" 
                    cmbMarcas.ValueMember = "Identificador" 
                    cmbMarcas.DataSource = dt  
                End Using  
            End Using  
        End Sub 
 
   


Note: I've tried the same code in form's load event and in a separate public module (as the sample), and in both cases it doesn't work. Is there something I'm missing? Thank you in advance

 

 

 

 

 

Jorge Pascual
Top achievements
Rank 1
 answered on 19 Nov 2009
8 answers
1.0K+ views
I have a situation that I need to change the nth row's background color.  I am using the RowFormatting event as recommended.  However, I'm struggling to find the row index number. 

void tblSearchSSN_RowFormatting(object sender, RowFormattingEventArgs e)
        {
            if (e.....ROW_NUMBER = 5)
               {
                       ....do stuff....
               }
         }



This is probably a really easy one, but any help would be great! 
Thanks Ryan
Ryan
Top achievements
Rank 1
 answered on 19 Nov 2009
1 answer
304 views
I see this thread for hooking up to the DropDownOpened event and changing the size of the drop down window.

http://www.telerik.com/community/forums/winforms/combobox/dropdownwidth-and-tooltip.aspx

This is working for me, but one side effect of this change is the drop down first shows as the 'default' size then adjusts to the size it was changed to in the Event handler.

Is there anyway to avoid that flash using this technique or do I need to roll through my strings and set the DropDownWidth of the RadComboBox when I assign the DataSource to avoid the flash?

Thanks,

-Gary
Deyan
Telerik team
 answered on 19 Nov 2009
2 answers
120 views
Hi,
Please look at the picture -> formatting for cell is working, but for whole row not.

Regards
Zbyslaw Kanik
Top achievements
Rank 1
 answered on 19 Nov 2009
2 answers
126 views
Can I bind RadPanelBar use DataSource like DataSet or others in WinForms?
The RadPanelBar in Asp.Net can bind like that.  And I can't find any helps.

Does it have any way? Thank you.

Best regards

Ayumi
ayumi hinako
Top achievements
Rank 1
 answered on 19 Nov 2009
3 answers
372 views
Hello,

I have a winform GridView that I'm having a hard time changing the font size. Here is my code.

        private void radGridView1_ViewCellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
        {
            Font font = new Font("Arial", 20f);
            if (e.CellElement is Telerik.WinControls.UI.GridFilterCellElement)
            {
                ((Telerik.WinControls.UI.GridViewFilteringRowInfo)e.CellElement.RowInfo).Height = 40;               
                e.CellElement.DrawFill = true;
                e.CellElement.NumberOfColors = 1;
                e.CellElement.BackColor = Color.Beige;
                e.CellElement.Font = font;
            }

I have also attached a screen-shot of my issue. Basically this changes the font size of the filter row, when the user is not in a cell typing something. But when I try to filter a column and set focus to that specific filter cell, i get a textbox in front of the "big" text with the normal 8.25 point font. What am I doing wrong?

Thanks,
Lu



Lu Pazmino
Top achievements
Rank 1
 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)
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
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
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?