Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
52 views
I have a postion table that I drag and drop personnel to positions, however they want the ability to lock out positions.  So what I do is put a number in a field in the db that pulls into the grid.  I turn this number invisible for the column but now how can I lock out the row from being dropped to in the drag and drop event.  Only using code behind so i am using the rowDrop event.
Protected Sub myGridSoldier_RowDrop(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridDragDropEventArgs) Handles myGridSoldier.RowDrop
  
        If e.DestDataItem.OwnerTableView.ClientID = myGridPositions.MasterTableView.ClientID Then
            For i As Integer = 0 To e.DraggedItems.Count - 1
                Dim SSN As String = e.DraggedItems(i).GetDataKeyValue("SSN")
                Dim PositionId As Integer = e.DestDataItem.GetDataKeyValue("intPositionId")
  
                HFSSN.Value = SSN
                HFPosition.Value = PositionId
  
                FillInfo(SSN, PositionId)
  
                pnlSoldierInfo_POP.Show()
            Next
        End If
    End Sub
Mira
Telerik team
 answered on 31 Aug 2011
3 answers
106 views

Goodafternoon,

I’ve got a problem with a AjaxLoadingPanel display on the iPad (latest version -> safari browser)
 
What happens:
 
The page is divided in to two Panels:
* oPanelTop (containing information)
* oPanelAll (containing the listview)

A RadListView is being populated from serverside.
A listview item contains 1 image, inputfield, and one button

On the ItemCreated, listviewitem, event I’m linking the button, from listviewitem,  with the AjaxLoadingPanel and the oPanelTop.

code: RadAjaxManager2.AjaxSettings.AddAjaxSetting(oLinkButton, oPanelTop, oRadAjaxLoadingPanel);

Client side the oRadAjaxLoadingPanel is defined as follows:

<telerik:RadAjaxLoadingPanel runat="server" ID="oRadAjaxLoadingPanel" Transparency="30" Skin="" MinDisplayTime="2000">

    <div style="height: 70px; background-color: #EEEEEE;">

        <asp:Label ID="Label1" runat="server" Text="Adding…" />

    </div>

</telerik:RadAjaxLoadingPanel>

The page works well, as it supposed to be, on the following browsers:

IE8, IE9, FireFox, Chrome, Safari (desktop)

The page fails on Safari(iPad).
I get the feeling that on the ipad the button action is triggered twice, or something like that, because:

1st time clicked on a button from listview => site response normaly (hiding AjaxLoadingPanel)
2nd time clicked on a  button from (random) listviewitem =>

The page shows the transparent box over the oTopPanel (like first time). But then The transparent box darkens (2nd AjaxLoadingPanel? Overlaying the existing visible ajaxloadingpanel) and after 2 seconds it lightens (disposing 1st ajaxloadingpanel?), but then remains visible, making it unable to click the controls underneath it.

I Have already tried the following:

Serverside => create an AjaxSetting object with various options
ClientSite => Create the AjaxSetting separate from existing AjaxSetting (so things won’t mix up)

Non has the result I suspected.

The Problem is : AjaxLoadingPanel stays visible even after Displaytime has elapsed.
(only on iPad Safari)

Is there a way to solve this problem.

Thanks in advance.
Marin
Telerik team
 answered on 31 Aug 2011
1 answer
91 views
In my share point application user control, I have a RadEditor and a hyper link. clicking on the hyperlink would open a modaldialog. when user select some data and click on apply button in the modaldialog, the data should automatically insert into the RadEditor. How to achieve this?
Rumen
Telerik team
 answered on 31 Aug 2011
1 answer
63 views
Hi,
I am selecting particular row using linkbutton client side click event .for that i am using following code
 function Edit(control, rowIndex,reportName) {
            var grid = $find("ctl00_ContentPlaceHolder1_rgReportList");
            grid.MasterTableView.selectItem(rowIndex);
        }

This is working fine .
There are buttons in command template which are enables when checkbox of select column is checked ,
but while selecting row using javascript it is not happening.
Kindly suggest for the above.

