Telerik Forums
UI for WinForms Forum
1 answer
97 views
Hello,

I have just inherited a project using Telerik controls from a colleague who is no longer here.  I opened the solution and after 25 minutes Telerik timed out and shut down.  To resolve this I logged on to Telerik, downloaded the latest version and installed it.  Now when I open the solution I get messages of the type:

Could not load file or assembly 'Telerik.WinControls.GridView, Version=....

I understand there is an Upgrade Wizard to resolve this, but I cannot find it, either in the Telerik menu item in VS2010 or in the Start menu.

Any ideas?
Luke
Top achievements
Rank 1
 answered on 28 May 2012
3 answers
206 views
Please refer the picture from attachment.

Question 1 : How to auto display dot dot dot value when mouse over?
Question 2 : How to auto display full header text when user manually adjust the header size to smaller?

Is possible can be done in telerik?
Boryana
Telerik team
 answered on 28 May 2012
3 answers
869 views
Hi,
I am trying to figure out how to make a radTextbox (with multiline=true) to allow a user to hit the enter key and start a new line.
john
Nikolay
Telerik team
 answered on 28 May 2012
1 answer
370 views
I'm trying to prevent cells from being focused.  I saw this piece of code on another forum post:

if (gridCellElement != null)
{
 if (gridCellElement.IsCurrent)
 {
  gridCellElement.IsCurrent = false;
  gridCellElement.IsCurrentColumn = false;
 }
 else
 {
  gridCellElement.ResetValue(LightVisualElement.DrawBorderProperty, ValueResetFlags.Local);
  gridCellElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local);
 }
}

This works until I start editing a cell.  I saw something about creating a custom theme, but I do not know how to do that.  I am really hoping that there is a property I missed that says "don't draw cell focus", but I can't find it.
Boryana
Telerik team
 answered on 28 May 2012
5 answers
256 views
Hi,

I was wondering if the solution I created below is the best way to do what I want.

I have a list that when the user types in, i'd like the suggestions to pop up, to suggest the items that begin with the text first, but then also include all other items that have that text within it below that.

i.e.
if the list is

aper

aaper

ape

per

pants per

aaa per


and the user types 'p' then I want the list to show

pants per

per

aaa per

aaper

ape

aper


when the user types 'pe' then i want the list to show

per

aaa per

aaper

ape

aper

pants per



when the user types 'per' then i want the list to show

per

aaa per

aaper

aper

pants per


My ApplyFilterToDropDown is an almost copy of the Telerik one, but injecting my comparer instead. I had to do this because if I just set the ItemsSortComparer to mine, then called the base.ApplyFilterToDropDown it always got wiped out, so I resorted to this.

Imports Telerik.WinControls.UI
  
