Telerik Forums
UI for WinForms Forum
2 answers
181 views

Hi

I'm trying to use a telerik RadRichTextBox for my windows form.  Is there a way I can remove the cursor from the control after inserting the value using the following line:

    RADRichTextBox1.Insert('xxx')

    RADRichTextBox2.Insert('yyyy')

Please see the attachment for reference. 


Svett
Telerik team
 answered on 26 Oct 2011
2 answers
161 views
Hi,

I was trying to write a custom column having textbox and an image to be useds as lookup column. I tried  following code and it work perfectly except the image did not appear in center. Please advise.

    void radGridView1_CellEditorInitialized(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
    {
        if (e.Column.Name == "Lookup")
        {
            RadImageItem imgElement;
            imgElement = new RadImageItem();
            imgElement.Margin = new Padding(0, 2, 0, 0);
            imgElement.Alignment = ContentAlignment.MiddleCenter;
            imgElement.Image = Properties.Resources.hd_find.ToBitmap();
            //imgElement.MinSize = new Size(20, 5);
            imgElement.Size = new Size(50, 5);
            imgElement.AutoSize = false;
            //imgElement.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;
 
            this.radGridView1.CurrentCell.Children.Add(imgElement);
 
                if (!tbSubscribed)
                {
                         
                    RadTextBoxEditor tbEditor = this.radGridView1.ActiveEditor as RadTextBoxEditor;
                    if (tbEditor != null)
                    {
 
                    tbSubscribed = true;
                    RadTextBoxEditorElement tbElement = (RadTextBoxEditorElement)tbEditor.EditorElement;
                    tbElement.KeyDown += new KeyEventHandler(tbElement_KeyDown);
                }
            }
        }
    }
 
    void radGridView1_CellEndEdit(object sender, GridViewCellEventArgs e)
    {
        if (e.Column.Name == "Lookup")
        {
            if (this.radGridView1.CurrentCell.Children.Count == 1)
            {
                this.radGridView1.CurrentCell.Children.RemoveAt(0);
            }
        }
    }
    void tbElement_KeyDown(object sender, KeyEventArgs e)
    {
        if (e.KeyCode == Keys.F1)
        {
            ((RadTextBoxEditorElement)sender).Text = "Default text";
        }
 
     
    }
 
    void radGridView1_CreateCell(object sender, Telerik.WinControls.UI.GridViewCreateCellEventArgs e)
    {
        if (e.Row is GridDataRowElement)
        {
            if (e.Column.Name == "Lookup")
            {
                e.CellType = typeof(RadTextBoxExtCellElement);
            }
        }
    }
 
 
 
 
public class RadTextBoxExtCellElement : GridDataCellElement
{
    private int imageWidth = 30;
    private int imagePadding = 2;
 
    public RadTextBoxExtCellElement(GridViewColumn column, GridRowElement row)
        : base(column, row)
    {
    }
 
 
 
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(GridDataCellElement);
        }
    }
 
 
 
    protected override SizeF ArrangeOverride(SizeF finalSize)
    {
        base.ArrangeOverride(finalSize);
        if (this.Children.Count == 2)
        {
            RectangleF rect = GetClientRectangle(finalSize);
            RectangleF rectEdit = new RectangleF(rect.X, rect.Y, rect.Width - (imageWidth + imagePadding), rect.Height);
            RectangleF rectImage = new RectangleF(rectEdit.Right + imagePadding, rect.Y, imageWidth, rect.Y);
            this.Children[0].Arrange(rectEdit);
            this.Children[1].Arrange(rectImage);
        }
 
        return finalSize;
    }

Thanks,
devoas
devoas
Top achievements
Rank 1
 answered on 26 Oct 2011
0 answers
60 views
Hi, I need to program the following:


I have a list <li> of ASP ImageButton(s) which I want to set their ImageURL properties with images loaded from a SQL Server database.


I've seen people implemeent it in the HTML markup of the using <? Eval("Image"); ?>


That seems to be the approach I am looking for but don't know what else to set.


I have loaded a DataTable object containing just a column-field of type Binary holding Images.


Please advise.  Please provide detail examples if possible. :)
Mail
Top achievements
Rank 1
 asked on 26 Oct 2011
