Telerik Forums
UI for WinForms Forum
2 answers
161 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.3K+ 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
216 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
332 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
708 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
3 answers
242 views
There does not appear to be any API documentation for the control. Online help is going to a non-existing page.
Stefan
Telerik team
 answered on 24 Nov 2011
1 answer
126 views
Hello,

I'm new to Telerik (programming in general) so forgive the brutish design.  As such, I was wondering if I could get some general design/feasibility pointers on this project.  If "design" questions are not the purpose here, by all means let me know.  

I'm trying to build a system that allows users to select options and items that will then generate a report for them (see attached pic if needed).  I'm sure this has been done a thousand times but surprisingly I haven't found much online.

My approach was to build multi-level modular Sql text command that UI control input result groups would snap into, roughly:

public string MasterCmdStr = selectPart +
wherePart +
groupByPart +
orderByPart;

private string Level1CmdStr()
{
string selectPart = GetSelectPart();
string wherePart = GetWherePart();
string groupByPart = GetGroupByPart();
string OrderByPart = GetOrderByPart();

//apply final logic, snytax checking, logic checking
}

private string GetSelectPart()
{
string yAxisCat = BuildCmdYAxis();
        string xAxisCat = BuildCmdYAxis();
       

//compile results with other parts, alter syntax
}

private string BuildCmdYAxis()
{
  string contextCat = radDropDownList3.Text;
  string chartType = radDropDownList4.Text;
xAxisItems = GetRadListControl5();

//compile results, apply logic...etc
}

etc...

I'm quickly finding out that this might get out of control... due to the complexity of sql queries I want to enable (multiple WHEREs mixed with multiple GROUP BYs) and due to the need to customize radchart settings per query to make output presentable (like the requirements to format the X Axis if a user selects a DateTime context).

So, am I way out of my league here?  Is there a better way to approach this?

Thanks for any help.



Ves
Telerik team
 answered on 23 Nov 2011
11 answers
229 views
I have entire button groups, ribbon groups, winForms controls, etc. that have disappeared from the form since I started creating my UI with the RibbonBar.

I looked in the designer and the controls are still there, they are just not being rendered.

Is this a known issue?  Is there anything I can do?


Peter
Telerik team
 answered on 23 Nov 2011
1 answer
279 views
How do I customize TelerikMetroBlue theme?
Stefan
Telerik team
 answered on 23 Nov 2011
1 answer
179 views
I have the following code that gets called on form load and when a button is clicked:

rcSummary.Series.Clear()
rcSummary.RemoveAllSeries()
rcSummary.Clear()
rcSummary.DataSource = PersistenceHelper.GetResponseContentDailySummary(_dbContext, rdtStartDate.Value.Date)

The chart displays with the proper data when the form loads. If the button is clicked on the form, the chart displays "There is no or empty series".

I have verified the correct data is returned by the GetResponseContentDailySummary function.

Any help would be much appreciated,
-jm
Giuseppe
Telerik team
 answered on 22 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?