Telerik Forums
UI for WinForms Forum
4 answers
442 views
I'm implementing grouping in a RadGridView. The grouping is working fine. I was then asked to allow the user to switch between grouping and not grouping, so I added a couple of radio buttons then I call a subroutine (VB.NET) that performs the following logic when the user clicks on either of the radio buttons:

Private Sub Process_GroupByShipTo_CheckedChanged()
    If Not bControlsPopulated Then
        Exit Sub
    End If
    If rbGroupByShipTo.Checked Then
        rgvItems.EnableGrouping = True
        rgvItems.ShowGroupedColumns = True
    Else
        rgvItems.EnableGrouping = False
        rgvItems.ShowGroupedColumns = False
    End If
End Sub

Initially, when the form first loads, the default checked radio button is the Group By None radio button (rbGroupByNone). I click on the Group By Ship To radio button (rbGroupByShipTo) and grouping occurs. I click on the Group By None radio button and grouping goes away. But then, when I click on the Group By Ship To radio button once more, it no longer groups.

I then tried repopulating the gridview with the following code, but that did not work:

Private Sub Process_GroupByShipTo_CheckedChanged()
    If Not bControlsPopulated Then
        Exit Sub
    End If
    If rbGroupByShipTo.Checked Then
        rgvItems.EnableGrouping = True
        rgvItems.ShowGroupedColumns = True
        rgvItems.DataSource = Nothing
        rgvItems.Rows.Clear()
        PopulateDataGrid()
    Else
        rgvItems.EnableGrouping = False
        rgvItems.ShowGroupedColumns = False
    End If
End Sub


Thanks in advance for any suggestions,

Hector
Stefan
Telerik team
 answered on 25 Nov 2011
3 answers
188 views
My page contains a RadMenu with ClickToOpen = true.  After that, hovering over the menu will expand to display the child menu items.  Upon selection of one of the child menu items I open a modal RadWindow via javascript.  I also use javascript to collapse the radmenu (shown below).

The problem is that after the RadWindow is closed (no pastback occurs on the parent page), it is no longer necessary to click on the RadMenu to begin showing the menu items.  All the user needs to do is hover.  I have attempted to move the focus to another control on the page, but the RadMenu does not appear to lose focus.  I also tried using the blur() method in the code that collapses the menu, but that does not appear to work either.  How do I move the focus away from the menu so users must click on the menu to again open it?

Here is the javascript function to collapse (with the call to Blur to try to move the focus away from the RadMenu). 

function CollapseMenu() { 
    //close the menu 
    var menu = $find("<%= mnuActions.ClientID %>"); 
    var topMenuItem = menu.get_items().getItem(0); 
    topMenuItem.close(); 
    topMenuItem.Blur(); 
}


Thanks!

Sean M. Severson
Kate
Telerik team
 answered on 25 Nov 2011
6 answers
129 views
Hi,

Kindly help me with this...

I set the RadCalendar control to...
AllowMultipleView = true
MultiViewColumns = 6
MultiViewRows = 2

Each time I click the Prev/Next button, the view jump to prev/next 12 months. How can I set the buttons to just move 1 month per click. I should maintain the settings above. Thanks.


Kind regards,

Ian
Adam
Top achievements
Rank 1
 answered on 24 Nov 2011
1 answer
188 views
Hello, I am using the RadPageView in a dialog box with about 10 different tabs. I want to set the first tab to be selected by default programatically so I use the code:

RadPageView1.SelectedPage = tabAutomation

in the form load handler, and this works, however, when the page is rendered the selected tab is not visible. This seems to happen if a tab that is down the line was selected at build time. Is there a property that will bring the selected tab into view at runtime?

Thanks

Don Tompkins
Databound Solutions, Inc.
Stefan
Telerik team
 answered on 24 Nov 2011
1 answer
274 views
Hi,

    It is possible to get RadPropertyGrid instance from EditValue function (from UITypeEditor class) ?

Regards
Radek
Ivan Petrov
Telerik team
 answered on 24 Nov 2011
2 answers
124 views
Let me try to explain my problem.

I have a databound gridview... I have 2 different columns, one of the columns is a combobox column which takes it´s data from a database.
Let´s call 1st column "A" and the combobox column "B".
Column A can only accept 2 different values.
Column B takes it´s values from database based on the 2 possible values on column A.

