Hello,
I have a button in the Radeditor that calls a custom command. The command sets the bottom border of a table cell by adjusting the style attribute of a <td> tag. It works fine when the cursor is in the target cell. However, when I select multiple cells in the table, the border is only applied to the last cell I select. I suppose this is behaving as it should (setting the style of the last active cell), but I am wondering how I would approach adjusting the code to handle multiple cell selects? I had a look at the getSelection and getSelectionHtml methods and wasn't able to find a working solution. Any help would be appreciated. Here's my existing code snippet:
Telerik.Web.UI.Editor.CommandList["DoubleBottomBorder"] = function(commandName, editor, args) {
var command = new Telerik.Web.UI.Editor.GenericCommand(commandName, editor.get_contentWindow(), editor);
var elem = editor.getSelectedElement();
elem.style.borderBottom = "3px double #000000";
editor.executeCommand(command);
};
Regards,
Andrew
<
div
style
=
"padding-top: 6px;"
>
<
telerik:RadEditor
ID
=
"radEditorCustomersAffected"
runat
=
"server"
TextMode
=
"MultiLine"
Width
=
"600px"
Height
=
"125px"
ToolTip
=
"List of customers affected by the change."
MaxLength
=
"4000"
>
<
CssFiles
>
<
telerik:EditorCssFile
Value
=
"./Styles/RadEditor.css"
/>
</
CssFiles
>
<
Tools
>
<
telerik:EditorToolGroup
Tag
=
"MainToolbar"
>
<
telerik:EditorTool
Name
=
"FindAndReplace"
/>
<
telerik:EditorSeparator
/>
<
telerik:EditorSplitButton
Name
=
"Undo"
>
</
telerik:EditorSplitButton
>
<
telerik:EditorSplitButton
Name
=
"Redo"
>
</
telerik:EditorSplitButton
>
<
telerik:EditorSeparator
/>
<
telerik:EditorTool
Name
=
"Cut"
/>
<
telerik:EditorTool
Name
=
"Copy"
/>
<
telerik:EditorTool
Name
=
"Paste"
ShortCut
=
"CTRL+V / CMD+V"
/>
<
telerik:EditorTool
Name
=
"LinkManager"
ShortCut
=
"CTRL+K"
/>
</
telerik:EditorToolGroup
>
<
telerik:EditorToolGroup
Tag
=
"Formatting"
>
<
telerik:EditorTool
Name
=
"Bold"
/>
<
telerik:EditorTool
Name
=
"Italic"
/>
<
telerik:EditorTool
Name
=
"Underline"
/>
<
telerik:EditorSeparator
/>
<
telerik:EditorSplitButton
Name
=
"ForeColor"
>
</
telerik:EditorSplitButton
>
<
telerik:EditorSplitButton
Name
=
"BackColor"
>
</
telerik:EditorSplitButton
>
<
telerik:EditorSeparator
/>
<
telerik:EditorDropDown
Name
=
"FontName"
>
</
telerik:EditorDropDown
>
<
telerik:EditorDropDown
Name
=
"RealFontSize"
>
</
telerik:EditorDropDown
>
</
telerik:EditorToolGroup
>
</
Tools
>
<
Content
></
Content
>
<
TrackChangesSettings
CanAcceptTrackChanges
=
"False"
/>
</
telerik:RadEditor
>
</
div
>
protected
void
SubmitButtonClicked(
object
sender, EventArgs e)
{
var _requestId = 0;
if
(!ValidateInput())
return
;
if
(SubmitRequest(
ref
_requestId))
{
// Get the active request
var _activeRequest = SessionHandler.GetActiveChangeRequest((Guid)ViewState[
"pageUniqueId"
]);
bool
_promptPw;
if
(_activeRequest.IncludesPolicyWaiver && _activeRequest.AttachedWaiver ==
null
)
_promptPw =
true
;
else
_promptPw =
false
;
DisplayConfirmation(
true
, _requestId, _promptPw);
}
else
{
DisplayConfirmation(
false
, _requestId,
false
);
}
}
// It fails here checking the 1st Editor content
//Customers affected
if
(radEditorCustomersAffected.Content ==
""
)
{
lblCustomersAffected.CssClass =
"fieldName1RightHighlited"
;
_message =
"Must provide the customers affected."
;
StatusMessage.DisplayStatus(_message,
false
, Page);
return
false
;
}
lblCustomersAffected.CssClass =
"fieldName1Right"
;
Hi, I am try to go lightweight and have moved all grids to Bootstrap lightweight.
However, it looks to me like there is a 'shadow' on the left and bottom border. Please see the attached.
How can I get rid of that please? Must I make a custom skin?
Regards, Jon
Here is my Original Post, I had originally created a new account because I didn't realize that our team had access to an account with priority support. I apologize for the double post, but I have a feeling that this one will get noticed sooner.
Here is the text from the original post
Hello,
My customer has requested that we put link buttons into a specific field on a grid. The nature of the filed being that I need to have regular text followed by an unlimited number links means that I have to add my buttons dynamically. I have the text followed by links working proper upon the initial page load but something happens after the grid filter is applied. Once the grid filter is applied a post back occurs my method is still called to reformat the filed into it's final format however. Once the page loads the links are nowhere to be found and the grid cells display the text that is being converted into the buttons. Currently I am calling my logic to create the grid links on page load. I have to create the grid links in load because if I do it any later than that then my link buttons no longer function properly. Some help would be greatly appreciated. Thanks in advance below are some of my code snippets.
-Brandon
Private
Sub
RadGridResults_Load(sender
As
Object
, e
As
EventArgs)
Handles
RadGridResults.Load
For
Each
Item
As
GridItem
In
RadGridResults.MasterTableView.Items
CreateGridLinks(Item)
Next
End
Sub
Private
Sub
CreateGridLinks(item
As
GridItem)
If
TypeOf
item
Is
Telerik.Web.UI.GridDataItem
Then
Dim
dataItem
As
Telerik.Web.UI.GridDataItem =
CType
(item, Telerik.Web.UI.GridDataItem)
For
Each
cell
As
TableCell
In
item.Cells
Dim
Issues()
As
String
= cell.Text.Split(
";"
c)
If
Issues.Length > 1
AndAlso
cell.Text <>
" "
Then
Dim
CellText
As
String
= Issues(0) +
" "
Dim
CellId
As
String
=
""
Dim
IssueAppealType
As
String
=
""
Dim
IssueAppealId
As
String
=
""
For
i
As
Integer
= 1
To
_issues.Length - 1
If
i = 1
Then
cell.Controls.Add(
New
LiteralControl(CellText))
End
If
If
_issues(i).Trim.Split(
":"
c).Length > 1
Then
Dim
IssueAppealButton
As
New
LinkButton()
CellId = _issues(i).Trim.Replace(
":"
,
""
)
Dim
IssueAppealArray = _issues(i).Trim.Split(
":"
c)
IssueAppealType = IssueAppealArray(0)
IssueAppealId = IssueAppealArray(1)
IssueAppealButton.Text = IssueAppealId
cntrlCount += 1
IssueAppealButton.ID =
"LinkButton"
+ CellId + cntrlCount.ToString
AddHandler
IssueAppealButton.Click,
Sub
(send, evt) HandleIssueLinkClick(IssueAppealId, IssueAppealType)
cell.Controls.Add(IssueAppealButton)
cell.Controls.Add(
New
LiteralControl(
" "
))
End
If
Next
End
If
Next
End
If
End
Sub
hi
how do i get the selected tab text on page load? Thanks a lot.
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
RadTabStrip1.SelectedIndex = 0;
string x = RadTabStrip1.SelectedTab.Text;
}
}
hi
how do i get the selected tab text on page load? Thanks a lot.
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
RadTabStrip1.SelectedIndex = 0;
string x = RadTabStrip1.SelectedTab.Text;
}
}
In all IE versions (8-11), we have an issue when the content within the editor scrolls and you select an object. I can reproduce this on the editor demo page at http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx.
To reproduce it there, you:
The square handles that appeared in Step 2 scroll right down off the bottom of the editor into the page below it rather than being hidden. I attached a screenshot showing the issue, with it highlighted in yellow.
This is only happening for me in IE, not in Chrome or Firefox. Unfortunately, our users mostly use IE.
Do you have any thoughts what we can do about this?
Hi,
We use HTMLChart to display stacked bar but the scale of the bar displayed is incorrect.
The value we supply and display on chart seems correct. There is also noticeable gap on each stacked bar.
Please refer to the attached screenshot.
We tested on another development PC and it works OK.
Please assist.
Thanks.