Public Class Form7
    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()
        Dim RadListDataItem6 As Telerik.WinControls.UI.RadListDataItem = New Telerik.WinControls.UI.RadListDataItem()
        Me.RadDropDownList1 = New Telerik.WinControls.UI.RadDropDownList()
        CType(Me.RadDropDownList1, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'RadDropDownList1
        '
        Me.RadDropDownList1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
        Me.RadDropDownList1.DropDownAnimationEnabled = True
        RadListDataItem1.Text = "aper"
        RadListDataItem1.TextWrap = True
        RadListDataItem2.Text = "aaper"
        RadListDataItem2.TextWrap = True
        RadListDataItem3.Text = "ape"
        RadListDataItem3.TextWrap = True
        RadListDataItem4.Text = "per"
        RadListDataItem4.TextWrap = True
        RadListDataItem5.Text = "pants per"
        RadListDataItem5.TextWrap = True
        RadListDataItem6.Text = "aaa per"
        RadListDataItem6.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.Items.Add(RadListDataItem6)
        Me.RadDropDownList1.Location = New System.Drawing.Point(93, 126)
        Me.RadDropDownList1.Name = "RadDropDownList1"
        Me.RadDropDownList1.ShowImageInEditorArea = True
        Me.RadDropDownList1.Size = New System.Drawing.Size(106, 20)
        Me.RadDropDownList1.TabIndex = 1
        Me.RadDropDownList1.ThemeName = "ControlDefault"
        '
        'Form7
        '
        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.RadDropDownList1)
        Me.Name = "Form7"
        Me.Text = "Form7"
        CType(Me.RadDropDownList1, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
        Me.PerformLayout()
  
    End Sub
    Friend WithEvents RadDropDownList1 As Telerik.WinControls.UI.RadDropDownList
  
  
    Public Class CustomAutoCompleteSuggestHelper
        Inherits AutoCompleteSuggestHelper
        Public Sub New(element As RadDropDownListElement)
            MyBase.New(element)
        End Sub
  
        Protected Overrides Function DefaultFilter(item As RadListDataItem) As Boolean
            Return item.Text.ToLower().Contains(Me.Filter.ToLower())
        End Function
  
        Public Overrides Sub AutoComplete(e As KeyPressEventArgs)
            MyBase.AutoComplete(e)
            If Me.DropDownList.Items.Count > 0 Then
                'Me.DropDownList.SelectedIndex = Me.DropDownList.FindString(Me.Filter)
            End If
        End Sub
  
        Private mFilter As String = String.Empty
        Protected Overrides ReadOnly Property Filter As String
            Get
                Return mFilter
            End Get
        End Property
  
        Public Overrides Sub ApplyFilterToDropDown(filter As String)
            Static filterFirstComparer As ListItemFilterAscendingComparer
            mFilter = filter
            If String.IsNullOrEmpty(filter) Then
                MyBase.ApplyFilterToDropDown(filter)
                Return
            End If
            With Me.DropDownList.ListElement
                .SelectionMode = SelectionMode.None
                .BeginUpdate()
                .Filter = Nothing
                .Filter = AddressOf DefaultFilter
                .SortStyle = Telerik.WinControls.Enumerations.SortStyle.Ascending
            End With
            ' will move all items that begin with the filter, to the top of the list
            If filterFirstComparer Is Nothing Then
                filterFirstComparer = New ListItemFilterAscendingComparer With {.filter = filter}
            Else
                filterFirstComparer.filter = filter
            End If
            Me.DropDownList.ListElement.ItemsSortComparer = filterFirstComparer
            Me.DropDownList.ListElement.EndUpdate()
        End Sub
  
        ''' <summary>
        ''' This class is used to compare data items when sorting in ascending order.
        ''' </summary>
        Private Class ListItemFilterAscendingComparer
            Implements System.Collections.Generic.IComparer(Of RadListDataItem)
  
            Public Property filter As String
  
            Public Overridable Function Compare(x As RadListDataItem, y As RadListDataItem) As Integer Implements System.Collections.Generic.IComparer(Of Telerik.WinControls.UI.RadListDataItem).Compare
                Dim ignoreCase = False
                If x.Owner IsNot Nothing Then
                    ignoreCase = Not x.Owner.CaseSensitiveSort
                End If
                Dim xStart = x.Text.StartsWith(filter, System.StringComparison.InvariantCultureIgnoreCase)
                Dim yStart = y.Text.StartsWith(filter, System.StringComparison.InvariantCultureIgnoreCase)
                If xStart AndAlso Not yStart Then
                    Return -1
                ElseIf yStart AndAlso Not xStart Then
                    Return 1
                End If
                Return String.Compare(x.Text, y.Text, ignoreCase)
            End Function
  
        End Class
    End Class
  
    Private Sub Form7_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        RadDropDownList1.AutoCompleteMode = Windows.Forms.AutoCompleteMode.SuggestAppend
        RadDropDownList1.DropDownListElement.AutoCompleteSuggest = New CustomAutoCompleteSuggestHelper(RadDropDownList1.DropDownListElement)
    End Sub
End Class


Peter
Telerik team
 answered on 28 May 2012
1 answer
215 views
Telerik controls v2010.1.10.504

The default behavior in a textbox column in a gridview is to have the text auto-selected when the cell is clicked. We have a requirement to override that behavior because typing can overwrite the entire contents, which our users don't want.

Unfortunately, if I do it via the CellFormatting event, then a race condition occurs if I manually try to select all the text and it becomes difficult to "Select All" to copy the cell contents. I have the CellClick clearing the text fine, it's actually when the embedded control is clicked in the cell which I'm unable to override.

I could only find the "EditorRequired" event as being fired when the GridViewTextBoxColumn is clicked (not the cell, but the embedded control in the cell), but at that time the ActiveEditor is not set, so I'm unable to access the underlying control and "Select(0,0)".

Please tell me how to override the default behavior.

Thank you.

Here is a sample code slice from the CellClick handler so you can see what I'm doing:
if ("GridViewTextBoxColumn" == ((Telerik.WinControls.UI.GridDataCellElement)(sender)).GridControl.CurrentColumn.GetType().Name)
{
    RadTextBoxEditor rtbe = ((Telerik.WinControls.UI.GridDataCellElement)(sender)).GridControl.ActiveEditor as RadTextBoxEditor;
    if (null != rtbe)
    {
        RadTextBoxEditorElement tbElement = (RadTextBoxEditorElement)rtbe.EditorElement;
        tbElement.Select(0, 0);
    }
}
Svett
Telerik team
 answered on 28 May 2012
4 answers
188 views
If I export HTML the output isn't formatted in any way and therefore an "unreadable" long chunk of text. Is it possible to get a formatted output without having to write a format proc myself (or use an external proc)?
Svett
Telerik team
 answered on 28 May 2012
2 answers
447 views
Hi,

I've been looking at the the events under Misc and I can't seem to find the TimelineViewClick?
http://screencast.com/t/AGYafvBjDcj

What event is fired when you click on timeline view?

Thanks
Ivan Todorov
Telerik team
 answered on 28 May 2012
2 answers
155 views
Hello all,

The first column in our grid contains checkboxes.  Clicking on them doesn't toggle between checked and unchecked as though they're read-only.


I can see no settings that indicate the column isn't anything other than editable.

HeaderGridview.Rows[0].Cells[0].ReadOnly = false

I tried to get round it by capturing an event and toggling it in code but the CellClick doesn't fire if you click a cell containing a checkbox and the mousedown event doesn't tell you which column you clicked on. 

I did post this question to support but just got the "can you send us a project" response which I don't have the time to do so i'm posting the question to the wider world.
Matthew
Top achievements
Rank 1
 answered on 28 May 2012
14 answers
534 views

Hi

I have tried change Microsoft combobox to Telerik new drop down list.

I have used this code to populate Microsoft combobox:

1.cbKlien.Items.Clear(); 
2.var c =bS.view_Trans_Order_Custs.OrderBy(i => i.CustomerCode).Select( 
4.      i => new {i.CustomerCode, i.CompleteCustomerName});
5. 
6.cbKlien.Items.AddRange(c.ToArray()); 
7.cbKlien.DisplayMember = "CustomerCode";

It worked and was very fast.

But when I have added telerik drop down list I have can not populate using the some code :( I have received errors:

1.Error   1   The best overloaded method match for 'Telerik.WinControls.UI.RadListDataItemCollection.AddRange(System.Collections.Generic.IEnumerable<Telerik.WinControls.UI.RadListDataItem>)' has some invalid arguments c:\Users\PLRoStu\Documents\Visual Studio 2008\Projects\100924 ZlecTrans Test od Telerik\ZlecTransp001\fMain.cs  219 10  Zlecenia transportowe

1.Error   2   Argument '1': cannot convert from 'AnonymousType#1[]' to 'System.Collections.Generic.IEnumerable<Telerik.WinControls.UI.RadListDataItem>'   c:\Users\PLRoStu\Documents\Visual Studio 2008\Projects\100924 ZlecTrans Test od Telerik\ZlecTransp001\fMain.cs  219 34  Zlecenia transportowe

This error was on this line:

1.ddlKlien.Items.AddRange(c.ToArray());

Of course I can populate using for but it very slow:

1.ddlKlien.Items.Clear();
2.        var c = dbS.view_Trans_Order_Custs.OrderBy(i => i.CustomerCode).Select(
3.              i => new {i.CustomerCode, i.CompleteCustomerName});
4.          
5.        for (int x = 0; x < c.ToArray().Length; x++) ddlKlien.Items.Add(c.ToArray()[x].CustomerCode);
6.        //ddlKlien.Items.AddRange(c.ToArray());
7.        ddlKlien.DisplayMember = "CustomerCode";

Could you help me correct my code for fast speed?

Qaiser
Top achievements
Rank 1
 answered on 27 May 2012
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
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
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?