Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
44 views
I can apply a CSS class to a paragraph by using the ApplyClass tool, which will add a <span class="className"> inside the paragraph. But I would prefer the selected class being applied to the selected P element directly instead of adding an extra SPAN.

Can that be achieved?
Ianko
Telerik team
 answered on 07 May 2014
3 answers
304 views
Hi,

Is <br/> tag supported in LabelsAppearance tag? I added a <br/> tag in LabelAppearance and it doesn't work in the same way as it works in TooltipsAppearance

The following line does not work:

<LabelsAppearance Position="Circle" ClientTemplate="#=dataItem.department# <br/>$#=dataItem.amount#M (#=dataItem.percent#%)" > </LabelsAppearance>

LabelsAppearance  works fine if I remove the <br/> tag.

Below is the full code:

 <telerik:RadHtmlChart runat="server" ID="PieChart1" Width="800" Height="550" Transitions="true"
                    Skin="Forest">
                    <Appearance>
                         <FillStyle BackgroundColor="White"></FillStyle>
                    </Appearance>
                    <ChartTitle Text="Total: $2,694,491,736">
                         <Appearance Align="Center" BackgroundColor="White" Position="Bottom">
                         </Appearance>
                    </ChartTitle>
                    <Legend>
                         <Appearance BackgroundColor="White" Position="Right" Visible="true">
                         </Appearance>
                    </Legend>
                    <PlotArea>
                         <Appearance>
                              <FillStyle BackgroundColor="White"></FillStyle>
                         </Appearance>
                         <Series>
                              <telerik:PieSeries StartAngle="90" DataFieldY="percent" ColorField="customcolor">
                                   <LabelsAppearance Position="Circle" ClientTemplate="#=dataItem.department# $#=dataItem.amount#M (#=dataItem.percent#%)" >
                                     
                                   </LabelsAppearance>
                                   <TooltipsAppearance ClientTemplate="#=dataItem.department#<br/>$#=dataItem.amount#M (#=dataItem.percent#%)"></TooltipsAppearance>
                              </telerik:PieSeries>
                         </Series>
                    </PlotArea>
               </telerik:RadHtmlChart>


Thanks

 

Danail Vasilev
Telerik team
 answered on 07 May 2014
1 answer
137 views
Hi,

I'm using a RadGrid with a delete button.
When clicking the delete button, I like to show a window confirm box.
The box will not be shown when the grid in the AjaxUpdatedControl list.

How can I show the window and keep the RadGrid in the AjaxUpdatedControl list?

Thanks,
Egbert

Here is the xaml and code file:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ReportsGeneral.ascx.cs"
    Inherits="ReportsGeneral" %>
 
<%@ Register TagPrefix="uc" TagName="InfoPanel" Src="~/InfoPanel.ascx" %>
<%@ Register TagPrefix="uc" TagName="RisWindow" Src="~/RisWindow.ascx" %>
 
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script type="text/javascript">
        function OnClientFilesUploaded(sender, args) {
            $find('<%=RadAjaxManager1.ClientID %>').ajaxRequest();
        }
    </script>
