Telerik Forums
UI for WinForms Forum
3 answers
246 views
Hello,
I would like to bind the PropertyGrid to a datatable which has only 1 Column.
I want to use the PropertyGrid as a detail form for editing a Datatable with 1 column (like Parameters etc.).

Is this possible or do I have to convert to an object by code.


thanks for an answer.

Frank
Ivan Petrov
Telerik team
 answered on 05 Dec 2011
1 answer
120 views
Hi,
 Can we have folder style hierarchy for many to many relationships?
If not how can I easily align the child view columns to its parent. The gird that I am using have the same column headers for all views. I am using ViewDefinitions and the column headers are quite complex and can have around 6 rows (just headers). Also while expanding the hierarchies (can go to n levels), I get scroll bar hell.

Thanks
Deepak
Julian Benkov
Telerik team
 answered on 05 Dec 2011
3 answers
98 views
Telerik Forums,

The company I work for has a scenario that I'm sure other people have faced.  We have several tables of records that are mainly used as code values, status codes, etc.  Each of these tables has an Active flag so that as old values are no longer needed we can flag them so they aren't displayed to the user.  However, when looking at an older record it is very possible that you would need to populate a value that is now inactive.

I believe/hope that either the telerik ComboBox or MultiColumnComboBox could assist us with this, I'm envisioning that the ComboBox would load both the active and inactive values and that with a filter applied only the active values would be displayed in the drop down for the user to select on new data entry.

Does this sound like something that can be achieved with a telerik control?

Thanks in advance,

Jeremie
Jack
Telerik team
 answered on 05 Dec 2011
1 answer
137 views
Hi,

Does the Telerik WinForms RichTextBox support Merge Fields?

I found an example for MailMerge in the Silverlight version of RichTextBox which allows the use of certain Merge Fields.  However the functionality does not appear to be in the WinForms version?

If not, is there any plans to add it?

Thanks,

Mark.

Jack
Telerik team
 answered on 05 Dec 2011
3 answers
156 views
Hi,

I want to initialize ToggleState or Checked property of the RadCheckBoxElement, which I placed in the RibbonBar control.
Is there a chance to do this without raising the ToggleStateChanged event?
Peter
Telerik team
 answered on 02 Dec 2011
1 answer
273 views
Hi:
    I use userdeletingrow event to remove row .
   The BindingSource1 is the datasource of radgridview1.

   The radgridview's count is not zero but there is no row in screen.
   I want to use follow code to do somthing.
   if(radgridview1.Rows.Count==0)
   {
       //I want to do something here.
   }
   So, the if is not excute forever.

   What should I do ?

 Greetings
Look forward to you
Ajing
Julian Benkov
Telerik team
 answered on 02 Dec 2011
1 answer
144 views
Hi,

I'm having difficulty working out how to set the colour of the items in a non-databound list, when the user types in text to bring up the autocomplete suggest mode.

I've set the colour of the ForeColor property in the items according to a business object that is set to the Value property in each item.

When the user hits the drop down arrow, the list populates with red and black items. However when the user types in 'L' and the list displays, I'm trying to get it to display the same black/red colours but it seems the items in the AutoCompleteSuggest.DropDownList.Items do not have their Value/Tag properties set from the original items.