I am using following markup for commadtemplate and columns.
 <CommandItemTemplate>
                            <telerik:RadToolBar ID="rtbReports" runat="server" OnClientButtonClicked="onToolBarClientButtonClicking"
                                Height="26px" Skin="Office2007" Width="100%">
                                <Items>
                                    <telerik:RadToolBarButton Text="<%$ Resources:New %>" CommandName="<%$ Resources:New %>"
                                        ImageUrl="~/Images/NewEnable2.png" Enabled='<%# rgReportList.EditIndexes.Count == 0 %>'>
                                    </telerik:RadToolBarButton>
                                    <telerik:RadToolBarButton Text="<%$ Resources:Delete %>" CommandName="<%$ Resources:Delete %>"
                                        ImageUrl="~/Images/imgDelBtnEnable.png" Enabled='<%# rgReportList.EditIndexes.Count > 0 %>'>
                                    </telerik:RadToolBarButton>
                                    <telerik:RadToolBarButton Text="<%$ Resources:Edit %>" CommandName="<%$ Resources:Edit %>"
                                        ImageUrl="~/Images/imgEditBtnEnable.png" Enabled='<%# rgReportList.EditIndexes.Count > 0 && rgReportList.EditIndexes.Count == 1%>'>
                                    </telerik:RadToolBarButton>
                                    <telerik:RadToolBarButton Text="<%$ Resources:Copy %>" CommandName="<%$ Resources:Copy %>"
                                        ImageUrl="~/Images/imgCopyBtnEnable.png" Enabled='<%# rgReportList.EditIndexes.Count > 0 && rgReportList.EditIndexes.Count == 1%>'>
                                    </telerik:RadToolBarButton>
                                    <telerik:RadToolBarButton CssClass="rightAligned">
                                        <ItemTemplate>
                                            <table style="background-color: White;" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td valign="middle" style="width: 20px;" align="center">
                                                        <asp:Image ID="imgSearch" runat="server" ImageUrl="~/Images/Search-icon3.png" />
                                                    </td>
                                                    <td valign="middle">
                                                        <telerik:RadTextBox ID="txtsearchreports" runat="server" AutoPostBack="True" MaxLength="20"
                                                            OnTextChanged="txtsearchreports_TextChanged" EmptyMessage="<%$ Resources:EnterToSearch %>"
                                                            Width="200px" EnableViewState="true" CssClass="txtSearch">
                                                        </telerik:RadTextBox>
                                                    </td>
                                                </tr>
                                            </table>
                                        </ItemTemplate>
                                    </telerik:RadToolBarButton>
                                </Items>
                            </telerik:RadToolBar>
                        </CommandItemTemplate>

<Columns>
                            <telerik:GridClientSelectColumn  HeaderStyle-Width="35px"
                                ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" Resizable="false">
                            </telerik:GridClientSelectColumn>
                            <telerik:GridTemplateColumn UniqueName="ReportName" HeaderText="<%$ Resources:ReportName %>"
                                HeaderStyle-Width="30%" SortExpression="ReportName" ShowSortIcon="true">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkReportName" runat="server" Text='<%#Eval("ReportName")%>'
                                        Font-Underline="true"></asp:LinkButton><%--OnClientClick="Edit(this);"--%>
                                    <asp:HiddenField ID="hdnReportName" runat="server" Value='<%#Eval("ReportName")%>' />
                                </ItemTemplate>
                                  <ItemStyle Wrap="false" />
                                  <HeaderStyle Wrap ="false" />
                            </telerik:GridTemplateColumn>
 </Columns>
Veli
Telerik team
 answered on 31 Aug 2011
1 answer
166 views
Hi
I have the following telerik:RadTreeList 