</telerik:RadScriptBlock>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnablePageHeadUpdate="false">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadAsyncUploadReport" />
                <telerik:AjaxUpdatedControl ControlID="RadGridReports" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<div style="margin: 15px;">
    <center>
        <table>
            <tr>
                <td valign="top">
                    Begin
                    <telerik:RadCalendar ID="RadCalendar1" runat="server">
                    </telerik:RadCalendar>
                </td>
                <td rowspan="2" valign="top" style="margin-left: 10px; padding-left: 10px;">
                    Rapporten
                    <telerik:RadGrid ID="RadGridReports" runat="server" AllowPaging="True" ActiveItemStyle-Wrap="True"
                        ShowStatusBar="true" AllowSorting="True" AllowMultiRowEdit="true" AutoGenerateColumns="false"
                        AllowAutomaticInserts="true" OnNeedDataSource="RadGridReports_NeedDataSource" ClientSettings-Selecting-AllowRowSelect="true" ClientSettings-EnablePostBackOnRowClick="true"
                        OnItemCommand="RadGridReports_ItemCommand">
                        <MasterTableView PageSize="10" NoMasterRecordsText="No data">
                            <Columns>
                                <telerik:GridBoundColumn DataField="report_id" HeaderText="ID" UniqueName="id" Display="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="owner" HeaderText="Eigenaar" UniqueName="owner">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="filename" HeaderText="Rapport" UniqueName="filename">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="info" HeaderText="Info" UniqueName="info" Display="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridButtonColumn UniqueName="DeleteReportCommand" CommandName="DeleteReport"
                                    ButtonType="ImageButton" ImageUrl="~/Skins/Office2010Blue/Grid/Delete.png" Text="Verwijder"
                                    ItemStyle-Width="24px">
                                </telerik:GridButtonColumn>
                            </Columns>
                        </MasterTableView>
                        <ClientSettings EnableRowHoverStyle="true">
                        </ClientSettings>
                    </telerik:RadGrid>
                    <br />
                    <telerik:RadButton runat="server" ID="checkBoxOnlyShowMyReports" Text=" Alleen eigen rapporten tonen"
                    ButtonType="ToggleButton" ToggleType="CheckBox" OnClick="checkBoxOnlyShowMyReports_Click"> </telerik:RadButton>
                    <br />
                    <br />
                    <asp:Panel runat="server" GroupingText="Upload rapport">
                        <telerik:RadAsyncUpload ID="RadAsyncUploadReport" runat="server" OnFileUploaded="RadAsyncUploadReport_FileUploaded"
                            OnClientFilesUploaded="OnClientFilesUploaded" AllowedFileExtensions="xlsx" Localization-Select="Selecteer" Width="99%">
                        </telerik:RadAsyncUpload>
                        <br />
                    <uc:InfoPanel ID="InfoPanel1" runat="server" Type="note" Text="Je kan alleen rapporten uploaden met de .xlsx extensie!" HeaderText="Let op!"/>
                    </asp:Panel>
                    <br />
                    <div style="text-align: center">
                    <telerik:RadButton ID="buttonGenerateReport" runat="server" Text="Genereer rapport!" OnClick="buttonGenerateReport_Click" Skin="MetroTouch"></telerik:RadButton>
                    </div>
                    <uc:InfoPanel ID="InfoPanel2" runat="server" Type="note" Text="Bezig met invullen van het rapport!" HeaderText="" Visible="false"/>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Eind
                    <telerik:RadCalendar ID="RadCalendar2" runat="server">
                    </telerik:RadCalendar>
                </td>
                <td>
                      
                </td>
            </tr>
        </table>
        <uc:RisWindow runat="server" ID="windowWarning" />
        <telerik:RadNotification ID="RadNotification" runat="server" Text="Initial text" Position="Center" AutoCloseDelay="0" Width="350" Title="Current time" EnableRoundedCorners="true" />
        <telerik:RadWindow ID="RadWindowConfirm" VisibleOnPageLoad="false" Title="Waarschuwing"
            runat="server" Modal="true" AutoSize="false" Width="400" Height="200" VisibleTitlebar="true"
            VisibleStatusbar="False" Behaviors="None" Skin="MetroTouch">
            <ContentTemplate>
                <p style="text-align: center;">
                    <asp:Label runat="server" ID="label1" Text="Rapport verwijderen?"></asp:Label>
                </p>
                <p style="padding: 10px; text-align: center;">
                    <telerik:RadButton ID="ButtonDeleteReportYes" Text="Ja" AutoPostBack="true" runat="server"
                        OnClick="ButtonDeleteReportYes_Click" Skin="MetroTouch">
                    </telerik:RadButton>
                    <telerik:RadButton ID="RadDeleteReportNo" Text="Nee" AutoPostBack="true" runat="server"
                        OnClick="ButtonDeleteReportNo_Click" Skin="MetroTouch">
                    </telerik:RadButton>
                </p>
            </ContentTemplate>
        </telerik:RadWindow>
    </center>