1 answer
103 views
Hello,
I have problem with grouping in the RadDataGridView. In my project the grid must be in the virtual mode: (VirtualMode = true) (filling some cells are taken from a list; FieldName property cannot be used), but grouping by some parameter (in the grid) is not working in this mode, since Grouping property is joined with bindingSource controller, which I cannot use (If I understood well the functionality). Thus, it is possible to group data in the virtual mode? If it does, could someone attache a piece of code for me?
Thank.

 
Emanuel Varga
Top achievements
Rank 1
 answered on 26 Oct 2011
1 answer
94 views
I upgrade my telerik version from 2010 Q1 to 2011 Q1

After that there is a error

Error 241 Property or indexer 'Telerik.WinControls.UI.GridViewColumn.Index' cannot be assigned to -- it is read only

Sooo I want to know how I can fix this Issue...... 

Pls let me know if there is a another way to set column index

Emanuel Varga
Top achievements
Rank 1
 answered on 26 Oct 2011
1 answer
205 views
Hello,

We are using a MultiColumn ComboBox for a drop down list in our app.

I'd like the user to only be able to enter values that are contained in the list.

Currently, they can type anything they like in the box, and save it.

Of course, they can also use their mouse to select an item, but we'd like to prevent them from saving invalid data.

Thanks,

--shawn
Shawn
Top achievements
Rank 1
 answered on 24 Oct 2011
6 answers
490 views
Is there a simple way to search a column for a specified text and then select the first (then next) row with the text, if found?

(I am aware of the Filter functionality, but that is not what I need here.)

I'm having a hard time adjusting to the object model of the RadGrid, being used to such simple things as MSFlexGrid.TextMatrix(iRow, iCol).

Can you point me to a grahic view of the RadGrid object model?

Finn

Martin Vasilev
Telerik team
 answered on 24 Oct 2011
1 answer
92 views
Hi!

How can I customize (with Visual Style Builder) the style for the GroupPanelElement and GroupFieldElement (highlighted in capture.png).

Thanks.
Ivan Petrov
Telerik team
 answered on 24 Oct 2011
5 answers
1.4K+ views

Hi,

I would like to defined the ReadOnly Property to DateTimePicker control.

The Enabled property does not supply our needs.

I have seen different solutions for this problem in the website

but they did not answer the following criteria's:

1 The user will be able to copy the content of the control.

2 The control will not change its visual display look.

                                          

Regards,

Namma.

Peter
Telerik team
 answered on 24 Oct 2011
1 answer
163 views
Ivan,
Database save problem - Binding error ?
Radscheduler is not much use if i can't load and save data...
on load the scheduler data is not present in User 1 to User 4.
When I save Data the appointment disappears but one good
thing if I drag a new appointment from say User 1 to user 3
that change shows when pulling up the appointment!
Could you please give me some assistance i have tried but
have failed.
I re-bound the SchedulerBindingDatasource, and that was
un successfull... Thank you for the wonderfull products!
(Any user to user help would also be of help)

Many Regards,
Jeffery R Link
Imports DevComponents.DotNetBar
  
Imports IntelliLock.Licensing
  
Imports Ionic.Zip
  
Imports System
  
Imports System.Data
  
Imports System.IO
  
Imports System.Windows.Forms
  
Imports Telerik.WinControls.UI
  
Imports Telerik.WinControls.UI.Scheduler.ICalendar
  
Imports Microsoft.VisualBasic
  
Imports Telerik.WinControls.UI.Scheduler.Dialogs
  
Imports System.ComponentModel
  
Imports System.Collections.Generic
  
Imports System.Drawing
  
Imports System.Text
  
Imports Telerik.WinControls
  