<telerik:RadTreeList ID="RadTreeListFacility" runat="server" DataKeyNames="Key" ParentDataKeyNames="SuperiorFacilityID"
        AutoGenerateColumns="False" Width="100%" AllowMultiItemEdit="False" Culture="(Default)"
        OnNeedDataSource="RadTreeListFacility_NeedDataSource">
        <Columns>
            <telerik:TreeListSelectColumn UniqueName="SelectColumn" Visible="false" />
            <telerik:TreeListBoundColumn DataField="Name" UniqueName="Name" HeaderText="Display Name" />
            <telerik:TreeListBoundColumn DataField="Key" UniqueName="Key" HeaderText="Unique ID" />
            <telerik:TreeListBoundColumn DataField="FacilityType" UniqueName="FacilityType" HeaderText="Type" />
            <telerik:TreeListBoundColumn DataField="SuperiorFacilityID" UniqueName="SuperiorFacilityID"
                HeaderText="Parent ID" Visible="false" />
            <telerik:TreeListTemplateColumn ItemStyle-Width="100px" HeaderStyle-Width="100px">
                <HeaderTemplate>
                </HeaderTemplate>
                <ItemTemplate>
                    <span onclick="Edit_OnClick({Key:'<%# Eval("Key") %>',Name:'<%# Eval("Name")%>',SID:'<%# Eval("SuperiorFacilityID")%>',Type:'<%# Eval("FacilityType")%>'});">
                        <img src="../../images/DataEditing/Edit.gif" title="Update Selected Clinic" alt="Update Selected Clinic" />
                    </span>
                    <span onclick="AddSubFacility_OnClick({SID:'<%# Eval("Key")%>'});">
                        <img src="../../images/DataEditing/AddRecord.gif" title="Add Below Selected Clinic"
                            alt="Add Below Selected Clinic" />
                    </span>
                    <span onclick="Delete_OnClick({Key:'<%# Eval("Key") %>',Name:'<%# Eval("Name")%>'});">
                        <img src="../../images/DataEditing/Delete.gif" title="Delete Selected Clinic" alt="Delete Selected Clinic" />
                    </span>
                </ItemTemplate>
            </telerik:TreeListTemplateColumn>
        </Columns>
        <ClientSettings AllowPostBackOnItemClick="false">
            <Selecting AllowItemSelection="true" AllowToggleSelection="true" />
        </ClientSettings>
    </telerik:RadTreeList>


This tree has only one root node element.
Using Javascript I want to get hold of the Root element.
I have tried
var tree = $find("<%= RadTreeListFacility.ClientID %>");
var node0 = tree.get_nodes().getNode(0);


This dose not work


Also I would like to know how to get values the Key and the Name DataField values of the root node client side. Thanks in advance. Tejas
Tsvetina
Telerik team
 answered on 31 Aug 2011
1 answer
44 views
Hello,

I need help to retrieve and save into DB through grid.

Scenario:
I have one main grid , and this grid Contain three column , Menu name , Assigned school, and Select school ....

When User create a New menu and save, then Immediately Menu name Displayed in the grid , now The select school Column contain the Drop down for each grid row contain the School name with the Check box.

I want to implement feature here is "

When User check the check box of any school /s from this drop down , after out of focus from this Drop down , checked value (School) stored in to DB, and Refresh my grid / page , and Immediately shows the selected school in my "Assigned School" column of the Grid..

How can i do this, ?  Possible send me the example , that would great great help...

REgards
Samir
Veli
Telerik team
 answered on 31 Aug 2011
14 answers
938 views
Hi there,

I'm having trouble to get the insert values of my grid. My grid does on every postback a databind and it seems, that if that is done, the insert values are gone. If I don't databind on every postback, the grid doesn't show up (no columns, no rows).

My code to get the values is this:

Dim insertedItem As GridEditFormInsertItem = TryCast(e.Item, GridEditFormInsertItem)
 
Dim test As Object = TryCast(insertedItem.FormColumns(0).Controls(0).Controls(1).Controls(0), TextBox)

test.Text should contain the value, but it doesn't. Do you have any idea?

Thanks and regards,
Mark
Jayesh Goyani
Top achievements
Rank 2
 answered on 31 Aug 2011
1 answer
134 views
Hi Telerik,

I can't get my RadWindow to size below 150px and I don't know why! It seems super trivial. I've applied the normal CSS fixes. There's no auto-height going on, and I've set dimensions for all my controls. What do you guys think?

Relevant Code:

html, form, body
{
    padding: 0;
    margin: 0;
    width: 250px;
    height: 100%;
    font-size: 12px;
    font-family: "segoe ui",arial,sans-serif;
}
 
.LabelEnabled
{
    color: Black !important;
}
 
.LabelDisabled
{
    color: Gray !important;
}
 
.riTextBox
{
    color: Black !important;
}
 
.BottomButton
{
    margin-left: 93px;
}

<%@ Page Language="C#" EnableViewState="False" AutoEventWireup="True" CodeBehind="UploadDashboard.aspx.cs" Inherits="CableSolve.Web.Dashboard.Dialog.Windows.UploadDashboard" %>
 
<!DOCTYPE html>
 
<html lang="en">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <link rel="stylesheet" type="text/css" href="../../../Content/Dashboard/UploadDashboard.css" />
 
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        </telerik:RadScriptManager>
 
        <telerik:RadUpload ID="RadUpload1" Runat="server" AllowedFileExtensions=".txt,.xml" Skin="Web20" MaxFileInputsCount="1" ControlObjectsVisibility="None" Height="44px" Width="238px" BorderWidth="0px" >
        </telerik:RadUpload>
 
        <div class="BottomButton">
            <telerik:RadButton ID="RadButton1" Runat="server" Skin="Web20" Text="Upload" OnClick="RadButton1_Click" Height="22px" Width="54px" />
        </div>
 
    </form>
</body>
</html>

<telerik:RadWindowManager ID="RadWindowManager1" Runat="Server" Skin="Web20" Modal="True" KeepInScreenBounds="True" EnableShadow="True" Behaviors="Close, Move" VisibleStatusbar="False" ReloadOnShow="True" ShowContentDuringLoad="False" Behavior="Close, Move" Title="Confirm Action" IconUrl="~/Content/Dashboard/Icons/radwindow_confirmdelete.png">
    <Windows>
        <telerik:RadWindow ID="UploadDashboardWindow" Runat="Server" NavigateUrl="~/Dashboard/Dialog/Windows/UploadDashboard.aspx" IconUrl="~/Content/Dashboard/Icons/drive-upload.png" OnClientAutoSizeEnd="OnClientAutoSizeEnd" Title="Upload Dashboard" Height="100" />
    </Windows>
</telerik:RadWindowManager>

// When a dialog window appears on the page, it does not automatically
// keep itself centered. If the user resizes the browser window, the
// dialog window may drop off the screen. This method keeps dialog windows shown.
function OnClientAutoSizeEnd(dialogWindow) {
    dialogWindow.center();
}

The OnClientAutoSizeEnd event doesn't fire. It's just boilerplate code I've been attaching to all my windows and I show it to be unambiguous with the state of my window.

The only thing I can think of is that there's something weird going on with the Upload control? Its generated markup is more complex than expected.

Thanks

Sean
Marin Bratanov
Telerik team
 answered on 31 Aug 2011
3 answers
325 views

Occasionally, I got the same message Sys.WebForms.PageRequestManagerParserErrorException:: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error Parsing near 'Telerik.Web.UI.2008.'.
I thought it only happened on Telerik 2007 version. Are you sure it caused by my version is still a trial version one or something else ?

John Hadikusumo
Sebastian
Telerik team
 answered on 31 Aug 2011
2 answers
41 views
Hi,

on Sharepoint 2010 we create an ASPX Layout Page with multiple PageViews. The PageViews are dynamically added to TabStrip by code-behind. If we put the RadUpload in the PageView it doesn't shows the File-Input Control. After first click on "Upload"-Button the input is visible and can be used. I think the problem is related to the postback of TabStrip-Click ... but how to prevent/to require a full postback to the current PageView ...

Screenshot:


ASPX Page:
<telerik:radformdecorator id="FormDecorator1" runat="server"  DecoratedControls="all" Skin="Windows7" ControlsToSkip="Fieldset"></telerik:radformdecorator
 <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1" Transparency="25" BackgroundPosition="Center">
        <div style="vertical-align:middle;text-align:center;width:100%;height:100%;background-color:white;font-weight:bolder;font-size:large">
            <img src="/_layouts/images/IFXForms/loading1.gif" alt="Loading ..." />
        </div>
 </telerik:RadAjaxLoadingPanel>
 
         <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                        <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="LoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="LoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
 
        <script type="text/javascript">
 
            function onTabSelecting(sender, args) {
                if (args.get_tab().get_pageViewID()) {
                    args.get_tab().set_postBack(false);
                }
            }
        </script