</div>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.IO;
using Ris.Classes;
using System.Data;
using SpreadsheetLight;
using DocumentFormat.OpenXml.Spreadsheet;
 
public partial class ReportsGeneral : System.Web.UI.UserControl
{
    private DbHours dbHour = new DbHours();
    private DbProjects dbProject = new DbProjects();
    private DbReports dbReports = null;
    private DbTasks dbTask = new DbTasks();
    private DbUsers dbUser = new DbUsers();
    private string userID = string.Empty;
 
    protected void Page_Load(object sender, EventArgs e)
    {
        this.userID = Session["UserID"].ToString();
        dbReports = new DbReports();
 
        if (!IsPostBack)
        {
            if (Session["OnlyUseMyReports"].ToString() == "0")
            {
                this.checkBoxOnlyShowMyReports.Checked = false;
            }
            else
            {
                this.checkBoxOnlyShowMyReports.Checked = true;
            }
        }
    }
 
    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);
    }
 
    protected void UploadReport_Click(object sender, EventArgs e)
    {
        this.RadAsyncUploadReport.Visible = true;
    }
 
    protected void RadAsyncUploadReport_FileUploaded(object sender, FileUploadedEventArgs e)
    {
        string shortName = dbUser.GetUserItem(this.userID, "short_name");
 
        //// Save the file
        string filename = Global.ReportFolder + shortName + "-" + e.File.FileName;
        e.File.SaveAs(filename);
         
        //// Store the fileinfo in the database
        DbReports dbReports = new DbReports();
        if (!dbReports.ReportExist(e.File.FileName, this.userID))
        {
            dbReports.InsertReport(e.File.FileName, this.userID);
        }
 
        this.RadGridReports.Rebind();
    }
 
    protected void RadGridReports_NeedDataSource(object sender, EventArgs e)
    {
        this.DisplayReports();
    }
 
    private void DisplayReports()
    {
        DataSet dSet = new DataSet();
        if (Session["OnlyUseMyReports"].ToString() == "0")
        {
            dSet = dbReports.GetAllReports();
            this.RadGridReports.Columns[4].Display = false;
        }
        else
        {
            dSet = dbReports.GetMyReports(this.userID);
            this.RadGridReports.Columns[4].Display = true;
        }
 
        this.RadGridReports.DataSource = dSet;
    }
 
    protected void buttonGenerateReport_Click(object sender, EventArgs e)
    {
        if (this.RadGridReports.SelectedItems.Count <= 0)
        {
            this.windowWarning.Show("Selecteer eerst een rapport!");
            return;
        }
 
        // now start with the reporting
        string reportID = Session["ReportID"].ToString();
        string ownerID = dbReports.GetReportItem(reportID, "user_id");
        string reportFileName = dbReports.GetReportItem(reportID, "filename");
        string shortNameOwner = dbUser.GetUserItem(ownerID, "short_name");
 
        string completePath = Global.ReportFolder + shortNameOwner + "-" + reportFileName;
 
        if (reportFileName.ToLower().StartsWith("vakantiekaart"))
        {
            ReportsVacation reportsVacation = new ReportsVacation();
            string reportResult = reportsVacation.CreateReport(completePath, reportFileName);
            if (reportResult != string.Empty)
            {
                this.windowWarning.Show(reportResult);
                return;
            }
        }
        else
        {
            ReportsStandard reportsStandard = new ReportsStandard();
            string reportResult = reportsStandard.CreateReport(completePath, reportFileName);
        }
 
        try
        {
            this.FileResponse(reportFileName, Global.ReportOutputFolder + reportFileName);
        }
        catch (Exception ex)
        {
            this.windowWarning.Show("Fout bij opslaan rapport: " + Global.ReportOutputFolder + reportFileName + "! Bestaat de folder?");
        }
 
        //this.RadNotification.VisibleOnPageLoad = true;
        //this.InfoPanel2.Visible = true;
        return;
    }
 
    protected void RadGridReports_ItemCommand(object source, GridCommandEventArgs e)
    {
        if (e.CommandName == "RowClick" && e.Item is GridDataItem)
        {
            e.Item.Selected = true;
 
            GridDataItem item = e.Item as GridDataItem;
            Session["ReportID"] = item["id"].Text;
        }
 
        if (e.CommandName == "DeleteReport")
        {
            GridDataItem item = e.Item as GridDataItem;
            Session["DeleteReportID"] = item["id"].Text;
 
            this.RadWindowConfirm.VisibleOnPageLoad = true;
        }
    }
 
    private void FileResponse(string downloadfilename, string filePath)
    {
        System.IO.FileInfo file = new System.IO.FileInfo(filePath); //-- if the file exists
        if (file.Exists) //set appropriate headers 
        {
            BinaryReader fs = new BinaryReader(file.OpenRead());
            HttpContext.Current.Response.ClearContent();
            HttpContext.Current.Response.Clear();
            HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + downloadfilename);
            HttpContext.Current.Response.AddHeader("Content-Length", file.Length.ToString());
            HttpContext.Current.Response.ContentType = "application/octet-stream";
            byte[] bite = fs.ReadBytes((int)file.Length);
            fs.Close();
            HttpContext.Current.Response.BinaryWrite(bite);
        }
    }
     
    protected void checkBoxOnlyShowMyReports_Click(object sender, EventArgs e)
    {
        Session["OnlyUseMyReports"] = "0";
        if (checkBoxOnlyShowMyReports.Checked == true)
        {
            Session["OnlyUseMyReports"] = "1";
        }
 
        this.RadGridReports.Rebind();
    }
 
    protected void ButtonDeleteReportYes_Click(object sender, EventArgs e)
    {
        this.RadWindowConfirm.VisibleOnPageLoad = false;
 
        this.dbReports.DeleteReport(Session["DeleteReportID"].ToString());
    }
 
    protected void ButtonDeleteReportNo_Click(object sender, EventArgs e)
    {
        this.RadWindowConfirm.VisibleOnPageLoad = false;
    }
}

