Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
153 views

We have a strange issue where when we copy and paste from Word to the Telerik Editor (2018.3.910.45) using Firefox on a Mac (running 12.4). that the editor inserts a large <style> tag with a font face element inside. See Attached Screenshot. This is only the case when using a Mac and Firefox. I can recreate the issue on the Telerik Demo page. https://demos.telerik.com/aspnet-ajax/editor/examples/cleaningwordformatting/defaultcs.aspx

 

Any thoughts on how to fix this would be most appreciated. Thanks! We tried utilizing the ConvertFontToSpan and ConvertInLineStylesToAttributes options in the content filter.

Rumen
Telerik team
 answered on 09 Aug 2022
1 answer
162 views

Hello,

I am building a couple different user controls that nest other user controls inside of them. They are all coming together to live on a single control that is placed in a page. Without posting everything I have, a rough outline of my setup is below and a description of the problem is under that.

 


User Control name radcombo:
<table>
<tr>
<td>
<radcombobox id="radComboBox1" runat="server"/>
</td>
</tr>
</table>



UserControl2: UpdateObject2

<radButton id="OpenRadWindowToUpdate" etc.../>

<radwindow id="window1">
    <contentTemplate>
        <radlabel/>
        <radtextField/>
        <userControl:radCombo1 id="customRadCombo1"/>
    </contentTemplate>
</radWindow>



UserControl3: MultiDropDown
<radMultiColumnDropDown /> 
<userControl:UpdateObject2 id="customUpdateObject2"/>


Final destination: .aspx page

<radgrid/>
<radwindow id="controlsLiveInHere"/>
    <userControl:MultiDropDown id="multiDropDown1"/>
</radwindow>

 

I am aware that I can set up javascript on the radwindow's onClientClose/Resize/Move events and understand how to implement that. What I am looking for is how to utilize those events in a way that I can touch a dropdown control that may be 2-3 levels away from where the event is happening and I'll also have 4-7 dropdowns to close. I considered exposing client IDs through properties however that seemed like a stretch. I am working in VB.net and all of the other functionality of the controls operate as designed currently. Any input is appreciated! If more code is needed I can provide it, however its quite a few controls and I've tried to boil it down to its essence above.

After some contemplation this weekend, I considered another few options but would love to hear if anyone has implemented them and if there is a best way to do so.

Public WriteOnly Property HideDropDowns

  1. Create a public property on each control that is writeonly as a boolean
  2. When that control is passed in true, it actively hides the drop down boxes and then resets its status to false.
  3. Any controls that implement this control will need to pass it along to be accessed further up the hierarchy
  4. When the modal window is acted upon, hook the appropriate client side events and use javascript to update the value of this property.

Public readonly property DropDownsToClose

  1. Create a readonly property that returns a list of clientids as a string separated by some delimiter
  2. Hook the client side events that are necessary
  3. Use JS to grab that property, split the string, and then run the HideDropDown() function provided to close the dropdown menus

Any parent controls would need to expose this and could even go as far as to simply build upon the string of clientIDs if necessary. I think I prefer this approach if it is feasible. Anyone else done this before? Something like the below...


Public ReadOnly Property DropDownsToClose as String
	Get
		Return String.Concat(radComboBox1.ClientID,"||",radComboBox2.ClientID)
	End Get
End Property

<telerik:RadWindow ID="Window1" runat="server" OnClientDragStart="CloseDropDowns" OnClientResize= >
	<contentTemplate>
        <radlabel/>
        <radtextField/>
        <userControl:RadCombo id="customRadCombo1"/>
    </contentTemplate>
</radWindow>

<Script>
		
	function CloseDropDowns(sender, args) {
		//find the string of clientIds in the userControl's DropDownsToClose property
		var ddls = $find("<%= customRadCombo1.ClientID %>").DropDownsToClose
		ddls.split("||").forEach(comboClientID => $find("<%= comboClientID %>").HideDropDown());
	}
</Script>


 

 

Thanks for any help!

Zach
Top achievements
Rank 1
Iron
 answered on 08 Aug 2022
2 answers
326 views

There is a serious bug in the AJAX radgrid, when using a bound GridNumericColumn, where NumericType = "currency" to set the display format.  

 

When the  datasource has negative amounts, this will be displayed in the format "($1.22)", which is what is expected with a currency format.  But, as soon as you try to edit this column, it opens the editor, and misinterprets this negative, and transforms the amount to positive.   The currency format should be shown in non edit mode, but it should interpret this properly and display a number with a negative sign in edit mode.  When edit has closed, the display should revert back to currency format.

 

This is a very serious issue with financial applications, such as those that deal with hundreds of million sof dollars in a corporate Profit And Loss, or Forecasting system.

 

 

Rumen
Telerik team
 updated answer on 08 Aug 2022
1 answer
343 views

Hi

I have a RadButton with  ButtonType="LinkButton".

I want remove the link from Head Office by following code.

ASPX

<telerik:GridTemplateColumn HeaderText="Branch" HeaderStyle-Width="10%" DataType="System.String" UniqueName="Branch" DataField="Branch">
                                    <ItemTemplate>
                                        <telerik:RadButton ID="btnBranch" Width="100%" runat="server" Text='<%#Eval("Branch") %>' ButtonType="LinkButton" ToggleType="CustomToggle" 
                                            Font-Underline="true" BorderStyle="None" CommandName="ViewBranchDtls" CommandArgument='<%#Eval("Branch") %>'>
                                        </telerik:RadButton>
                                        <asp:HiddenField ID="hdBranch" runat="server" Value='<%#Eval("Branch") %>' />
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>

