Telerik Forums
UI for WinForms Forum
1 answer
163 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
190 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
322 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
180 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
187 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
176 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.5K+ 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
3 answers
215 views
Im having issues with the page view. I want to us the outlook view and next to the frist page view i have another one wich i wanted to use the tabs. What I m trying to do is when i click on one of the buttons in the outlook page view i want it to open one of the tabs in the other page view. Any Help would be Great.
Ivan Petrov
Telerik team
 answered on 01 Dec 2011
1 answer
142 views
Hi,
is it possible to view a GridView in the popup items of a Raddropdownlist?
could you please send me an example?
Cristiano
Top achievements
Rank 1
 answered on 01 Dec 2011
1 answer
280 views
We are using telerik control in our Excel-Addin Application.

Functional working: we launch a form on clicking the button ("open form") at add-in ribbon.  User will drag the tree nodes to spreadsheet cells.

Issues we face
1. We don't want hint of node when we perform the drag and drop on spreadsheet cell. (Version used 2010.1.10.504)
2. We tried to use the new version DLL from Telerik but some serious issue arises (Version used 2011.2.11.831)
        a. item drag event is getting called multiple times. 
        b. Cursor remains the NO cursor after dragging the node to area of spreadsheet

Code written on item drag event is as follows

Private Sub RadTreeView1_ItemDrag(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.RadTreeViewEventArgs) Handles RadTreeView1.ItemDrag
       If Not IsNothing(RadTreeView1.SelectedNode) Then
           Dim strSelected As String = RadTreeView1.SelectedNode.Text
           RadTreeView1.DoDragDrop(" ", Windows.Forms.DragDropEffects.Copy)
           Globals.ThisAddIn.Application.ActiveCell.Value = "LB (" & "" & ControlChars.Quote.ToString() & strSelected & ControlChars.Quote.ToString() & "" & ")"
       End If
End Sub

Please do provide the solution.
Julian Benkov
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)
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?