Marin Bratanov
Telerik team
 answered on 07 May 2014
3 answers
141 views
Hi,

I'm trying to show a notification when starting a time consuming function.
But no notification will popup.

What am I doing wrong:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ReportsGeneral.ascx.cs"
    Inherits="ReportsGeneral" %>
 
<%@ Register TagPrefix="uc" TagName="InfoPanel" Src="~/InfoPanel.ascx" %>
<%@ Register TagPrefix="uc" TagName="RisWindow" Src="~/RisWindow.ascx" %>
 
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script type="text/javascript">
        function OnClientFilesUploaded(sender, args) {
            $find('<%=RadAjaxManager1.ClientID %>').ajaxRequest();
        }
    </script>
</telerik:RadScriptBlock>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnablePageHeadUpdate="false">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadAsyncUploadReport" />
                <telerik:AjaxUpdatedControl ControlID="RadGridReports" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<div style="margin: 15px;">
    <center>
        <table>
            <tr>
                <td valign="top">
                    Begin
                    <telerik:RadCalendar ID="RadCalendar1" runat="server">
                    </telerik:RadCalendar>
                </td>
                <td rowspan="2" valign="top" style="margin-left: 10px; padding-left: 10px;">
                    Rapporten
                    <telerik:RadGrid ID="RadGridReports" runat="server" AllowPaging="True" ActiveItemStyle-Wrap="True"
                        ShowStatusBar="true" AllowSorting="True" AllowMultiRowEdit="true" AutoGenerateColumns="false"
                        AllowAutomaticInserts="true" OnNeedDataSource="RadGridReports_NeedDataSource" ClientSettings-Selecting-AllowRowSelect="true" ClientSettings-EnablePostBackOnRowClick="true"
                        OnItemCommand="RadGridReports_ItemCommand">
                        <MasterTableView PageSize="10" NoMasterRecordsText="No data">
                            <Columns>
                                <telerik:GridBoundColumn DataField="report_id" HeaderText="ID" UniqueName="id" Display="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="owner" HeaderText="Eigenaar" UniqueName="owner">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="filename" HeaderText="Rapport" UniqueName="filename">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="info" HeaderText="Info" UniqueName="info" Display="false">
                                </telerik:GridBoundColumn>
                            </Columns>
                        </MasterTableView>
                        <ClientSettings EnableRowHoverStyle="true">
                        </ClientSettings>
                    </telerik:RadGrid>
                    <br />
                    <asp:Panel runat="server" GroupingText="Upload rapport">
                        <telerik:RadAsyncUpload ID="RadAsyncUploadReport" runat="server" OnFileUploaded="RadAsyncUploadReport_FileUploaded"
                            OnClientFilesUploaded="OnClientFilesUploaded" AllowedFileExtensions="xlsx" Localization-Select="Selecteer" Width="99%">
                        </telerik:RadAsyncUpload>
                        <br />
                    <uc:InfoPanel ID="InfoPanel1" runat="server" Type="note" Text="Je kan alleen rapporten uploaden met de .xlsx extensie!" HeaderText="Let op!"/>
                    </asp:Panel>
                    <br />
                    <div style="text-align: center">
                    <telerik:RadButton ID="buttonGenerateReport" runat="server" Text="Genereer rapport!" OnClick="buttonGenerateReport_Click" Skin="MetroTouch"></telerik:RadButton>
                    </div>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Eind
                    <telerik:RadCalendar ID="RadCalendar2" runat="server">
                    </telerik:RadCalendar>
                </td>
                <td>
                      
                </td>
            </tr>
        </table>
        <uc:RisWindow runat="server" ID="windowWarning" />
        <telerik:RadNotification ID="RadNotification" runat="server" Text="Initial text" Position="Center" AutoCloseDelay="0" Width="350" Title="Current time" EnableRoundedCorners="true" />
    </center>
