Telerik Forums
UI for WinForms Forum
9 answers
868 views

The users want the TextBox to select its contents when the user clicks into the TextBox.

I tried this code:

Private Sub RadTextBox1_Enter(sender As Object, e As System.EventArgs) Handles RadTextBox1.Enter
    Dim tb = TryCast(RadTextBox1.TextBoxElement.TextBoxItem.HostedControl, TextBox)
    tb.SelectAll()
End Sub

This works when the user Tabs into the TextBox, but not when the user clicks into the TextBox.

Is there a way to select the text when the user clicks into the TextBox?

Thanks!

Joel
Top achievements
Rank 2
 answered on 13 Feb 2013
5 answers
172 views

I have a grid that shows data that is self referencing.  The data is a simple List<> based collection of objects that have an Id and ParentId properties (among others).  [Using Telerik.WinControls.UI.RadGridView version 2012.3.1211.40]

Below is the error information:

Object reference not set to an instance of an object.
 
GridViewCellInfoCollection.get_Item()
GridDataCellElement.UpdateInfoCore()
GridCellElement.UpdateInfo()
GridTableElement.UpdateCellContentByColumn()
GridTableElement.UpdateViewCore()
GridTableElement.UpdateView()
GridTableElement.ProcessTemplateEvent()
GridTableElement.Telerik.WinControls.UI.IGridViewEventListener.ProcessEvent()
GridViewEventProcessEntity.ProcessCollection()
GridViewEventProcessEntity.ProcessEvent()
GridViewSynchronizationService.NotifyListeners()
GridViewSynchronizationService.FlushEvents()
GridViewSynchronizationService.DispatchEvent()
GridViewSynchronizationService.DispatchEvent()
GridViewSelfReferenceDataProvider.DispatchDataViewChangedEvent()
GridViewSelfReferenceDataProvider.Refresh()
GridViewTemplate.Telerik.WinControls.Data.IDataItemSource.Initialize()
RadListSource`1.Initialize()
RadListSource`1.Bind()
RadListSource`1.set_DataSource()
GridViewTemplate.set_DataSource()
RadGridView.set_DataSource()
ProjectsListUserControl.AddProjects()
ProjectsListUserControl.RefreshProjectList()

Does anyone have any ideas on how to troubleshoot this?

Thanks!
Ed

Julian Benkov
Telerik team
 answered on 13 Feb 2013
4 answers
126 views
Hi

Is there a way to use a plain old RadMenu and a RadRibbonBar (but not with its own menu and title bar and everything) at the same time?

I would like to have the look of the Ribbon bar (mix of large and small images) but my users are not ready to give away the traditional menu at the top of the form (not the one hidden like the RadApplicationMenu!).

I have tried the RadCommandBar and I can't get everything I want (mixed of images sizes, section caption, ...)
Eric Moreau
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 13 Feb 2013
2 answers
112 views
I am having a hard time trying to load my controls inside a RadDock that uses ascx.\

This is my code (it is same as the Portal Demo)

protected void ButtonAddDock_Click(object sender, EventArgs e)
        {
            RadDock dock = CreateRadDock();          
            RadDockZone dz = RadDockZone1;
  
             
            RadDockLayout1.Controls.Add(dock);
            dock.Dock(dz);          
            CreateSaveStateTrigger(dock);
  
            dock.Tag = "Templates/NewQuiz.ascx";
            LoadWidget(dock);
  
        }
private void LoadWidget(RadDock dock)
        {
            if (string.IsNullOrEmpty(dock.Tag) || dock.Closed)
            {
                return;
            }
            Control widget = LoadControl(dock.Tag);
            widget.EnableViewState = false;
            dock.ContentContainer.Controls.Add(widget);
        }
protected void btnSaveDraft_Click(object sender, EventArgs e)
        {
            string[] questions = {};
            int x = 0;
            foreach (RadDock dock in RadDockLayout1.RegisteredDocks)
            {              
                RadTextBox txtQuestion = (RadTextBox)dock.ContentContainer.FindControl("txtQuestion");
                questions[x]= txtQuestion.Text;
                x++;
            }
}

And here is my ASCX

<center style="padding-top: 15px;">
    <table style="text-align: justify;">
        <tr>
            <td style="width: 15%;">
                Question:
            </td>
            <td>
                <telerik:RadTextBox ID="txtQuestion" runat="server" Width="100%">
                </telerik:RadTextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 15%;">
                Help Text:
            </td>
            <td>
                <telerik:RadTextBox ID="txtHelp" runat="server" Width="100%">
                </telerik:RadTextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 15%;">
                Mandatory:
            </td>
            <td>
                <asp:CheckBox ID="chkMandatory" runat="server" />
            </td>
        </tr>
        <tr>
            <td style="width: 15%;">
                Question Weight:
            </td>
            <td>
                <telerik:RadTextBox ID="txtWeight" runat="server" Width="30px" Text="1">
                </telerik:RadTextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 15%;">
                Question Type:
            </td>
            <td>
                <telerik:RadComboBox ID="ddlType" runat="server" AutoPostBack="True">
                    <Items>
                        <telerik:RadComboBoxItem runat="server" Selected="True" Text="--Select Question Type--"
                            Value="--Select Question Type--" />
                        <telerik:RadComboBoxItem runat="server" Text="Multiple Choice - Radio Button" Value="Multiple Choice - Radio Button" />
                        <telerik:RadComboBoxItem runat="server" Text="Multiple Choice - Check Box" Value="Multiple Choice - Check Box" />
                    </Items>
                </telerik:RadComboBox>
            </td>
        </tr>
    </table>
</center>

The code in my aspx can't find the txtQuestion textbox. 
Ian David
Top achievements
Rank 1
 answered on 13 Feb 2013
1 answer
870 views
hello,

I am using telerik GridView on application development,  i tried to format specific cells of the gridview so to allow only numbers when editing , i can't find how to do that , i look into the properties of the gridview but cant't find any way to do that.
 can you help me on that?
Stefan
Telerik team
 answered on 13 Feb 2013
3 answers
152 views
Hi,

Are there any examples of a Unbound PivotGrid? I would like to have PivotGrid that looks like a Property Grid.
I need to use PivotGrid because I need multiple rows.  I need to add my own rows.
I would like to have a PivotGrid that has categories (groups) and images in the individual rows.

I have not found any examples for adding rows manually.

Below is an example of what I want the grid to look like.

Thanks
Steve Morrow
Peter
Telerik team
 answered on 13 Feb 2013
3 answers
122 views

I have a few questions regarding ilmerge & Telerik.WinControls.RadTypeResolver.Instance.ResolveTypesInCurrentAssembly = True. Any help would be greatly appreciated.

  • My application startup object is Sub Main. Should Telerik.WinControls.RadTypeResolver.Instance.ResolveTypesInCurrentAssembly = True still be placed in the static constructor of the first form that is created and loaded?
  • My first form is a login screen that is disposed once you have successfully logged in. Will this cause issues with Telerik.WinControls.RadTypeResolver.Instance.ResolveTypesInCurrentAssembly = True?
  • I am able to successfully merging Telerik.Reporting.dll, Telerik.ReportViewer.WinForms.dll, Telerik.WinControls.dll,                 Telerik.WinControls.GridView.dll, Telerik.WinControls.RadDock.dll, Telerik.WinControls.Themes.Office2010Black.dll, Telerik.WinControls.Themes.Office2010Blue.dll, Telerik.WinControls.Themes.Office2010Silver.dll, Telerik.WinControls.UI.dll, TelerikCommon.dll and my exe both. The merged and the standalone application run without error when Telerik.WinControls.RadTypeResolver.Instance.ResolveTypesInCurrentAssembly = True. Isn’t the built executable supposed to return an exception?
Jack
Telerik team
 answered on 13 Feb 2013
1 answer
38 views
Or is there a way to show pictures in the PivotGrid?

Regards Roman
Julian Benkov
Telerik team
 answered on 13 Feb 2013
1 answer
134 views
When creating or editing a document using the RadRichTextBox control, I've allowed the user to change the line spacing and spacing before and after a paragraph.  The user can then select one or more paragraphs and change these settings, which only apply to the selected area.

How can I determine at runtime what the line/paragraph spacing is for the paragraph at the current caret position?

Any help is greatly appreciated.

NEVERMIND... I GOT IT!
Jack
Telerik team
 answered on 13 Feb 2013
2 answers
323 views
Hi,

I just reinstalled VS2012 due to some strange malfunction (I couldn't add controls to forms from the toolbox), and at the same time, i uninstalled Telerik Winforms controls  version 2010_3_10_1215 and installed version 2012_3_1211, which we use in our solution. 
My problem is, that in the Telerik controls Toolbox tab, most controls are greyed out, and appears twice.
I have tried the TelerikToolboxCleaner from one of the other posts, but apparently it works with VS2010, not VS2012.
I have also used the Telerik Toolbox Configurator.
I wan't to have all controls available one time.

I'm not too fond of resetting the toolbox, because I fear it might mess up a lot of other things.

How do I fix this?

I hope you can help me resolve this issue.

BR
Henning
Vesko
Telerik team
 answered on 11 Feb 2013
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
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
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?