Value 1 (in column A) has 12 different possible values in column B, and value 2 (in column A) has other 12 different values in column B. (one to many relation in database)
Right now I fill the combobox with the 24 different values (12 for value 1 and 12 for value 2, I get this values from database cause when I load the gridview I already know this 2 different values that will be allowed in column A).

What I want to achieve is that once I insert a value (from the 2 possible values) in column A, column B filters it´s values to only the 12 related to the value in column A and not the 24 related to the 2 possible values... so user won´t be able to select a value in column B not related to value in column A. And this has to be done on each row, that means that when the filter is applied it is only applied to the selected row, leaving the other rows with it´s own filter based on value in column A.

Any help will be welcomed

Thanks in advance

Jota
Top achievements
Rank 1
 answered on 24 Nov 2011
4 answers
1.2K+ views
Hi,

I have a problem counting the filtered rows, e.g. I have 50 rows in the grid's DataSource table but after applying a filter, only 10 rows are shown in the grid, so what I want to count is just these 10 row (version 2011.2.11.712).

The problem has come up already in this forum and I tried the following:

1.grid.Items.ItemCount: results in error as the grid does not have the property Items.
2.grid.MasterTemplate.ChildRows.Count: always returns just 1
3. looping through grid.Rows and checking the IsVisible property or each row: is true for all 50 rows
4. comparing the underlying table rows with grid.Rows[i].DataBoundItem as described in another thread here: does not do the trick either.

What am I missing here? Hope you can help me with this, thanks a lot in advance

 

Jens
Top achievements
Rank 2
 answered on 24 Nov 2011
2 answers
174 views
Hi,

I was wondering if an exception could be thrown if you set the ListViewFilterDescriptorCollection's LogicalOperator property before adding filter descriptors to it via the Add method.

In the example below, typing in 'o' into the left text box works correctly, however typing in 'o' to the second one does not work correctly, no filtering occurs. I have to type in 'o f' for it to begin filtering, but then it only filters on the 'o' and not the 'f' too. Something a bit funny is going on.

My experience with .Net is 7 years. My experience with Rad is about 1 month.

OS version and applied service packs

Microsoft Windows Server 2003, Standard Edition, Service Pack 2

  • Regional and language settings, if different from En-US

English (Australia)

  • .NET version (.NET2, .NET3, .NET3.5)

.NET 4.0.30319 SP1Rel, Visual Studio 2010 Version 10.0.40219.1 SP1Rel

  • Exact version of the Telerik product 

Runtime Version v2.0.50727, Version 2011.3.11.1116

Thanks,
Clive

Imports Telerik.WinControls.Data
  