</div>

Code to show the notification:
protected void buttonGenerateReport_Click(object sender, EventArgs e)
{
    if (this.RadGridReports.SelectedItems.Count <= 0)
    {
        this.windowWarning.Show("Selecteer eerst een rapport!");
        return;
    }
 
    // now start with the reporting
    string reportID = Session["ReportID"].ToString();
    string ownerID = dbReports.GetReportItem(reportID, "user_id");
    string reportFileName = dbReports.GetReportItem(reportID, "filename");
    string shortNameOwner = dbUser.GetUserItem(ownerID, "short_name");
 
    string completePath = Global.ReportFolder + shortNameOwner + "-" + reportFileName;
 
    this.RadNotification.Visible = true;
    this.RadNotification.VisibleOnPageLoad = true;
    this.RadNotification.Show();
 
    if (reportFileName.ToLower().StartsWith("vakantiekaart"))
    {
        ReportsVacation reportsVacation = new ReportsVacation();
        string reportResult = reportsVacation.CreateReport(completePath, reportFileName);
        if (reportResult != string.Empty)
        {
            this.windowWarning.Show(reportResult);
            return;
        }
    }
    else
    {
        ReportsStandard reportsStandard = new ReportsStandard();
        string reportResult = reportsStandard.CreateReport(completePath, reportFileName);
    }
 
    try
    {
        this.FileResponse(reportFileName, Global.ReportOutputFolder + reportFileName);
    }
    catch (Exception ex)
    {
        this.windowWarning.Show("Fout bij opslaan rapport: " + Global.ReportOutputFolder + reportFileName + "! Bestaat de folder?");
    }
}

Thanks and best regards,
Egbert
Marin Bratanov
Telerik team
 answered on 07 May 2014
2 answers
99 views
I put an ajax panel into my page, which is viewed in a radwindow.  When I use a lookup textbox and postback to get information the page dissapears and eventually it reappears when the data finishes loading.  Becuase of the trip of dta this can take 10 - 15 sec.  Some users take this as the page messing up, how can I show the loading circle of the loadpanel during this time as it is not showing.  When i postback on the txtSearch textbox everything disapears and then reapears when data is loaded, i would like the loading spinner of the load panel to show.

