Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
111 views
Dear,
I add new custom attribute to RadTreeNode using the following code:

Nod.Attributes.Add("Key", "Value")
Where Nod is a RadTreeNode, the attributes is added (Node attributes count is increased) but when I retrieved its value using: Nod.Attributes(Key) I always got Nothing.
Best Regards


Shinu
Top achievements
Rank 2
 answered on 18 Oct 2010
1 answer
115 views
Hi,

I set the tab index in the Telerik combobox. When i try to check the tab sequence in the form when it comes to the telerik combo box. it stops over there. Is it problem in the Rad Combo Box?  What is the solution for this problem? Could you please send example sample form with the tab index set in the Rad combo box working?

Thanks & Regards
Yana
Telerik team
 answered on 18 Oct 2010
1 answer
105 views
I have a multi-select combobox defined on my page with checkboxes and radio buttons in the template.
I am observing a strange behavior with the dropdown.
To close the dropdown I have to click outside of the combo.
On my save I pop-up a radalert that says that data is saved.  If the user checks something in the combo and directly clicks save without clicking out anywhere on the form the pop-up takes two clicks to close. If I again repeat the same steps it increments another click till the time i refresh the page.

combo declaration:
<telerik:RadComboBox runat="server" ID="RadComboBoxParticipants" EnableLoadOnDemand="false"
                                Width="350px" OnPreRender="RadComboBoxParticipants_PreRender" AllowCustomText="true"
                                LoadingMessage="loading.." OnClientSelectedIndexChanging="OnClientSelectedIndexChanging" CloseDropDownOnBlur="true"
                                OnClientDropDownOpening="OnClientDropDownOpening" OnClientDropDownClosing="OnClientDropDownClosing"
                                OnClientBlur="OnClientBlur" OnItemDataBound="RadComboBoxParticipants_ItemDataBound">
                                <ItemTemplate>
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:CheckBox ID="CheckBox1" runat="server" onclick="stopPropagation(event, this);"
                                                    ToolTip="Adds as option" />
                                            </td>
                                            <td>
                                                <asp:RadioButton ID="RadioButton1" runat="server" GroupName="Type" onclick="SetUniqueRadioButton();"
                                                    ToolTip="Sets as default" />
                                            </td>
                                            <td>
                                                <%# DataBinder.Eval(Container.DataItem,"FullName") %>
                                            </td>
                                        </tr>
                                    </table>
                                </ItemTemplate>
                                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                            </telerik:RadComboBox>


Javascript:
var supressDropDownClosing = false;
  
            function OnClientDropDownClosing(sender, eventArgs) {
                eventArgs.set_cancel(supressDropDownClosing);
            }
  
            function OnClientSelectedIndexChanging(sender, eventArgs) {
                eventArgs.set_cancel(supressDropDownClosing);
            }
  
            function OnClientDropDownOpening(sender, eventArgs) {
                supressDropDownClosing = true;
            }
  
            function OnClientBlur(sender) {
                supressDropDownClosing = false;
  
                sender.toggleDropDown();
            }
  
  
            function stopPropagation(e, chk) {
                e.cancelBubble = true;
                if (e.stopPropagation) {
                    e.stopPropagation();
                }
}


This is very annoying for the client. Can you suggest something.
Yana
Telerik team
 answered on 18 Oct 2010
4 answers
199 views

I'm currently using version 2009.1.527.35 of the Telerik RadControls for ASP.NET Ajax.  When I use the Default Content Filters ( or none) and the user edits the content using the HTML view and adds an &nbsp; then clicks Design and back to HTML, the entity is translated to a space.  I narrowed down the issue to the the ConvertToXhtml content filter by a process of elimination.

Is this expected behavior?  I did notice that Firefox doesn't exhibit the same behavior--only IE 8.  I didn't try IE7 or Chrome.

I don't really care for the result--I'd like to keep XHTML formatting, but I don't really have a choice since the &nbsp; is more critical to the CMS.

Here's how to reproduce the issue:

1)  Create a page with the following markup:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebpPrototype._Default" %>
  
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
    <telerik:RadEditor ID="RadEditor1" runat="server" Skin="Black" ContentFilters="ConvertToXhtml,RemoveScripts,FixUlBoldItalic,IECleanAnchors,FixEnclosingP,MozEmStrong,ConvertFontToSpan,IndentHTMLContent,OptimizeSpans">
    </telerik:RadEditor>
    </div>
      
    </form>
</body>
</html>

2)  View the page in the browser.  Click HTML.  Add an &nbsp; to the content.  Click design.  Click back and the &NBSP; has been replaced with spaces.
3)  In the page markup, remove the ConvertToXhtml form the ContentFilters.  Repeat and see the expected results.

Radoslav
Telerik team
 answered on 18 Oct 2010
2 answers
167 views
Dear Sir/ Madam

I have some problem

I have a page and a popup(radwindow) is opening from that page. How can i access any control of parent page on popup page.
Querystring or session won't solve my problem.



Thanks
Chandan kumar
Chandan Kumar
Top achievements
Rank 1
 answered on 18 Oct 2010
3 answers
116 views
Hi I am using version 7.1.1.0 of the Ajax RadEditor and cannot upgrade. I need to strip out all Word tags and HTML with the exception of bold, italic, underline and some special characters like trademark, and copywright.

I added the following javascript from the documentation so I can strip the tags on the sumbit :

<script type='text/javascript'>

function OnClientLoad(editor, args)

{

editor.add_submit(function ()

{

editor.fire('SelectAll');

editor.fire('FormatStripper', {value : 'WORD'});

alert(editor.get_html());

});

}

