Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
235 views
If you're in IE (possibly other browsers too?) and the html starts with a tag, doing a replace will add the replace to the top.

Eg: change nott to not as below

Before replace:

<strong>Bold</strong>
nott bold

After replace:

<strong>not Bold</strong>
not bold

Fix: in FindAndReplace.ascx

_replace: function(search_str, str) {
        var newStr = str;
        //escape html content (find and replace is not supposed to work in HTML view anyway).
        if (newStr)
            newStr = newStr.replace(/&/gi, "&amp;").replace(/</gi, "&lt;").replace(/>/gi, "&gt;");
        if (this.getSelection().getHtml()) {
            if ($telerik.isIE) {
                //IE selection bug
                try {
                    this.getSelection().getRange().duplicate().pasteHTML(newStr);
                }
                catch (uspecifiedError) {
                    //unspecified error is thrown when replacing text inside a textarea element
                    this.getSelection().getRange().text = newStr;
                }
            }
            else {
                this._clientParameters._editor.pasteHtml(newStr, "FindAndReplace");
            }
        }
    },

needs to be changed to (after adding a reference to JQuery):

_replace: function(search_str, str) {
        var newStr = str;
        //escape html content (find and replace is not supposed to work in HTML view anyway).
        if (newStr)
            newStr = newStr.replace(/&/gi, "&amp;").replace(/</gi, "&lt;").replace(/>/gi, "&gt;");
        var html = this.getSelection().getHtml();
        if (html && $('<span>' + html + '</span>')[0].innerText) {

            if ($telerik.isIE) {
                //IE selection bug
                try {
                    this.getSelection().getRange().duplicate().pasteHTML(newStr);
                }
                catch (uspecifiedError) {
                    //unspecified error is thrown when replacing text inside a textarea element
                    this.getSelection().getRange().text = newStr;
                }
            }
            else {
                this._clientParameters._editor.pasteHtml(newStr, "FindAndReplace");
            }
        }
    },
Lini
Telerik team
 answered on 11 May 2009
2 answers
142 views
Hello,

Using Q1 2009

According to the standard dialog boxes info found on this page:

http://www.telerik.com/products/aspnet-ajax/window.aspx#predefined-dialogs

The standard dialog boxes (alert, confirm, and prompt) are, "Re-arrangeable elements - you have complete control over the position of the popup the elements (icon, text, buttons)."

Does anyone know how to re-arrange these elements (icon, text, buttons)?  If I want something that is much different than the default how do I go about editing the markup that's inside these windows?

Thanks,
Bob
Robert
Top achievements
Rank 1
 answered on 11 May 2009
1 answer
107 views
Radgrid design getting change in IE browser while adding this tag <ClientEvents OnGridCreated="GridCreated" > inside the

<

 

ClientSettings>, but design good in mozilla firefox, what was the reason?

 




Princy
Top achievements
Rank 2
 answered on 11 May 2009
3 answers
185 views
Hi I have the following aspx code and want to get the radpanelbar headers to expand and collapse. I understand you can not have this functionality when using itemtemplates in the header panel, but the examples given do not suit what I am trying to do with binding the panelbar items to a datasource as each item seems to need to be specifically setup. Could someone please explain if it is even possible to achieve this? Many thanks.

.aspx file

<

 

telerik:RadPanelBar ID="RadPanelBar1" runat="server" DataFieldID="EntityId" DataTextField="EntityId"

 

 

DataValueField="EntityId" Skin="WebBlue" DataSourceID="SubscriptionDataSource"

 

 

Width="100%" AllowCollapseAllItems="True" OnItemDataBound="RadPanelBar1_ItemDataBound"

 

 

OnInit="RadPanelBar1_Init" ExpandMode="SingleExpandedItem"

 

 

PersistStateInCookie="True" OnClientItemClicked="OnClientItemClicked">

 

 

<CollapseAnimation Type="Linear" Duration="100"></CollapseAnimation>

 

 

<ExpandAnimation Type="Linear" Duration="100"></ExpandAnimation>

 

 

<ItemTemplate>

 

 

<telerik:RadToolBar ID="RadToolBar1" runat="server" Skin="WebBlue" Width="100%" OnButtonClick="RadToolBar1_OnToolBarClick">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

<Items>

 

 

<telerik:RadToolBarButton runat="server" Text="" ToolTip="Refresh" Value="Refresh">

 

 

</telerik:RadToolBarButton>

 

 

</Items>

 

 

</telerik:RadToolBar>

 

 

<asp:ObjectDataSource ID="FolderDataSource" runat="server" SelectMethod="GetDocumentFolderList"

 

 

TypeName="Document.DocumentPL"

 

 

OldValuesParameterFormatString="original_{0}">

 

 

<SelectParameters>

 

 

<asp:Parameter DefaultValue="1" Name="groupId" Type="Int32" />

 

 

</SelectParameters>

 

 

</asp:ObjectDataSource>

 

 

<table width="100%">

 

 

<tr>

 

 

<td width="100%">

 

 

<telerik:RadTreeView ID="RadTreeView1" runat="server" DataSourceID="FolderDataSource"

 

 

DataFieldID="DocumentFolderId" DataFieldParentID="ParentDocumentFolderId" DataTextField="Name"

 

 

DataValueField="DocumentFolderId" OnNodeClick="RadTreeView1_OnNodeClick" Height="94%"

 

 

Skin="WebBlue" EnableDragAndDrop="True" Width="100%" OnNodeDrop="RadTreeView1_NodeDrop"

 

 

MultipleSelect="True" Style="overflow-y: hidden"

 

 

onload="RadTreeView1_Load" onunload="RadTreeView1_Unload">

 

 

</telerik:RadTreeView>

 

<%