<telerik:RadAjaxPanel ID="radPanel" runat="server" LoadingPanelID="RadloadPanel">
           <div class="CentDiv">
               <asp:TextBox ID="txtSearch" runat="server" Width="360px" AutoPostBack="true" OnTextChanged="txtSearch_TextChanged"></asp:TextBox>
                <asp:AutoCompleteExtender ID="txtSearch_ACE" runat="server" TargetControlID="txtSearch" MinimumPrefixLength="1" ServiceMethod="FindName" ServicePath="~/AutoComplete.asmx"
                  UseContextkey="true" OnClientItemSelected="SelectedName" EnableCaching="true" CompletionInterval="1" DelimiterCharacters=""  />
               <asp:TextBoxWatermarkExtender ID="txtSearch_WME" runat="server" TargetControlID="txtSearch" WatermarkText="Enter Last Name First Name" WatermarkCssClass="WaterMark" />
           </div>
          <asp:Panel ID="pnlInfo" runat="server" Visible="false">
              <table style="width:100%;border:double;background-color:antiquewhite">
                  <tr>
                      <td style="height:5px"></td>
                  </tr>
                  <tr>
                      <td style="text-align:right;width:40%">Pick Persona: </td>
                      <td><telerik:RadComboBox ID="ddlPersona" runat="server" OnDataBound="ddlPersona_DataBound" Width="140px"></telerik:RadComboBox>
                      </td>
                  </tr>
                  <tr>
                      <td style="height:5px"></td>
                  </tr>
                  <tr>
                      <td style="text-align:right;width:40%">Enter EDPI: </td>
                      <td><asp:TextBox ID="txtEDIPI" runat="server" Width="140px" MaxLength="10"></asp:TextBox>
                          <asp:RequiredFieldValidator ID="valEdipi" runat="server" Display="Dynamic" ControlToValidate="txtEDIPI" ValidationGroup="Token" Text=" * Enter EDIPI" Font-Bold="true" ForeColor="Tomato"></asp:RequiredFieldValidator>
                          <asp:FilteredTextBoxExtender ID="txtEDIPI_FTE" runat="server" TargetControlID="txtEdipi" FilterType="Numbers"></asp:FilteredTextBoxExtender>
                      </td>
                  </tr>
                  <tr>
                      <td style="height:5px"></td>
                  </tr>
                  <tr>
                      <td style="text-align:right;width:40%">Enter DISA Email: </td>
                      <td><asp:TextBox ID="txtEmail" runat="server" Width="260px" MaxLength="60"></asp:TextBox>
                          <asp:TextBoxWatermarkExtender ID="txtEmail_WME" runat="server" TargetControlID="txtEmail" WatermarkCssClass="wtrMrk" WatermarkText="Email." />
                          <asp:RequiredFieldValidator ID="valtxtEmail" runat="server" ControlToValidate="txtEmail" ErrorMessage="Enter Disa Email" Display="Dynamic" ForeColor="Red" ValidationGroup="Token"></asp:RequiredFieldValidator>
                      </td>
                  </tr>
                  <tr>
                      <td style="height:5px"></td>
                  </tr>
                   <tr>
                      <td style="text-align:right;width:40%">Unit: </td>
                      <td><asp:Label ID="lblUnit" runat="server"></asp:Label></td>
                  </tr>
                  <tr>
                      <td style="height:5px"></td>
                  </tr>
                  <tr>
                      <td style="text-align:right;width:40%">Unit Phone #: </td>
                      <td><asp:TextBox ID="txtPhone" runat="server" Width="140px" MaxLength="12"></asp:TextBox>
                          <asp:RequiredFieldValidator ID="valPhone" runat="server" Display="Dynamic" ControlToValidate="txtPhone" ValidationGroup="Token" Text=" * Enter Phone" Font-Bold="true" ForeColor="Tomato"></asp:RequiredFieldValidator>
                          <asp:TextBoxWatermarkExtender ID="txtPhoneNumber_WME" runat="server" TargetControlID="txtPhone" WatermarkCssClass="wtrMrk" WatermarkText="000.000.0000" />
                          <asp:FilteredTextBoxExtender ID="txtPhoneNumber_FTE" runat="server" FilterType="Custom, Numbers" ValidChars="." TargetControlID="txtPhone"></asp:FilteredTextBoxExtender>
                          <asp:RegularExpressionValidator ID="valPhoneExpress" runat="server" ControlToValidate="txtPhone" ErrorMessage="* Enter Format 222.222.2222" Display="Dynamic" ValidationExpression="((\(\d{3}\) ?)|(\d{3}.))?\d{3}.\d{4}" ForeColor="Red" ValidationGroup="Token" />
                      </td>
                  </tr>
                  <tr>
                      <td style="height:5px"></td>
                  </tr>
                  <tr>
                      <td style="text-align:right;width:40%">Unit Address: </td>
                      <td><asp:Label ID="lblAddress" runat="server"></asp:Label></td>
                  </tr>
                  <tr>
                      <td style="height:5px"></td>
                  </tr>
                  <tr>
                      <td style="text-align:right;width:40%">Unit City: </td>
                      <td><asp:Label ID="lblCity" runat="server"></asp:Label></td>
                  </tr>
                  <tr>
                      <td style="height:5px"></td>
                  </tr>
                  <tr>
                      <td style="text-align:right;width:40%">Unit State: </td>
                      <td><asp:Label ID="lblState" runat="server"></asp:Label>
                             Unit Zip: 
                          <asp:Label ID="lblZip" runat="server"></asp:Label>
                      </td>
                  </tr>
                  <tr>
                      <td style="height:5px"></td>
                  </tr>
                  <tr>
                      <td style="text-align:right;width:40%">Pick-up Location: </td>
                      <td><telerik:RadComboBox ID="ddlLocation" runat="server" OnDataBound="ddlLocation_DataBound"></telerik:RadComboBox></td>
                  </tr>
                  <tr>
                      <td style="height:5px"></td>
                  </tr>
                  <tr>
                      <td style="text-align:right;width:40%"></td>
                      <td><asp:LinkButton ID="lnkSubmit" runat="server" Text="Submit" CausesValidation="true" OnClick="lnkSubmit_Click" ValidationGroup="Token"></asp:LinkButton>
                               
                          <asp:LinkButton ID="lnkCancel" runat="server" Text="Cancel" CausesValidation="false" OnClick="lnkCancel_Click"></asp:LinkButton>
                      </td>
                  </tr>
              </table>
          </asp:Panel>
          <asp:HiddenField ID="HFPersId" runat="server" /><asp:HiddenField ID="HFUserId" runat="server" /><asp:HiddenField ID="HFEdit" runat="server" /> 
      </telerik:RadAjaxPanel>
      <telerik:RadAjaxLoadingPanel ID="RadloadPanel" runat="server" AnimationDuration="10" MinDisplayTime="5" BackgroundPosition="Center"></telerik:RadAjaxLoadingPanel>
