Public Class Form1
  
    'main form loader...
  
    Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  
        Try
  
            If (IntelliLock.Licensing.EvaluationMonitor.CurrentLicense.LicenseStatus = IntelliLock.Licensing.LicenseStatus.NotChecked) Then
  
                Text = "Chariots PIM DB v1.3.3.5 X64 - Shareware Version - Licensed To: [Unregistered]"
  
            ElseIf (IntelliLock.Licensing.EvaluationMonitor.CurrentLicense.LicenseStatus = IntelliLock.Licensing.LicenseStatus.Licensed) Then
  
                Text = "Chariots PIM DB v1.3.3.5 X64" & "  " & "- Full Version" & "  " & "- Licensed To:" & "  " & "[" & EvaluationMonitor.CurrentLicense.LicenseInformation.GetByIndex(1).ToString() & " " & EvaluationMonitor.CurrentLicense.LicenseInformation.GetByIndex(2).ToString() & "]"
  
            Else
  
                Text = "Chariots PIM DB v1.3.3.5 X64 - Shareware Version - Licensed To: [Unregistered]"
  
            End If
  
        Catch ex As Exception
  
            MessageBoxEx.ButtonsDividerVisible = False
  
            MessageBoxEx.Show("An Error Occurred Reading The License File!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
  
        End Try
  
        Try
  
            Me.Sheet1TableAdapter.Fill(Me.DataSet2.Sheet1)
  
            Me.AppointmentsResourcesTableAdapter.Fill(Me.SchedulerDataSet.AppointmentsResources)
  
            Me.ResourcesTableAdapter.Fill(Me.SchedulerDataSet.Resources)
  
            Me.AppointmentsTableAdapter.Fill(Me.SchedulerDataSet.Appointments)
  
            RadSchedulerReminder1.StartReminder()
  
            Me.RadCalendar1.FocusedDate = DateTime.Today
  
            Me.RadScheduler1.FocusedDate = DateTime.Today
  
            Me.RadScheduler1.ActiveView.Equals(RadCalendar1.SelectedDate)
  
            StyleManager1.ManagerStyle = eStyle.Office2007Blue
  
            Me.RadCalendar1.ThemeName = "Office2007blue"
  
            Me.RadSchedulerNavigator1.ThemeName = "Office2007blue"
  
            Me.RadScheduler1.ThemeName = "Office2007blue"
  
            Me.RadStatusStrip1.ThemeName = "Office2007blue"
  
            Me.RadSchedulerReminder1.ThemeName = "Office2007blue"
  
            Me.RadDesktopAlert1.ThemeName = "Office2007blue"
  
            Me.RadButton1.ThemeName = "Office2007blue"
  
            Me.RadButton2.ThemeName = "Office2007blue"
  
            Me.RadPanel1.ThemeName = "Office2007blue"
  
            Me.RadLabel1.ThemeName = "Office2007blue"
  
            Me.ddTimeZones.ThemeName = "Office2007blue"
  
            Me.RadLabelElement3.Text = "Office2007blue"
  
            Me.RadLabelElement1.Text = DateTime.Today
  
            InitalizeTimeZones()
  
            RibbonBar1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F"
  
            RadScheduler1.ActiveViewType = SchedulerViewType.Month
  
            TryCast(RadScheduler1.ActiveView, SchedulerMonthView).WeekCount = 4
  
            InitalizeTimeZones()
  
            Me.RadSchedulerNavigator1.SchedulerNavigatorElement.TimeZonesDropDown.SelectedValue = New SchedulerTimeZone(TimeZone.CurrentTimeZone)
  
            Dim colors() As Color = {Color.Transparent, Color.Transparent, Color.Transparent, Color.Transparent}
  
            Dim names() As String = {"User 1", "User 2", "User 3", "User 4"}
  
            For i As Integer = 0 To names.Length - 1
  
                Dim resource As New Telerik.WinControls.UI.Resource()
  
                resource.Id = New EventId(i)
  
                resource.Name = names(i)
  
                resource.Color = colors(i)
  
                'resource.Image = Me.imageList1.Images(i)
  
                Me.RadScheduler1.Resources.Add(resource)
  
            Next i
  
            Me.RadScheduler1.GroupType = GroupType.Resource
  
            Me.RadScheduler1.ActiveView.ResourcesPerView = 2
  
        Catch ex As Exception
  
            MessageBoxEx.ButtonsDividerVisible = False
  
            MessageBoxEx.Show("An Error Occurred Loading the Database(s)!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
  
        End Try

Ivan Todorov
Telerik team
 answered on 24 Oct 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
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?