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

I am working off of the demo code for Rad Grid drag and drop functionality, and I cannot seem to get any values in the DraggedItems collection on the RowDrop server event. 

In the following code, e.HtmlElement = "" and e.DraggedItems.Count = 0.  Has anyone run into the same issue?  Am I missing something here.  I do not need to use any of the client events, so nothing is being affected by OnRowDropping.  I am basically just dragging to reorder within the grid.  Any help would be appreciated.

 FYI, this grid is within a user control within an ASP.NET Ajax Tab Control, not the telerik tab control.  The UI does not reflect the item that I am dragging, when I am dragging it.  It just shows an thin line (like an empty row).  If I drag off of the grid, then select another item, and drag again, it will show an item being dragged and the code below works fine, then if I try again it does not.

 

Protected Sub grdQuoteDetails_RowDrop(ByVal sender As Object, ByVal e As GridDragDropEventArgs)
    If String.IsNullOrEmpty(e.HtmlElement) Then
        If e.DraggedItems(0).OwnerGridID = grdQuoteDetails.ClientID Then
            ' items are drag from quote details 
            If e.DestDataItem IsNot Nothing AndAlso e.DestDataItem.OwnerGridID = grdQuoteDetails.ClientID Then
                'reorder items in pending grid
                Dim pendingDetails As IList(Of Model.QuoteDetail)
                pendingDetails = PendingQuoteDetails
                Dim quoteDetail As Model.QuoteDetail = GetQuoteDetail(pendingDetails, DirectCast(e.DestDataItem.GetDataKeyValue("ID"), Integer))
                Dim destinationIndex As Integer = pendingDetails.IndexOf(quoteDetail)
                If ((e.DropPosition = GridItemDropPosition.Above) _
                        AndAlso (e.DestDataItem.ItemIndex > e.DraggedItems(0).ItemIndex)) Then
                    destinationIndex = (destinationIndex - 1)
                End If
                If ((e.DropPosition = GridItemDropPosition.Below) _
                        AndAlso (e.DestDataItem.ItemIndex < e.DraggedItems(0).ItemIndex)) Then
                    destinationIndex = (destinationIndex + 1)
                End If
                Dim detailsToMove As New List(Of Model.QuoteDetail)()
                For Each draggedItem As GridDataItem In e.DraggedItems
                    Dim tmpDetail As Model.QuoteDetail = GetQuoteDetail(pendingDetails, DirectCast(draggedItem.GetDataKeyValue("ID"), Integer))
                    If tmpDetail IsNot Nothing Then
                        detailsToMove.Add(tmpDetail)
                    End If
                Next
                For Each detailToMove As Model.QuoteDetail In detailsToMove
                    pendingDetails.Remove(detailToMove)
                    pendingDetails.Insert(destinationIndex, detailToMove)
                Next
                PendingQuoteDetails = pendingDetails
                grdQuoteDetails.Rebind()
            End If
        End If
    End If
End Sub

Andrey
Telerik team
 answered on 26 Jan 2012
2 answers
91 views
Hi,
Simple question. Is it possible to remove telerik styles? My purpose is to make it look with OS default style. Just like standard select element with not style enhancements. Sorry for my broken english. Thanks in advance.
Zÿm
Top achievements
Rank 1
 answered on 26 Jan 2012
1 answer
130 views
Hello,

My application is in ASP.NET 4.0.
I have a Rad Editor rich text and when i put an image in the editor i have a Exception ASP.NET on validation.

A potentially dangerous Request.Form value was detected from the client.

Have you an idea of the problem ?

Thanks
Richard
Top achievements
Rank 1
 answered on 26 Jan 2012
5 answers
129 views

Grid sorts by a column that is defined as string in the datasource. As a result, the order of the groups is like this:

Group 1
Group 10
Group 11
Group 2
Group 3

I cannot change the column type in the datasource because it might break too many other things. Adding

<telerik:GridTemplateColumn DataType="System.Int32"

to the grid markup did not help.

Is there anything else I can try?

-Stan
Antonio Stoilkov
Telerik team
 answered on 26 Jan 2012
1 answer
156 views
I am using Rad Editor on my xyz.aspx page inside Rad Panes. I am setting the Rad Editor height to 100% but its not having any effect. If I give height in pixel than its getting effect. But I can't use pixel as the user may change browser size, so its better to use percentage.

HELP!!!!!!
Rumen
Telerik team
 answered on 26 Jan 2012
5 answers
170 views
I am creating the OrgChart using the demos found and i have come to a style issue with the second and subsequent rows for a group.  When i set the DisableDefaultImage to true the subsequent rows are still showing the placeholder for the image.  Is there something wrong in my code?  Please review:

<telerik:RadOrgChart ID="radOrgChart" runat="server" GroupColumnCount="4" DisableDefaultImage="true" Skin="Sitefinity">
    <RenderedFields>
        <ItemFields>
            <telerik:OrgChartRenderedField DataField="FullName"/>
            <telerik:OrgChartRenderedField DataField="Title" />
            <telerik:OrgChartRenderedField DataField="ProfileLink" />
        </ItemFields>
    </RenderedFields>
</telerik:RadOrgChart>
//Table to define the nodes
DataTable nodeTable = new DataTable();
nodeTable.Columns.Add("ID");
nodeTable.Columns.Add("ManagerID");
 
//Table to hold the data for the items
DataTable itemsTable = new DataTable();
itemsTable.Columns.Add("NodeID");
itemsTable.Columns.Add("ID");
itemsTable.Columns.Add("FullName");
itemsTable.Columns.Add("Title");
itemsTable.Columns.Add("ProfileLink");
 
//Get Contacts Manager
var tmpCM = ContactMgr.GetContactByID(ContactToDisplay.ManagerID);
 
//Get Contacts Managers manager
var tmpCMM = ContactMgr.GetContactByID(tmpCM.ManagerID);
 
//Get Contacts Managers employees
var tmpCME = ContactMgr.GetEmployeesByManagerID(tmpCM.ID);
 
//Add the nodes to the nodesTable
nodeTable.Rows.Add(new string[] { "1", null});
nodeTable.Rows.Add(new string[] { "2", "1"});
nodeTable.Rows.Add(new string[] { "3", "2" });
 
//Add the details of the employees to the itemTable
itemsTable.Rows.Add(new string[] { "1", tmpCMM.ID.ToString(), "<b>" + tmpCMM.FullName + "</b>", tmpCMM.Title, "<a href='/contacts/detail.aspx?id=" + tmpCMM.ID + "'>View Details</a>" });
itemsTable.Rows.Add(new string[] { "2", tmpCM.ID.ToString(), "<b>" + tmpCM.FullName + "</b>", tmpCM.Title,  "<a href='/contacts/detail.aspx?id=" + tmpCM.ID + "'>View Details</a>" });
foreach (Directory_BO.Contact tmpC in tmpCME)
    itemsTable.Rows.Add(new string[] { "3", tmpC.ID.ToString(), "<b>" + tmpC.FullName + "</b>", tmpC.Title,  "<a href='/contacts/detail.aspx?id=" + tmpC.ID + "'>View Details</a>" });
 
//Setup the relationships within the OrgChart
radOrgChart.GroupEnabledBinding.NodeBindingSettings.DataFieldID = "ID";
radOrgChart.GroupEnabledBinding.NodeBindingSettings.DataFieldParentID = "ManagerID";
radOrgChart.GroupEnabledBinding.NodeBindingSettings.DataSource = nodeTable;
 
radOrgChart.GroupEnabledBinding.GroupItemBindingSettings.DataFieldNodeID = "NodeID";
radOrgChart.GroupEnabledBinding.GroupItemBindingSettings.DataFieldID = "ID";
radOrgChart.GroupEnabledBinding.GroupItemBindingSettings.DataSource = itemsTable;
 
//Bind the OrgChart
radOrgChart.DataBind();
Chris Salas
Top achievements
Rank 1
 answered on 26 Jan 2012
1 answer
71 views
We are having a problem with Rad Editor in DotNetNuke 6. The media manager calls up a dialog box for selecting the file you want, but the file system is completely unpopulated--no files or file folders appear and all three columns of the manager are empty. Clicking the "refresh" button does nothing. Any idea what might be going on and how we could fix it?

Thanks

Colin Moser
The Corymb Group, LLC
Richard
Top achievements
Rank 1
 answered on 26 Jan 2012
2 answers
130 views
I've tried setting: ContentFilters="None" and it still happens.
I can reproduce this on your "First Look" demo too.

Just open Notepad or something and create a document with some spaces like this:

Line 1
Line 2

Line 4

Line 6

Line 8
Line 9


Then use "CTRL+A" to select, CTRL+C to copy and then paste that into the RadEditor.
All the line breaks get doubled.
Help!!!!
Sam
Top achievements
Rank 1
 answered on 26 Jan 2012
16 answers
242 views
Dear All,

I have 3 tabs in a tab strip and 3 multi page views. inside these multi page views are three tables i.e. code of three pages one by one.

First multipageview contains a form with a few text fields etc. When I use validation controls, like required field validation, on first tab's form it do not allow me to go to the next tab untill the validation is done on the form. I want it to go to next tab without validation. or in other words I want it to do validation only on the button clicked on respective tab, not when a tab is clicked.