--<asp:Literal ID="Literal2" runat="server" Text='<%# Eval("DataValueField") %>' />--%>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</ItemTemplate>

 

 

</

 

telerik:RadPanelBar>

 

<

 

asp:ObjectDataSource ID="SubscriptionDataSource" runat="server" OldValuesParameterFormatString="original_{0}"

 

 

SelectMethod="GetSubscriptionList" TypeName="Subscription.SubscriptionPL">

 

 

<SelectParameters>

 

 

<asp:Parameter DefaultValue="1" Name="subscriptionType" Type="Object" />

 

 

<asp:Parameter Name="userId" Type="Int32" DefaultValue="" />

 

 

</SelectParameters>

 

</

 

asp:ObjectDataSource>

.cs file

 

 

protected void RadPanelBar1_ItemDataBound(object sender, RadPanelBarEventArgs e)

 

{

 

ObjectDataSource c = (ObjectDataSource)e.Item.FindControl("FolderDataSource");

 

c.SelectParameters[

"groupId"].DefaultValue = e.Item.Value;

 

 

RadTreeView radTreeView1 = (RadTreeView)e.Item.FindControl("RadTreeView1");

 

 

this.SortNodes(radTreeView1.Nodes);

 

radTreeView1.ExpandAllNodes();

 

RadToolBar toolbar = (RadToolBar)e.Item.FindControl("RadToolBar1");

 

}

 

Atanas Korchev
Telerik team
 answered on 11 May 2009
1 answer
114 views
I am creating and binding hierarchical grid on page load, it comes up as a thick horizontal line but on click of button i call the same code block again and grid shows up properly. Can you please tell me why on page load it shows up as line?
I am using following code:
 RadGrid grid = new RadGrid();
            grid.ID = "grid" + id.ToString();
            grid.AutoGenerateColumns = false;
            grid.GridLines = GridLines.None;
            grid.EnableViewState = true;
           // grid.Style.Add(HtmlTextWriterStyle.Height, "200px");
            grid.MasterTableView.AutoGenerateColumns = false;
            grid.MasterTableView.ExpandCollapseColumn.Visible = true;
            grid.MasterTableView.Columns.Add(GenerateBoundColumn("columnA", "columnA", "columnA", false));
            grid.MasterTableView.Columns.Add(GenerateBoundColumn("columnB", "columnB", "columnB", true));
            grid.MasterTableView.Columns.Add(GenerateBoundColumn("columnC", "columnC", "columnC", true));
            grid.MasterTableView.Columns.Add(GenerateBoundColumn("columnD", "columnD", "columnD", true));
            grid.MasterTableView.HierarchyDefaultExpanded = true;
            grid.MasterTableView.DataSource = GetData(id);
            grid.MasterTableView.HierarchyLoadMode = GridChildLoadMode.ServerBind;
            GridTableView details = new GridTableView();
            details.Width = Unit.Percentage(100);
            details.Columns.Add(GenerateHTMLEditorColumn("rsTable","rsTable","rs",true));
            grid.DetailTableDataBind += new GridDetailTableDataBindEventHandler(RadGrid_DetailTableDataBind);
            grid.MasterTableView.DetailTables.Add(details);
            placeHolder.Controls.Add(grid);
            grid.MasterTableView.DataBind();
Pavlina
Telerik team
 answered on 11 May 2009
4 answers
279 views
Is there some magic spell required to make the scheduler fit a container?

I've a scheduler in a splitter and I want:

a. for the scheduler to fit 100% of the SplitterPane
b. for the splitter to scroll if the number of timeslots won't fit in the available space.

I've tried a number of things be never quite get it right.

Any hints would be appreciated.

--
Stuart
Kamen Bundev
Telerik team
 answered on 11 May 2009
1 answer
121 views
Hi,

I have a radGrid that displays sections for a website (part of a CMS system), the system allows the user to adjust the order of the sections, by clicking on an up or down arrow in 2 GridButtonColumns, all is working fine, however this is what I want to do.

I don't want the up arrow displayed on the first row and I don't want to display the down arrow on the last record, for obvious reasons (the first record can go UP any further in the order and vice versa with the last).

The solution to this is probably easy, but my brain has failed in the thinking process.
Dimo
Telerik team
 answered on 11 May 2009
1 answer
191 views
Hey guys,

I'm stuck on something that should be simple: how can I bind a Model value to a Telerik control's property.  More specificly, how do I set the SelectedDate property of a RadDatePicker?  I tried the following, but it's giving me a "server tag is not well formed error."

<telerik:RadDatePicker ID="radInstallDate" SelectedDate='<%= Model.InstallDate %>' runat="server" Width="150px" SharedCalendarID="sharedCalendar"
</telerik:RadDatePicker> 

Thanks for the help!

-Dallas
Svetlina Anati
Telerik team
 answered on 11 May 2009
1 answer
111 views
Hi

In Firefox and Safari browsers the RadWindow appears with 5 notches - gaps of a few pixels  - in the top edge
of the window title bar. It is fine in IE 7 however. Is there fix for this?

Thanks

Clive

Georgi Tunev
Telerik team
 answered on 11 May 2009
1 answer
79 views
Hello,
When using the keyboard with a RadcomboBox component into a blank ASP.Net page, it fires this javascript error:
 
Line: 1063
Character: 1
Error: 'RadComboBox.Keys.Escape' is null or it is not an object.
Code: 0
(Internet Explorer 7)
 
This happens pushing any key into the textarea of the combo. The real problem that limits the control functionality
is that we can't use the up/down keys. When working with Chrome and Firefox the error is not visible but the up/down keys doesn't 
work anyway.
 
Thanks a lot.
Simon
Telerik team
 answered on 11 May 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?