Public Class Form9
    Inherits System.Windows.Forms.Form
  
    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub
  
    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer
  
    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Dim ListViewDetailColumn5 As Telerik.WinControls.UI.ListViewDetailColumn = New Telerik.WinControls.UI.ListViewDetailColumn("Column 0", "Column 0")
        Dim ListViewDetailColumn6 As Telerik.WinControls.UI.ListViewDetailColumn = New Telerik.WinControls.UI.ListViewDetailColumn("Column 1", "Column 1")
        Dim ListViewDetailColumn7 As Telerik.WinControls.UI.ListViewDetailColumn = New Telerik.WinControls.UI.ListViewDetailColumn("Column 2", "Column 2")
        Dim ListViewDetailColumn8 As Telerik.WinControls.UI.ListViewDetailColumn = New Telerik.WinControls.UI.ListViewDetailColumn("Column 3", "Column 3")
        Dim ListViewDataItem5 As Telerik.WinControls.UI.ListViewDataItem = New Telerik.WinControls.UI.ListViewDataItem("ListViewItem 1", New String() {"one", "two", "three", "four"})
        Dim ListViewDataItem6 As Telerik.WinControls.UI.ListViewDataItem = New Telerik.WinControls.UI.ListViewDataItem("ListViewItem 2", New String() {"five", "six", "seven", "eight"})
        Dim ListViewDataItem7 As Telerik.WinControls.UI.ListViewDataItem = New Telerik.WinControls.UI.ListViewDataItem("ListViewItem 3", New String() {"nine", "ten", "eleven", "twelve"})
        Dim ListViewDataItem8 As Telerik.WinControls.UI.ListViewDataItem = New Telerik.WinControls.UI.ListViewDataItem("ListViewItem 4", New String() {"thirteen", "forteen", "fifteen", "sixteen"})
        Me.RadListView1 = New Telerik.WinControls.UI.RadListView()
        Me.RadTextBox1 = New Telerik.WinControls.UI.RadTextBox()
        Me.RadTextBox2 = New Telerik.WinControls.UI.RadTextBox()
        Me.RadLabel1 = New Telerik.WinControls.UI.RadLabel()
        Me.RadLabel2 = New Telerik.WinControls.UI.RadLabel()
        CType(Me.RadListView1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.RadTextBox1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.RadTextBox2, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.RadLabel1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.RadLabel2, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'RadListView1
        '
        ListViewDetailColumn5.HeaderText = "Column 0"
        ListViewDetailColumn6.HeaderText = "Column 1"
        ListViewDetailColumn7.HeaderText = "Column 2"
        ListViewDetailColumn8.HeaderText = "Column 3"
        Me.RadListView1.Columns.AddRange(New Telerik.WinControls.UI.ListViewDetailColumn() {ListViewDetailColumn5, ListViewDetailColumn6, ListViewDetailColumn7, ListViewDetailColumn8})
        Me.RadListView1.GroupItemSize = New System.Drawing.Size(200, 20)
        ListViewDataItem5.Text = "ListViewItem 1"
        ListViewDataItem5.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
        ListViewDataItem6.Text = "ListViewItem 2"
        ListViewDataItem6.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
        ListViewDataItem7.Text = "ListViewItem 3"
        ListViewDataItem7.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
        ListViewDataItem8.Text = "ListViewItem 4"
        ListViewDataItem8.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
        Me.RadListView1.Items.AddRange(New Telerik.WinControls.UI.ListViewDataItem() {ListViewDataItem5, ListViewDataItem6, ListViewDataItem7, ListViewDataItem8})
        Me.RadListView1.ItemSize = New System.Drawing.Size(200, 20)
        Me.RadListView1.ItemSpacing = -1
        Me.RadListView1.Location = New System.Drawing.Point(12, 117)
        Me.RadListView1.Name = "RadListView1"
        Me.RadListView1.Size = New System.Drawing.Size(794, 149)
        Me.RadListView1.TabIndex = 0
        Me.RadListView1.Text = "RadListView1"
        Me.RadListView1.ViewType = Telerik.WinControls.UI.ListViewType.DetailsView
        '
        'RadTextBox1
        '
        Me.RadTextBox1.Location = New System.Drawing.Point(119, 294)
        Me.RadTextBox1.Name = "RadTextBox1"
        Me.RadTextBox1.Size = New System.Drawing.Size(100, 20)
        Me.RadTextBox1.TabIndex = 1
        Me.RadTextBox1.TabStop = False
        '
        'RadTextBox2
        '
        Me.RadTextBox2.Location = New System.Drawing.Point(238, 294)
        Me.RadTextBox2.Name = "RadTextBox2"
        Me.RadTextBox2.Size = New System.Drawing.Size(100, 20)
        Me.RadTextBox2.TabIndex = 1
        Me.RadTextBox2.TabStop = False
        '
        'RadLabel1
        '
        Me.RadLabel1.Location = New System.Drawing.Point(119, 273)
        Me.RadLabel1.Name = "RadLabel1"
        Me.RadLabel1.Size = New System.Drawing.Size(36, 16)
        Me.RadLabel1.TabIndex = 2
        Me.RadLabel1.Text = "Rad 1"
        '
        'RadLabel2
        '
        Me.RadLabel2.Location = New System.Drawing.Point(241, 273)
        Me.RadLabel2.Name = "RadLabel2"
        Me.RadLabel2.Size = New System.Drawing.Size(36, 16)
        Me.RadLabel2.TabIndex = 2
        Me.RadLabel2.Text = "Rad 2"
        '
        'Form9
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(818, 483)
        Me.Controls.Add(Me.RadLabel2)
        Me.Controls.Add(Me.RadLabel1)
        Me.Controls.Add(Me.RadTextBox2)
        Me.Controls.Add(Me.RadTextBox1)
        Me.Controls.Add(Me.RadListView1)
        Me.Name = "Form9"
        Me.Text = "Form9"
        CType(Me.RadListView1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.RadTextBox1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.RadTextBox2, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.RadLabel1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.RadLabel2, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
        Me.PerformLayout()
  
    End Sub
    Friend WithEvents RadListView1 As Telerik.WinControls.UI.RadListView
    Friend WithEvents RadTextBox1 As Telerik.WinControls.UI.RadTextBox
    Friend WithEvents RadTextBox2 As Telerik.WinControls.UI.RadTextBox
    Friend WithEvents RadLabel1 As Telerik.WinControls.UI.RadLabel
    Friend WithEvents RadLabel2 As Telerik.WinControls.UI.RadLabel
  
    Private Sub RadTextBox1_TextChanged(sender As System.Object, e As System.EventArgs) Handles RadTextBox1.TextChanged
        RadListView1.Items.BeginUpdate()
        RadListView1.FilterDescriptors.Clear()
        If String.IsNullOrWhiteSpace(RadTextBox1.Text) Then
            RadListView1.EnableFiltering = False
        Else
            For Each txt In RadTextBox1.Text.Split({" "c}, StringSplitOptions.RemoveEmptyEntries)
                Dim comp As New CompositeFilterDescriptor()
                RadListView1.FilterDescriptors.Add(comp)
                For Each a As Telerik.WinControls.UI.ListViewDetailColumn In RadListView1.Columns
                    Dim typeFilter As New FilterDescriptor(a.Name, FilterOperator.Contains, txt)
                    comp.FilterDescriptors.Add(typeFilter)
                Next
                comp.LogicalOperator = FilterLogicalOperator.Or
            Next
            RadListView1.FilterDescriptors.LogicalOperator = FilterLogicalOperator.And
            RadListView1.EnableFiltering = True
        End If
        RadListView1.Items.EndUpdate()
    End Sub
  
    Private Sub RadTextBox2_TextChanged(sender As System.Object, e As System.EventArgs) Handles RadTextBox2.TextChanged
        RadListView1.Items.BeginUpdate()
        RadListView1.FilterDescriptors.Clear()
        If String.IsNullOrWhiteSpace(RadTextBox2.Text) Then
            RadListView1.EnableFiltering = False
        Else
            RadListView1.FilterDescriptors.LogicalOperator = FilterLogicalOperator.And
            For Each txt In RadTextBox2.Text.Split({" "c}, StringSplitOptions.RemoveEmptyEntries)
                Dim comp As New CompositeFilterDescriptor()
                RadListView1.FilterDescriptors.Add(comp)
                comp.LogicalOperator = FilterLogicalOperator.Or
                For Each a As Telerik.WinControls.UI.ListViewDetailColumn In RadListView1.Columns
                    Dim typeFilter As New FilterDescriptor(a.Name, FilterOperator.Contains, txt)
                    comp.FilterDescriptors.Add(typeFilter)
                Next
            Next
            RadListView1.EnableFiltering = True
        End If
        RadListView1.Items.EndUpdate()
    End Sub
  
    Public Sub New()
  
        ' This call is required by the designer.
        InitializeComponent()
  
        ' Add any initialization after the InitializeComponent() call.
  
    End Sub
End Class
Clive
Top achievements
Rank 1
 answered on 24 Nov 2011
1 answer
297 views
Hi,

We are currently migrating one of our custom forms over to utilizing the RadDock.

The current functionality provides the ability for 3 grids stacked on top of one another to trigger the parent panels to show / hide i.e. show 3 grids then swap to showing one grid in the full space provided.

Is there a mechanism / utility methods within the dock panels / dock panel manager / splitter controls to achieve these capabilities?

This is a representation of the functionality:

Grid 1
Grid 2
Grid 3

Click Full View

Grid 1
Grid 1
Grid 1

Click View All

Grid 1
Grid 2
Grid 3

We have access to the grids and have allowed them to publish their current state e.g. Collapsed / Expanded on click of the button, this occurs via a .Net event and delegate method.

Thanks
Pete
Alexander
Telerik team
 answered on 24 Nov 2011
23 answers
659 views
2008Q1 SP1

How can I configure the treeview so that - if a node's text is
too large for the treeview - a tooltip appears on that node (only) instead of
a horizontal scroll bar.

Just the way for example Outlook 2007 does it.
The UI is less cluttered in case there are only a few long names among
a lot of shorter names.

If not possible by default is there a way to implement it myself?
(I don't want tooltips on all nodes, just on those that cannot be fully displayed
without scroll bars).

Erwin
Stefan
Telerik team
 answered on 24 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)
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?