Please help.
Toboy
Top achievements
Rank 1
 answered on 26 Jan 2012
1 answer
242 views
Hi guys.

I have been trying a lot of ways to fix this issue but it seems to be impossible.
I am developing a web app whit 3.5 framework ant telerik controls version 2009.3.1314.0. I have a Main page that uses a Master page and from javascript I open a radWindow that is set to modal. When the modal window is opening for the first time the loading circle icon appears but when I save the form in the modal window no icon appears.
This is an example of my code in main page:

<telerik:RadCodeBlock ID="RadCodeBlockBoleta" runat="server">
     <script type="text/javascript">
            function OpenDetail(cod1, cod2, action) {
  
                    var wnd = window.radopen('<%= ConfigurationManager.AppSettings["AppWeb"] %>Posicion/NewDetails.aspx?cti=' + cod1+ "&nb=" + cod2+ "&action=" + action, "DetailsPage");
                    wnd.set_modal(true);
                    wnd.set_autoSize(false);
                    wnd.setSize(1100, 380);
                    wnd.set_visibleStatusbar(false);
                    wnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move);
                    wnd.center();
                    return false;
            }
    </script>
</telerik:RadCodeBlock>


Now, NewDetails.aspx is a RadWindow form that uses another Master Page (MasterModal.Master). The ASPX code from that MasterModal.Master is:
 
<html>
<body class="BodyModal" style="background-color: #ebf4f7; position:relative; " >
    <form id="form1" runat="server" >
    <asp:HiddenField runat="server" ID="opSalir" Value="" />
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <telerik:RadAjaxPanel ID="RadAjaxPanelMessage" runat="server" EnableEmbeddedScripts="true">
    </telerik:RadAjaxPanel>
    <div style="text-align: center; width: 100%">
        <div style="text-align: left; ">
            <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
            </asp:ContentPlaceHolder>
        </div>
    </div>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        <Windows>
        <telerik:RadWindow ID="rwConfirm" runat="server" OnClientClose="OnClientClose" Title="Confirmación" ReloadOnShow="true"
                ShowContentDuringLoad="true" Modal="true" AutoSize="true" VisibleStatusbar="false"
                Behaviors="Close" VisibleTitlebar="true" KeepInScreenBounds="True" PreventClientCache="true"
                DestroyOnClose="true">
        </telerik:RadWindow>
               <telerik:RadWindow ID="UserListDialog" runat="server" Title="Editing record" 
            ReloadOnShow="true"  ShowContentDuringLoad="false" Modal="true"/>
           <telerik:RadWindow ID="RadFavoritoCampo" runat="server" OnClientClose="OnClientClose" Title="Campos" ReloadOnShow="true"
                ShowContentDuringLoad="false" Modal="true">
        </telerik:RadWindow>
        <telerik:RadWindow ID="RadEmpresa" runat="server" OnClientClose="OnClientClose" Title="Empresa" ReloadOnShow="true"
                ShowContentDuringLoad="false" Modal="true">
        </telerik:RadWindow>
  
         <telerik:RadWindow ID="RadTest" runat="server" OnClientClose="OnClientClose" Title="Test" ReloadOnShow="true"
                ShowContentDuringLoad="false" Modal="true">
        </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    </form>
</body>
</html>

And finally, the ASPX code in NewDetail.aspx is
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  
<telerik:RadAjaxManager runat="server" ID="RadAjaxManager1"></telerik:RadAjaxManager>
<asp:Panel runat="server" ID="Panel1" >
  
<div>
   //SOME HTML with textboxes, labels, etc
    <asp:Button ID="BtnSave" runat="server" Text="Save" Width="100px" style="left:760px; top: 310px; position: absolute;"
                  CssClass="cssBoton" onclick="BtnSave_Click" />
               
     <input id="BtnExit" class="cssBoton" title="Exit" type="button" style="left:870px; top: 310px; position: absolute;width: 100px" value="Exit" onclick="return BtnExit_onclick()" />
</div>
</asp:Panel>
  
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="WebBlue">
</telerik:RadAjaxLoadingPanel>
  
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="BtnSave">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
</asp:Content>

this piece of code <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1"></telerik:RadAjaxManager> is causing a javascript error in this line : c.get_request()._get_eventHandlerList()._list.completed.reverse();
If I remove the RadAjaxManager tag everything works without showing the loading icon. With the RadAjaxManager code the javascript error occurs.

Any Ideas?

Thank you very much.
Iana Tsolova
Telerik team
 answered on 26 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?