<table>
<tr>
    <td valign="top">
<asp:UpdatePanel runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional" ID="formUpdatePanel">  
<ContentTemplate>          
       <div style="padding-top: 10px;">
            <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="LoadingPanel1">
                <div style="float:left; width:900px">
                    <telerik:RadTabStrip ID="RadTabStrip1" OnClientTabSelecting="onTabSelecting" SelectedIndex="0" runat="server" MultiPageID="RadMultiPage1" OnTabClick="RadTabStrip1_TabClick"
                         CssClass="tabStrip">
                    </telerik:RadTabStrip>
                    <div style="padding: 10px;border-style:solid;border-width:1px">
                    <asp:Literal ID="lMessage" runat="server" visible="false"></asp:Literal>
                   <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated" CssClass="multiPage">
                    </telerik:RadMultiPage>
                    </div>
                </div>
                <div class="previewWrapper">
 
                </div>
            </telerik:RadAjaxPanel>
        </div>
        <br/>
</ContentTemplate>
</asp:UpdatePanel>

ASPX code-behid:
protectedvoidPage_Load(objectsender, EventArgs e)
{
    initTabs();
    if(!Page.IsPostBack)
    {
        Filename = this.Request.QueryString.Get("data");
        itprData = deserializeData();
        lPageTitle.Text = string.Format("Purchase Request {0} ({1})", itprData.ID, itprData.ActiveStepID.ToString());
        lPageTitleInTitleArea.Text = string.Format("Purchase Request {0}", itprData.ID);
        foreach(KeyValuePair<string, string> pair intabs)
        {
            AddTab(pair.Key);
        }
        AddPageView(RadTabStrip1.FindTabByText("Request Info"));
    }
}      
privatevoidAddTab(stringtabName)
{
    RadTab tab = newRadTab();
    tab.Text = tabName;
  
    RadTabStrip1.Tabs.Add(tab);
}
  
protectedvoidRadMultiPage1_PageViewCreated(objectsender, RadMultiPageEventArgs e)
{
    stringuserControlName = e.PageView.ID + ".ascx";
  
    Control userControl = Page.LoadControl("~/_controltemplates/IFXForms/ITPR/"+ userControlName);
    userControl.ID = e.PageView.ID + "_userControl";
  
    e.PageView.Controls.Add(userControl);
}
  
privatevoidAddPageView(RadTab tab)
{
    RadPageView pageView = newRadPageView();
    pageView.ID = tabs[tab.Text];
    RadMultiPage1.PageViews.Add(pageView);
    pageView.CssClass = "pageView";
    tab.PageViewID = pageView.ID;
}
  
protectedvoidRadTabStrip1_TabClick(objectsender, RadTabStripEventArgs e)
{
    AddPageView(e.Tab);
    e.Tab.PageView.Selected = true;
}

PageView Control ASCX:

<telerik:RadScriptBlock ID="RadScriptBlock12" runat="server">
 <script type="text/javascript">
     // on upload button click temporarily disables ajax to perform
     // upload actions
     function conditionalPostback(sender, args) {
         if (args.get_eventTarget() == "<%= FileUploadButton.UniqueID %>") {
             args.set_enableAjax(false);
         }
     }
 </script>
</telerik:RadScriptBlock>
<telerik:RadAjaxPanel runat="server" id="RadAjaxPanel12"
 ClientEvents-OnRequestStart="conditionalPostback">
 <telerik:RadUpload runat="server" id="RadUpload1" EnableFileInputSkinning="false" />
 <asp:Button id="FileUploadButton" runat="server" text="Upload" OnClick="SubmitButton_Click" />
</telerik:RadAjaxPanel>

D4
Top achievements
Rank 1
 answered on 31 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?