</script>



when the page loads I receive the following javascript alert: 
"Exception while exeduting client event OnClientLoad Error:Object doesn't support this property or method"

Again all I need to do is remove all word tags, script, span, and div tags.

Rumen
Telerik team
 answered on 18 Oct 2010
1 answer
79 views
I have a listbox used for reordering.  IN the aspx page it is defined thus:

<

 

 

telerik:RadListBox ID="RadListBox1" runat="server" AllowReorder="True"

 

 

 

AppendDataBoundItems="True" DataSourceID="SqlDataSource1" DataTextField="Input"

 

 

 

DataValueField="TestTakerOrderID" EnableDragAndDrop="True" Font-Size="Medium"

 

 

 

Width="360px" >

 

 

 

<buttonsettings showreorder="False" />

 

 

 

</telerik:RadListBox>

 



From everything I can gather the "Showrerder="false" should hide the reorder buttons; thus allowing only drag and drop.  That is not the case.  The buttons always appear.  How can I not show them but still allow drag and drop reordering?

Shawn
Shinu
Top achievements
Rank 2
 answered on 18 Oct 2010
1 answer
116 views

 
In the following code i have specified DataKeyNames as "id , abbrev" but while binding to the grid I dont need to show the "id" column.
In this case, how can I fetch the "id" key column using client side API.

<MasterTableView  DataKeyNames="id,abbrev" ClientDataKeyNames="id,abbrev">
<Columns>
    <telerik:GridBoundColumn DataField="Abbrev" HeaderText="Abbreviation" />
    <telerik:GridBoundColumn DataField="MyName" HeaderText="My Name"/>
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>

Shinu
Top achievements
Rank 2
 answered on 18 Oct 2010
1 answer
101 views
I have a radgrid displayed with columns from a table and with a checkbox column on left which allows selection.....i have enabled multiple row selections...I have a button on the page by clicking it i should be able to insert all the selected records into other table....can you tell me how to do multiple  row insertions on button click event....
Shinu
Top achievements
Rank 2
 answered on 18 Oct 2010
1 answer
307 views
Hi,

I need to use the drag and drop feature of the RadGrid, so I checked out the demo (http://demos.telerik.com/aspnet-ajax/grid/examples/programming/draganddrop/defaultcs.aspx). Unfortunately, the way Telerik demostrates how to use this feature is not suitable for my situation. The following are the main two reasons (staying in the demo context: shipped and pending orders):

 

  1. Telerik uses the Session variable to store the shipped and pending orders. In my case multiple pages will be opened; a user will open pages to view and compare the different orders. Therefore, storing the orders in the session will not work since when a row is dragged both windows will be affected by the changes upon postback.
  2. On Row drop event, Telerik retreives the entities again, then inserts and deletes the dragged items from the entities's collection and afterwards, rebinds the grids. I don't understand why this has to be done this way. Why can't we manipulate the GridDataItems instead? We would just have to moved the GridDataItems, no need to retrieve the data source again and play around with the data source. Furthermore, in my scenario, the rows in the grid are added dynamically by the user. When a row is added, it is not yet saved in the database, the new records added to the RadGrid and the data will only be saved in the database when the user clicks "save". Playing with the entities's collection will not work in this case since it is not yet aware of the new rows added...

With all this being said, how can I implement the drag and drop feature to properly fit my scenario? Maybe having the drag and drop feature only client side, that would probably work...

Here's a short example of what I wish to acheive (server side):

<h2>Pending Orders</h2>
<telerik:RadGrid runat="server" ID="grdPendingOrders" OnNeedDataSource="grdShippedOrders_NeedDataSource" OnRowDrop="grdShippedOrders_RowDrop" AllowMultiRowSelection="true">
    <MasterTableView DataKeyNames="OrderId">
        <Columns>
            <telerik:GridDragDropColumn Visible="false" />
        </Columns>
    </MasterTableView>
    <ClientSettings AllowRowsDragDrop="True">
        <Selecting AllowRowSelect="True" EnableDragToSelectRows="false" />
    </ClientSettings>
</telerik:RadGrid>
  
<h2>Shipped Orders</h2>
<telerik:RadGrid runat="server" ID="grdShippedOrders" OnNeedDataSource="grdShippedOrders_NeedDataSource" OnRowDrop="grdShippedOrders_RowDrop" AllowMultiRowSelection="true">
    <MasterTableView DataKeyNames="OrderId">
        <Columns>
            <telerik:GridDragDropColumn Visible="false" />
        </Columns>
    </MasterTableView>
    <ClientSettings AllowRowsDragDrop="True">
        <Selecting AllowRowSelect="True" EnableDragToSelectRows="false" />
    </ClientSettings>
</telerik:RadGrid>
protected void grdShippedOrders_RowDrop(object sender, GridDragDropEventArgs e)
{
    foreach (var item in e.DraggedItems)
    {
        grdShippedOrders.MasterTableView.InsertItem(item); //add to destination
        grdPendingOrders.MasterTableView.PerformDelete(item); //remove from source
    }
}
  
protected void grdPendingOrders_RowDrop(object sender, GridDragDropEventArgs e)
{
    foreach (var item in e.DraggedItems)
    {
        grdPendingOrders.MasterTableView.InsertItem(item);  //add to destination
        grdShippedOrders.MasterTableView.PerformDelete(item); //remove from source
    }
}

Hope my explanation is clear and thanks for your support.

Eric





Veli
Telerik team
 answered on 18 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?