CS

protected void gvReport_ItemDataBound(object sender, GridItemEventArgs e) { try { if (e.Item is GridDataItem) { GridDataItem item = e.Item as GridDataItem; if ((item.FindControl("btnBranch") as RadButton).Text == "HEAD OFFICE" ) { (e.Item.FindControl("btnBranch") as RadButton).Style.Add("pointer-events", "none"); // here need to remove the underline } } } catch (Exception ex) { } finally { } }

sample Extracted HTML

<td>
                                        <a id="ctl00_ContentPlaceHolder1_gvReport_ctl00_ctl12_btnBranch" class="RadButton RadButton_Default rbLinkButton" href="javascript:void(0)" style="display:inline-block;border-style:None;text-decoration:underline;width:100%;pointer-events:none;text-decoration:none;"><span class="rbText" style="text-decoration:underline;width:100%;padding-left:0;padding-right:0;text-align:center;">HEAD OFFICE</span><input id="ctl00_ContentPlaceHolder1_gvReport_ctl00_ctl12_btnBranch_ClientState" name="ctl00_ContentPlaceHolder1_gvReport_ctl00_ctl12_btnBranch_ClientState" type="hidden" autocomplete="off"></a>
                                        <input type="hidden" name="ctl00$ContentPlaceHolder1$gvReport$ctl00$ctl12$hdBranch" id="ctl00_ContentPlaceHolder1_gvReport_ctl00_ctl12_hdBranch" value="HEAD OFFICE">
                                    </td>

I notice Telerik will auto generate SPAN with underline.

How to remove the underline?

Thanks.

fsloke


Doncho
Telerik team
 answered on 05 Aug 2022
2 answers
108 views

Is it possible to remove the the togglehandle text "Toggle" because it is indexed by GoogleBot, as in attached screenshot.

 

Thanks, Marc

Fit2Page
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 05 Aug 2022
1 answer
168 views

I noticed in the RadMultiColumnComboBox that the cursor appears to be a text-insertion/editing cursor instead of an arrow. I'm using this to allow the user to select an item so the text cursor is unintuitive. Is there a way to set the style of the mouse cursor on this control?


   
<telerik:RadMultiColumnComboBox runat="server" ID="radMultiComboPhrases" DropDownWidth="200px" Height="400px" AutoPostBack="true" Placeholder="Select a phrase..." DataTextField="sBrief" DataValueField="sPhrase" RenderMode="Mobile">
     <ColumnsCollection>
        <telerik:MultiColumnComboBoxColumn Field="sBrief" Title="Brief Desc." Width="200px"></telerik:MultiColumnComboBoxColumn>
        <telerik:MultiColumnComboBoxColumn Field="sPhrase" Title="Phrase" Width="200px"></telerik:MultiColumnComboBoxColumn>
     </ColumnsCollection>
</telerik:RadMultiColumnComboBox>

Rumen
Telerik team
 answered on 04 Aug 2022
8 answers
608 views
I am getting error as below:
It was working fine last week until I reinstalled. Any suggestion?

 

Server Error in '/RadControls_AspNetAjax' Application.

Cannot open user default database. Login failed.
Login failed for user '***************'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot open user default database. Login failed.
Login failed for user '***********'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): Cannot open user default database. Login failed.
Login failed for user '*********'.]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4849015
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2394
   System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +144
   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
   System.Data.SqlClient.SqlConnection.Open() +122
   System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +47

Valentin Dragnev
Telerik team
 answered on 03 Aug 2022
0 answers
123 views

Hi,

 

I just wanted to give you guys a BIG thumbs up for your work on the Gantt chart.

That one saves me really a lot of time to create a customer project system.

 

THANK YOU!

 

Marc

Fit2Page
Top achievements
Rank 2
Bronze
Iron
Iron
 asked on 03 Aug 2022
1 answer
221 views

Hello,

 

I've got a RadHtmlChart where I am creating my ScatterSeries in the code and setting the colors for every series ( scatterSeries.MarkersAppearance.BorderColor) depending on values coming from the database. This is working fine and my  scatter point colors are as I want them (red and green in my case), but my legend just always shows red and blue, no matter what. I expected to legend to just automatically pick up the colors I set for my chart. What can I do to fix this please?

Thanks

 

 

Sean
Top achievements
Rank 1
 updated question on 02 Aug 2022
1 answer
277 views

Hello,

I have a problem with RadScriptManager

I have an exisiting ASP.Net Web Forms web application.

There is Default.aspx and used Main.Master master page

I did the necessary to integrate Telerik UI Web correctly.

In the master page there is <asp:ScriptManager ID="ScriptManager...

and in the Default.aspx I added <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

and <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />

and <telerik:RadWindowManager RenderMode="Lightweight"....

and <button onclick="openReqForm(); return false;">hello</button>

in code behind:

string fctOpenReqForm = "<script type=\"text/javascript\">function openWin {var oWnd = radopen(\"Request.aspx\", \"RadWindow1\"); } </script>";

Page.ClientScript.RegisterStartupScript(this.GetType(), "openReqForm", fctOpenReqForm);

 

When I execute I have an error message: "Only one instance of script manager can be added to the page...

I need to add a Telerik button and other telerik things to the page and use javascript methods...

Any help? thanks

 

Peter Milchev
Telerik team
 answered on 02 Aug 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
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
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?