Can you suggest a work around for this?

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.UI
Public Class Form10
    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 RadListDataItem1 As Telerik.WinControls.UI.RadListDataItem = New Telerik.WinControls.UI.RadListDataItem()
        Dim RadListDataItem2 As Telerik.WinControls.UI.RadListDataItem = New Telerik.WinControls.UI.RadListDataItem()
        Dim RadListDataItem3 As Telerik.WinControls.UI.RadListDataItem = New Telerik.WinControls.UI.RadListDataItem()
        Dim RadListDataItem4 As Telerik.WinControls.UI.RadListDataItem = New Telerik.WinControls.UI.RadListDataItem()
        Dim RadListDataItem5 As Telerik.WinControls.UI.RadListDataItem = New Telerik.WinControls.UI.RadListDataItem()
        Me.RadDropDownList1 = New Telerik.WinControls.UI.RadDropDownList()
        Me.CheckBox1 = New System.Windows.Forms.CheckBox()
        CType(Me.RadDropDownList1, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'RadDropDownList1
        '
        Me.RadDropDownList1.DropDownAnimationEnabled = True
        RadListDataItem1.Text = "ListItem 1"
        RadListDataItem1.Value = 1
        RadListDataItem1.Tag = 1
        RadListDataItem1.TextWrap = True
        RadListDataItem2.Text = "ListItem 2"
        RadListDataItem2.Value = 2
        RadListDataItem2.Tag = 2
        RadListDataItem2.TextWrap = True
        RadListDataItem3.Text = "ListItem 3"
        RadListDataItem3.Value = 3
        RadListDataItem3.Tag = 3
        RadListDataItem3.TextWrap = True
        RadListDataItem4.Text = "ListItem 4"
        RadListDataItem4.Value = 4
        RadListDataItem4.Tag = 4
        RadListDataItem4.TextWrap = True
        RadListDataItem5.Text = "ListItem 5"
        RadListDataItem5.Value = 5
        RadListDataItem5.Tag = 5
        RadListDataItem5.TextWrap = True
        Me.RadDropDownList1.Items.Add(RadListDataItem1)
        Me.RadDropDownList1.Items.Add(RadListDataItem2)
        Me.RadDropDownList1.Items.Add(RadListDataItem3)
        Me.RadDropDownList1.Items.Add(RadListDataItem4)
        Me.RadDropDownList1.Items.Add(RadListDataItem5)
        Me.RadDropDownList1.Location = New System.Drawing.Point(65, 40)
        Me.RadDropDownList1.Name = "RadDropDownList1"
        Me.RadDropDownList1.ShowImageInEditorArea = True
        Me.RadDropDownList1.Size = New System.Drawing.Size(106, 20)
        Me.RadDropDownList1.TabIndex = 0
        '
        'CheckBox1
        '
        Me.CheckBox1.AutoSize = True
        Me.CheckBox1.Location = New System.Drawing.Point(65, 83)
        Me.CheckBox1.Name = "CheckBox1"
        Me.CheckBox1.Size = New System.Drawing.Size(81, 17)
        Me.CheckBox1.TabIndex = 1
        Me.CheckBox1.Text = "CheckBox1"
        Me.CheckBox1.UseVisualStyleBackColor = True
        '
        'Form10
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(292, 273)
        Me.Controls.Add(Me.CheckBox1)
        Me.Controls.Add(Me.RadDropDownList1)
        Me.Name = "Form10"
        Me.Text = "Form10"
        CType(Me.RadDropDownList1, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
        Me.PerformLayout()
  
    End Sub
    Friend WithEvents RadDropDownList1 As Telerik.WinControls.UI.RadDropDownList
    Private Sub Form10_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        For Each item In RadDropDownList1.Items
            item.ForeColor = If(CInt(item.Value) Mod 2 = 0, Color.Red, Color.Black)
        Next
        RadDropDownList1.AutoCompleteMode = AutoCompleteMode.SuggestAppend
        AddHandler RadDropDownList1.DropDownListElement.AutoCompleteSuggest.DropDownList.PopupOpening,
            Sub()
                If Not CheckBox1.Checked Then Return
                For Each item In RadDropDownList1.DropDownListElement.AutoCompleteSuggest.DropDownList.Items
                    ' can't think of a way to get the value from the original list
                    If item.Value IsNot Nothing Then
                        item.ForeColor = If(CInt(item.Value) Mod 2 = 0, Color.Blue, Color.Green)
                    ElseIf item.Tag IsNot Nothing Then
                        item.ForeColor = If(CInt(item.Tag) Mod 2 = 0, Color.Blue, Color.Green)
                    Else
                        item.ForeColor = Color.Orange
                    End If
  
                Next
            End Sub
        AddHandler RadDropDownList1.DropDownListElement.AutoCompleteSuggest.DropDownList.ListElement.VisualItemFormatting,
            Sub(sender1 As Object, ee As VisualItemFormattingEventArgs)
                If Not CheckBox1.Checked Then
                    ' can't find any way to get the RadDataListItem to find out the business rule to change the colour
                    ee.VisualItem.ForeColor = Color.Brown
                End If
            End Sub
    End Sub
  
End Class
Peter
Telerik team
 answered on 02 Dec 2011
1 answer
156 views
Hi:
  Is there a way of counting the visible rows after applying a filter or multiple filter and a group or many group?
  eg: There is a group template by Age column and I apply a filter in city column. How can I count the filtered rows?
   
   Our code as follows:
  radGridView_Filtered(.......)
{
    label1.Text= radGridView.MatserTemplate.ChildRows.Where(o=>o.City='NanJing').Count;
}
   
If there is only filter ,the label1's text display filtered rows .But if there is a group ,the label1's text display zero.
I want the label1's text display filtered rows .

Greeting
Look forward to you
AJing
Julian Benkov
Telerik team
 answered on 02 Dec 2011
1 answer
149 views
Hi :    
     The radgridview enable group and filter. The user want to skip the next row from current row and the next row into edit mode by Enter.  
       1. Our code as follows to achieve the enter key, :
        private voi dg_KeyUp(.....)
        {                  ......
              if((dgCut.CurrentRow.Index+1)<dgCut.Rows.Count)
              {
                     var row =dgCut.Rows[dgCut.CurrentRow.Index+1];
                     dgCut.CurrentRow=row;
                     if(dgCut.CurrentCell!=null)
                     { dgCut.CurrentCell.BeignEdit();}
               }
         }
      but if there is a filter by column 'Name', the enter key event behavior is strange.The current row can not skip to next row.

      To solve the problem with filter,we update the code as follows:
        private voi dg_KeyUp(.....)
        {                  ......
              if((dgCut.MasterView.CurrentRow.Index+1)<dgCut.MasterView.Rows.Count)
              {
                     var row =dgCut.MasterView.Rows[dgCut.MasterView.CurrentRow.Index+1];
                     dgCut.MasterView.CurrentRow=row;
                     if(dgCut.MasterView.ViewTemplate.CurrentColumn!=null)
                     { dgCut.CurrentCell.BeignEdit();}
               }
         }

        
      the result as we do is :it is Ok by Enter key if there is only exsit filter.It is not Ok if there is group and filter.
     How to achieve the enter key behavior  if there is  a group or multiple group and a filter or multiple filter?

Greetings
Look forward to you
Ajing     
   
Julian Benkov
Telerik team
 answered on 02 Dec 2011
1 answer
1.4K+ views
When using the standard listbox control i use the IndexFromPoint Method to get the item at the point of the mouse click...
like...

private void listBox1_MouseDown(object sender, MouseEventArgs e)
{
    int index = listBox1.IndexFromPoint(e.Location);
    listBox1.SelectedIndex = index;
}
is a there a way to do such with a RadListControl?
Ivan Petrov
Telerik team
 answered on 01 Dec 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
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
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?