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 SubThis 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!
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
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++; }}<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>
I have a few questions regarding ilmerge & Telerik.WinControls.RadTypeResolver.Instance.ResolveTypesInCurrentAssembly = True. Any help would be greatly appreciated.