Kevin
Top achievements
Rank 1
 answered on 07 May 2014
5 answers
108 views
(forum page has timed out twice now when I've submitted this... going to post in pieces)

In a TileList I have a Tile with a radHTMLChart in the PeekTemplate.
When I click on the tile to reposition it, it reorders the other tiles in strange ways.
The Tilelist area expands causing scroll bars to display and blank "phantom" tiles seem to take up space.
I've tried disabling the chart's tooltips, limiting size of the chart content, adding empty onClientClick handlers... no luck.

Please see screen capture and partial example page code snippets below in thread replies

Thanks!
-Matt

Marin Bratanov
Telerik team
 answered on 07 May 2014
9 answers
211 views
Hi

I have developed an external .js file for an ASP.NET system which executes the following...
function ProcessUpdate(arg) {
    var ram = $telerik.$("[id$='RadAjaxManager1']").attr("id");
    var ajaxManager = $find(ram);
    if (!arg) { ram.ajaxRequest("Rebind"); } else if (arg == 'navigateToInserted') ram.ajaxRequest("RebindAndNavigate"); else if (arg.match(/navigateToDeleted.*/)) ram.ajaxRequest(arg);
}


  I am trying to execute the RadAjaxManager ajaxRequest along with the proper argument, but so far all I am getting is an error 'Cannot call method 'ajaxRequest' of null'.  I am able to get reference to the RadAjaxManager object on the page, but the method is not available for referencing at this point.

Any help or comments would be appreciated!

Regards
Maria Ilieva
Telerik team
 answered on 07 May 2014
1 answer
67 views
Hi,  
I have used following ajax manager in my page and i have used user control Schedule_Review_Narrative1 on this page to which i have tool into ajax manager 
and i have my grid in Schedule_Review_Narrative1 and in that grid i have applied code to download image but not able to download image.

Problem : i want to use ajax in grid as well as i need to run code to download document. 

<telerik:RadAjaxManager ID="RAMMileston" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Schedule_Review_Left_Navigation1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Schedule_Review_Narrative1" />
                    <telerik:AjaxUpdatedControl ControlID="Schedule_Review_Left_Navigation1" />
                      </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

in link button i have gave command name  to link button and in rggrid_ItemCommand () i have gave following code but not able to download so please help me in this 

    else if (e.CommandName == "DownloadFile")
                    {
                       
                            SqlConnection objSqlCon = new SqlConnection(db.ConnectionString);
                            objSqlCon.Open();
                            SqlTransaction objSqlTran = objSqlCon.BeginTransaction();

                            SqlCommand objSqlCmd = new SqlCommand("Procedure_Name", objSqlCon, objSqlTran);
                            objSqlCmd.CommandType = CommandType.StoredProcedure;

                            SqlParameter objSqlParam1 = new SqlParameter("@FileGUID", SqlDbType.VarChar);
                            objSqlParam1.Value = e.CommandArgument;

                            objSqlCmd.Parameters.Add(objSqlParam1);
                            string path = string.Empty;
                            string FileType = string.Empty;
                            string FormName = string.Empty;

                            using (SqlDataReader sdr = objSqlCmd.ExecuteReader())
                            {
                                while (sdr.Read())
                                {
                                    path = sdr[0].ToString();
                                    FileType = sdr[1].ToString();
                                    FormName = sdr[2].ToString();
                                }

                            }

                            objSqlCmd = new SqlCommand("SELECT GET_FILESTREAM_TRANSACTION_CONTEXT()", objSqlCon, objSqlTran);
                            byte[] objContext = (byte[])objSqlCmd.ExecuteScalar();
                            SqlFileStream objSqlFileStream = new SqlFileStream(path, objContext, FileAccess.Read);
                            byte[] buffer = new byte[(int)objSqlFileStream.Length];
                            objSqlFileStream.Read(buffer, 0, buffer.Length);
                            objSqlFileStream.Close();

                            objSqlTran.Commit();
                            FormName = FormName.Replace(";", "").Replace(",", " ");
                            Response.AddHeader("Content-disposition", "attachment; filename=" + Path.GetFileName(FormName) + FileType);
                            // Here you need to manage the download file stuff according to your need
                            Response.ContentType = "application/octet-stream";
                            Response.BinaryWrite(buffer);
                            Response.End();
                        
                    }

Please help me in this.
Thanks
Manish
Maria Ilieva
Telerik team
 answered on 07 May 2014
1 answer
93 views
Hi Telerik,

Are any events fired at the beginning/end of the drawing actions, ideally that can report back to the server in some way? I would like to be able to capture the starting and ending coordinates when a user draws a circle or rectangle using the image editor controls so that I can flag the image as altered when the Apply button is clicked, as well as write it to the database along with an explanation/annotation for explain why it was done (using this for redaction) when the image is saved.
Vessy
Telerik team
 answered on 07 May 2014
1 answer
79 views
When editing a grid, the pagelayout seems not to work well in edit form templates. I believe it does not account for the space consumed outside of the template, the grid itself and any other space between grid and edge boundary of screen. I have add the pagelayout with in the edit form and also wrap the grid with the pagelayout control. No effect.
Venelin
Telerik team
 answered on 07 May 2014
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?