Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
69 views

Hello,

I have a grid with a nested view template. I removed the expand/collapse column to create a customized one.

In the ItemDataBound method I do the following:

TableCell tcExpand = item["Expand"];
Image img = new Image();
img.ImageUrl = "/images/expand_collapse_plus.gif";
img.AlternateText = "+";
img.Attributes.Add("OnClick","ExpandThisMasterTableViewItem(this);");
tcExpand.Controls.Clear();
tcExpand.Controls.Add(img);

On the front end I have: 

function ExpandThisMasterTableViewItem(sender) {
   var rowIndex = $(sender).closest("tr").attr("id");
   rowIndex = rowIndex.substr(rowIndex.lastIndexOf('_') + 1);
 
   var firstMasterTableViewRow = $find("<%= myGrid.MasterTableView.ClientID %>").get_dataItems()[rowIndex];
   if (firstMasterTableViewRow.get_expanded()) {
      $(sender).closest("tr").find("td").css("background-color", "none");
      $(sender).closest("img[src*='expand']").src = "/images/expand_collapse_plus.gif";
        firstMasterTableViewRow.set_expanded(true);
   }
   else {
      $(sender).closest("tr").find("td").css("background-color", "#DBFEDB");
      $(sender).closest("img[src*='expand']").attr('src', '/images/expand_collapse_minus.gif');
      firstMasterTableViewRow.set_expanded(true);
    }
}

 

The line firstMasterTableViewRow.set_expanded always seems to call an image for my custom expand button and I end up with an error :

GET http://​localserver/mypage/undefined 404 (Not Found)​

If I comment the line, I do not have that 404 not found error. But i need to expand / collapse my rows.

Any idea why this error is thrown with that line?

 

Thank you

 

 

 

 

 

 

 

Kostadin
Telerik team
 answered on 27 Oct 2015
1 answer
105 views

Hi community,

I am facing the following challenge:

I want to view some table data with nested details and different structure, but the details should be load on demand to reduce load to the database.

I tried using the NestedViewTemplate which unfortunately shows the same behavior regardless of the "HierarchyLoadMode" or the "GroupLoadMode".

All of the data queries are fired at once during initial load/databind.

I also tried it with the example from http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/hierarchy-with-templates/defaultcs.aspx which shows the same behavior.

 

Isn't there an option to load data for the NestedViewTemplate on demand? What am I doing wrong?

 

Best regards,

 

Tobias

Eyup
Telerik team
 answered on 27 Oct 2015
0 answers
120 views

i need to call Server side "Grid_ItemCommand"

 <telerik:RadGrid ID="DgDataGrid" runat="server" AllowPaging="true" PageSize="10" OnItemDataBound="DgDataGrid_ItemDataBound"  OnItemCommand="DgDataGrid_ItemCommand" CellSpacing="2" >
      <MasterTableView AutoGenerateColumns="false" TableLayout="Fixed">

 <Columns>

....​

      </MasterTableView>
      <ClientSettings>
              <ClientEvents OnCommand="OnCommand" />
       </ClientSettings>​

 

KeDaR
Top achievements
Rank 1
 asked on 27 Oct 2015
7 answers
302 views

Hi all,
Using UI for ASP.NET AJAX Q3 2015 along with VS 2013. I am using below link as a prototype.

http://demos.telerik.com/aspnet-ajax/asyncupload/examples/validation/defaultcs.aspx

I modified it to fit my requirements. I would like to use RadAjaxLoadingPanel and RadAsyncUpload together on the button click event of the below button (attached AsyncUpload - Validation.png)

<telerik:RadButton runat="server" Skin="Silk" ID="BtnSubmit"Text="Validate the uploaded files" OnClick="BtnSubmit_Click"></telerik:RadButton>

On Button Click event, the routine uploads the file as well as runs SQL Stored procedure and on return Stored procedure also executes SSIS packages.
The whole process takes some 5-7 minutes that is the main reason I would like to display the Loading Panel during the execution phase.  Instead of IE “Waiting for Local host” message. If I do use RadAjaxLoadingPanel, after the process complete, current form stays open, does not go to attached 2nd screen (Attachment 2.png). 

Below is my complete code. Thanks for any help

Gc_0620

 _________

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html>
 
 
<head runat="server">
 
    <title>Telerik ASP.NET Example</title>
 
    <link rel="stylesheet" type="text/css" href="styles.css" />
 
    <script type="text/javascript" src="scripts.js"></script>
 
</head>
 
 
 
<body>
 
    <form id="form1" runat="server">
 
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
 
 
                function rAsyncUpload_Selected(sender, args) {
                    var currentFileName = args.get_fileName();
 
                    document.getElementById('<%=hidValueFileName.ClientID %>').value = currentFileName;
                }
 
                function OnClientFileUploadRemoved(sender, args) {
                    var currentFileName = args.get_fileName();
                    //  alert(currentFileName);  //OnClientFileUploadRemoved
 
                    document.getElementById('<%=hidValueFileName.ClientID %>').value = "";
                    __doPostBack("<%= RefreshButton.UniqueID %>", "OnClick");
                }
 
 
 
 
            </script>
        </telerik:RadCodeBlock>
 
        <div class="demo-container size-medium">
 
            <div class="qsf-demo-canvas">
 
                <h2>Upload your files</h2>
 
                <ul class="qsf-list">
 
                    <li>
 
                        <strong>Allowed file types:</strong> jpg, jpeg, png, gif,csv (client-side validation).
 
                    </li>
 
 
                    <li>
 
                        <strong>Allowed overall upload size:</strong> 100 MB (server-side validation).
 
                    </li>
 
                </ul>
                <table>
                    <tr id="in_put" runat="server">
                        <td>
 
                            <telerik:RadMonthYearPicker ID="RadMonthYearPicker1" AutoPostBack="true" OnSelectedDateChanged="btnPopulate_Form"
                                runat="server">
                            </telerik:RadMonthYearPicker>
                        </td>
                        <td>
                            <telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" AllowedFileExtensions="jpg,jpeg,png,gif,csv" TargetFolder="" MultipleFileSelection="Automatic"
                                OnClientFileSelected="rAsyncUpload_Selected"
                                PostbackTriggers="BtnSubmit" MaxFileSize="100971520" Skin="Silk"
                                OnClientFileUploadRemoved="OnClientFileUploadRemoved"
                                UploadedFilesRendering="BelowFileInput">
                            </telerik:RadAsyncUpload>
 
                        </td>
                    </tr>
                </table>
 
                <div class="qsf-results">
 
                    <telerik:RadButton runat="server" Skin="Silk" ID="BtnSubmit"
                        Text="Validate the uploaded files" OnClick="BtnSubmit_Click">
                    </telerik:RadButton>
 
 
 
 
 
                    <asp:Panel ID="ValidFiles" Visible="false" runat="server" CssClass="qsf-success">
 
                        <h3>You successfully uploaded:</h3>
 
                        <ul class="qsf-list" runat="server" id="ValidFilesList"></ul>
 
                    </asp:Panel>
 
 
 
                    <asp:Panel ID="InvalidFiles" Visible="false" runat="server" CssClass="qsf-error">
 
                        <h3>The Upload failed for:</h3>
 
                        <ul class="qsf-list ruError" runat="server" id="InValidFilesList">
 
                            <li>
 
                                <p class="ruErrorMessage">The size of your overall upload exceeded the maximum of 1 MB</p>
 
                            </li>
 
                        </ul>
 
 
 
                    </asp:Panel>
 
                    <telerik:RadButton Skin="Silk" ID="RefreshButton" runat="server" OnClick="RefreshButton_Click" Visible="false" Text="Back"></telerik:RadButton>
 
                </div>
 
 
 
                <div class="qsf-decoration"></div>
 
            </div>
 
            <script type="text/javascript">
 
                //<![CDATA[
 
                Sys.Application.add_load(function () {
 
                    demo.initialize();
 
                });
 
                //]]>
 
            </script>
            <table>
                <tr>
                    <td class="hiddentd_width">
                        <asp:HiddenField ID="hidValueFileName" runat="server" />
                    </td>
                    <td class="hiddentd_width">
                        <asp:HiddenField runat="server" ID="hiddendmonth" Value="" />
                    </td>
 
                    <td class="hiddentd_width">
 
                        <asp:HiddenField runat="server" ID="hdnstartdate" Value="" />
                    </td>
                    <td class="hiddentd_width">
                        <asp:HiddenField runat="server" ID="hdnenddate" Value="" />
                    </td>
                    <td class="hiddentd_width">
                        <asp:HiddenField runat="server" ID="hdncurrentfy" Value="" />
                    </td>
 
                    <td class="hiddentd_width">
                        <asp:HiddenField runat="server" ID="hdnnexteffectivedate" Value="" />
                    </td>
 
 
                </tr>
                <tr>
                    <td>
                        <asp:HiddenField runat="server" ID="hdnCurrentFiscalYear_st_dt" Value="" />
                    </td>
                    <td>
                        <asp:HiddenField runat="server" ID="hdnNextFiscalYear_st_dt" Value="" />
                    </td>
                    <td>
                        <asp:HiddenField runat="server" ID="hdnCurrentMonthFile" Value="" />
                    </td>
                    <td>
                        <asp:HiddenField runat="server" ID="hdnNextMonthFile" Value="" />
                    </td>
                    <td>
                        <asp:HiddenField runat="server" ID="hdnEndCurrentMonthFile" Value="" />
                    </td>
                    <td>
                        <asp:HiddenField runat="server" ID="hdnBegNextMonthFile" Value="" />
                    </td>
 
                </tr>
                <tr>
                    <td>
                        <asp:HiddenField runat="server" ID="HiddenFiscalYear" Value="" />
                    </td>
                    <td>
                        <asp:HiddenField runat="server" ID="hdnFolderCreated" Value="" />
                    </td>
 
                    <td>
                        <telerik:RadToolTip runat="server" ID="tooltip1" TargetControlID="ClientID" IsClientID="true" Animation="FlyIn"
                            Skin="WebBlue" OffsetX="35" EnableRoundedCorners="true"
                            EnableShadow="true" RelativeTo="Element" AnimationDuration="2000" ShowDelay="500"
                            RenderInPageRoot="true"
                            Position="TopRight">
                        </telerik:RadToolTip>
                    </td>
                </tr>
            </table>
        </div>
 
    </form>
 
</body>
 
</html>

using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
using System.Collections;
using System.Drawing;
using System.Text.RegularExpressions;
using System.Data.SqlClient;
using System.IO;
 
namespace WebApplication1
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        const int MaxTotalBytes = 1048576; // 1 MB
 
        long totalBytes;
        public static string connectionString = ConfigurationManager.ConnectionStrings["my-ConnectionString"].ToString();
        public SqlConnection sqlConnection = new SqlConnection(connectionString);
        //Declare a global SqlDataAdapter SqlDataAdapter    
        public SqlDataAdapter sqlDataAdapter = new SqlDataAdapter();
        //Declare a global SqlCommand SqlCommand    
        public SqlCommand sqlCommand = new SqlCommand();
        // SqlString a = new SqlString();
 
        public static string Tempstr, Tempstr1, message, cleanMessage, global_export_folder, updatedDataKey, folderpath = string.Empty;
 
        protected void Page_Load(object sender, EventArgs e)
        {
        }
 
        public void RadAsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
        {
            /*
            BtnSubmit.Visible = false;
            RefreshButton.Visible = true;
            RadAsyncUpload1.Visible = false;
            var liItem = new HtmlGenericControl("li");
            liItem.InnerText = e.File.FileName;
            if (totalBytes < MaxTotalBytes)
            {
            // Total bytes limit has not been reached, accept the file
            e.IsValid = true;
            totalBytes += e.File.ContentLength;
            }
            else
            {
            // Limit reached, discard the file
            e.IsValid = false;
            }
            if (e.IsValid)
            {
            ValidFiles.Visible = true;
            ValidFilesList.Controls.AddAt(0, liItem);
            }
            else
            {
            InvalidFiles.Visible = true;
            InValidFilesList.Controls.AddAt(0, liItem);
            }
            */
        }
 
        protected void RefreshButton_Click(object sender, EventArgs e)
        {
            Page.Response.Redirect(Request.RawUrl);
        }
 
        protected void btnPopulate_Form(object sender, EventArgs e)
        {
            if (RadMonthYearPicker1.DbSelectedDate == null)
            {
                hiddendmonth.Value = "";
                //  RadAjaxPanel1.ResponseScripts.Add(string.Format("alert('- Reporting Month is required!!!');"));
                return;
            }
            if (RadMonthYearPicker1.SelectedDate.Value >= DateTime.Now)
            {
                //  RadAjaxPanel1.ResponseScripts.Add(string.Format("alert('- Can't be future date!');"));
                //  return;
            }
            // Tempstr = RadMonthYearPicker1.DbSelectedDate.ToString();
            // Tempstr1 = Tempstr;
            string startmonth_year = RadMonthYearPicker1.SelectedDate.Value.Month.ToString() + " , " + RadMonthYearPicker1.SelectedDate.Value.Year.ToString();
 
            DateTime selectedDate = RadMonthYearPicker1.SelectedDate.Value;
 
            DateTime startDate = selectedDate.AddDays((selectedDate.Day - 1) * -1);
 
            DateTime endDate = startDate.AddDays(DateTime.DaysInMonth(startDate.Year, startDate.Month) - 1);
            string dtselectedyear = RadMonthYearPicker1.SelectedDate.Value.Year.ToString();
            DateTime NextMonthEffectiveDate = endDate.AddDays(+1);
            // int PreviousYear = (RadMonthYearPicker1.SelectedDate.Value.Year - 1);
            int NextYear = (RadMonthYearPicker1.SelectedDate.Value.Year + 1);
 
            string CurrentFiscalYear_st_dt, NextFiscalYear_st_dt = null;
            string month_selected = string.Empty;
            string currentmonth = string.Empty;
            string nextmonth = string.Empty;
 
            switch (RadMonthYearPicker1.SelectedDate.Value.Month.ToString())
            {
                case "1":
                    month_selected = "January";
 
                    currentmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "01E";
                    nextmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "02B";
                    break;
                case "2":
                    month_selected = "February";
                    currentmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "02E";
                    nextmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "03B";
                    break;
                case "3":
                    month_selected = "March";
                    currentmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "03E";
                    nextmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "04B";
                    break;
                case "4":
                    month_selected = "April";
                    currentmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "04E";
                    nextmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "05B";
                    break;
                case "5":
                    month_selected = "May";
                    currentmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "05E";
                    nextmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "06B";
                    break;
                case "6":
                    month_selected = "June";
                    currentmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "06E";
                    nextmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "07B";
                    break;
                case "7":
                    month_selected = "July";
                    currentmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "07E";
                    nextmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "08B";
                    break;
                case "8":
                    month_selected = "August";
                    currentmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "08E";
                    nextmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "09B";
                    break;
                case "9":
                    month_selected = "September";
                    currentmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "09E";
                    nextmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "10B";
                    break;
                case "10":
                    month_selected = "October";
                    currentmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "10E";
                    nextmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "11B";
                    break;
                case "11":
                    month_selected = "November";
                    currentmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "11E";
                    nextmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "12B";
                    break;
                case "12":
                    month_selected = "December";
                    currentmonth = dtselectedyear.Substring(dtselectedyear.Length - 2) + "12E";
                    nextmonth = NextYear.ToString().Substring(NextYear.ToString().Length - 2) + "01B";
                    break;
                default:
                    break;
            }
 
            if (RadMonthYearPicker1.SelectedDate.Value.Month <= 6)
            {
                CurrentFiscalYear_st_dt = "07/01/" + (RadMonthYearPicker1.SelectedDate.Value.Year - 1).ToString();
                NextFiscalYear_st_dt = "07/01/" + (RadMonthYearPicker1.SelectedDate.Value.Year).ToString();
            }
            else
            {
                CurrentFiscalYear_st_dt = "07/01/" + (RadMonthYearPicker1.SelectedDate.Value.Year).ToString();
                NextFiscalYear_st_dt = "07/01/" + (RadMonthYearPicker1.SelectedDate.Value.Year + 1); //NextYear.ToString();
            }
 
            hiddendmonth.Value = month_selected.ToString();
            hdnstartdate.Value = startDate.ToShortDateString();
            hdnenddate.Value = endDate.ToShortDateString();
            hdncurrentfy.Value = NextFiscalYear_st_dt.Substring(NextFiscalYear_st_dt.ToString().Length - 4); // Until June, Selected year of date.
            // Higher than june,  Selected year+1
            hdnnexteffectivedate.Value = NextMonthEffectiveDate.ToShortDateString();
            hdnNextFiscalYear_st_dt.Value = NextFiscalYear_st_dt.ToString();
            hdnCurrentFiscalYear_st_dt.Value = CurrentFiscalYear_st_dt.ToString();
            hdnCurrentMonthFile.Value = currentmonth.ToString();
            hdnNextMonthFile.Value = nextmonth.ToString();
            hdnEndCurrentMonthFile.Value = month_selected.ToString() + ' ' + RadMonthYearPicker1.SelectedDate.Value.Year.ToString();
            if (RadMonthYearPicker1.SelectedDate.Value.Month == 12)
            {
                hdnBegNextMonthFile.Value = "January" + ' ' + (RadMonthYearPicker1.SelectedDate.Value.Year + 1).ToString();
                Tempstr = "January" + ' ' + (RadMonthYearPicker1.SelectedDate.Value.Year + 1).ToString();
                Tempstr1 = Tempstr;
            }
            else
            {
                hdnBegNextMonthFile.Value = NextMonthEffectiveDate.ToString("MMMM") + ' ' + RadMonthYearPicker1.SelectedDate.Value.Year.ToString();
                Tempstr1 = Tempstr;
            }
            Tempstr = "Current FY Start Dt: " + CurrentFiscalYear_st_dt + " Next FY Start Dt: " + NextFiscalYear_st_dt +
                      " Hidden FY: " + hdncurrentfy.Value;
            Tempstr1 = Tempstr;
        }
 
        protected void BtnSubmit_Click(object sender, System.EventArgs e)
        {
            // ValidationInput.Text = string.Empty;
            if (RadMonthYearPicker1.SelectedDate >= DateTime.Now ||
                RadAsyncUpload1.UploadedFiles.Count == 0)
            {
                return;
            }
            else
            {
                if (RadMonthYearPicker1.SelectedDate.Value.Month <= 9)
                //     if (RadMonthYearPicker1.SelectedDate.Value.Month.ToString().Length < 2)
                {
                    folderpath = "0" + RadMonthYearPicker1.SelectedDate.Value.Month.ToString();
                }
                else
                {
                    folderpath = RadMonthYearPicker1.SelectedDate.Value.Month.ToString();
                }
                string tempfolderpath = hdnCurrentFiscalYear_st_dt.Value.Substring(hdnCurrentFiscalYear_st_dt.Value.ToString().Length - 4) + "\\";
                Tempstr = tempfolderpath;
                Tempstr1 = Tempstr;
                folderpath = "FY" + hdncurrentfy.Value +
                             "\\" + hdncurrentfy.Value + '-' + folderpath + ' ' + hiddendmonth.Value;
                Tempstr = folderpath;
                Tempstr1 = Tempstr;
                sqlCommand = new SqlCommand("Import_Source_File", sqlConnection);
                sqlCommand.Parameters.AddWithValue("@FolderName", folderpath.ToString().Trim());
                sqlCommand.Parameters.AddWithValue("@runtype", "1");
                var outParam = new SqlParameter("@FolderCreated", SqlDbType.VarChar);
                outParam.Direction = ParameterDirection.Output;
                outParam.Size = 4000;
                sqlCommand.Parameters.Add(outParam);
 
                // sqlCommand.Parameters.@FolderCreated.size = 2000;
                sqlCommand.CommandType = CommandType.StoredProcedure;
                sqlCommand.CommandTimeout = 7200;
                sqlConnection.Open();
                sqlCommand.ExecuteNonQuery();
 
                sqlCommand.Dispose();
 
                var folder = Path.GetDirectoryName(outParam.Value.ToString().Trim()) + "\\";
 
                hdnFolderCreated.Value = "All files are created into Network Folder: " + folder;
                global_export_folder = folder;
                Tempstr = folder;
                Tempstr1 = Tempstr;
 
                sqlConnection.Close();
                RadAsyncUpload1.TargetFolder = global_export_folder;
                string path = RadAsyncUpload1.TargetFolder;
                string file_name = hiddendmonth.Value.ToString();
                foreach (UploadedFile file in RadAsyncUpload1.UploadedFiles)
                {
                    file.SaveAs(Path.Combine((path), hidValueFileName.Value.ToString())); // + file.GetExtension()));
                }
 
                string destfileextension = System.IO.Path.GetExtension(hidValueFileName.Value.ToString().Trim());
                string destfile_w_outextension = hidValueFileName.Value.ToString().Trim().Substring(0, hidValueFileName.Value.ToString().Trim().Length -
                                                                                                       destfileextension.Length);
 
                sqlCommand = new SqlCommand("Import_Source_File", sqlConnection);
                sqlCommand.Parameters.AddWithValue("@FolderName", global_export_folder.ToString());
                sqlCommand.Parameters.AddWithValue("@runtype", "2");
                sqlCommand.Parameters.AddWithValue("@SourcefileName", destfile_w_outextension.ToString().Trim());
                sqlCommand.Parameters.AddWithValue("@SourceCSVfileName", hidValueFileName.Value.ToString().Trim());
                sqlCommand.CommandType = CommandType.StoredProcedure;
                sqlCommand.CommandTimeout = 7200;
                sqlConnection.Open();
                Tempstr = "Global Export Folder: " + global_export_folder.ToString() + " Folder: " + folder.ToString().Trim();
                Tempstr += " File Name with extension: " + hidValueFileName.Value.ToString().Trim() + " File Name w/o extension: " + destfile_w_outextension.ToString().Trim();
 
                sqlCommand.ExecuteNonQuery();
 
                sqlCommand.Dispose();
 
                if (sqlConnection.State == ConnectionState.Open)
                {
                    Tempstr = "Connection Open";
                }
                else
                {
                    Tempstr = "Connection Close";
                }
 
                sqlConnection.Close();
 
                // Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "disp_confirm();", true);
                
                BtnSubmit.Visible = false;
                
                RefreshButton.Visible = true;
                
                in_put.Visible = false;
                // RadMonthYearPicker1.Visible = false;
                BtnSubmit.Visible = false;
               
                RefreshButton.Visible = true;
                RefreshButton.Text = "Return";
 
                RadAsyncUpload1.Visible = false;
            }
        }
    }
}

Nencho
Telerik team
 answered on 27 Oct 2015
5 answers
6.2K+ views
Hello
I have used radgrid .I have added columns dynamically to the grid at runtime.
Radgrid width is 500 px so after added 8 column horizontal scrollbar should be appear but it is not appearing.
please suggest me nice solution or example.

Thanks.
Bheki
Top achievements
Rank 1
 answered on 26 Oct 2015
1 answer
122 views

Hello

 I am using a , Dropdown Control, Rad Menu and Popup Window in a shared hosting server but unfortunately its not working.

 I have checked the forum and seen the probable solutions, unfortunately any of them works out.

 You can check the issue on : http://ravidiesel.in/Project/Hostingtest/Test_Hosting.aspx

And the workable version on : http://182.18.176.12:82/Project/Hostingtest/Test_Hosting.aspx

I am relay confused what gone wrong. I have just copied all the files from one hosting provider to another.

Here is the Web.Config file that I am using:

 Do any person can help me out on this. I am really stacked up.

 

Regards

Santanu

<?xml version="1.0" encoding="UTF-8"?><configuration>
  
  <connectionStrings>
   
  </connectionStrings>
  <system.web>
    <!--<machineKey validationKey="E6237171580ECD6B2F36126027EB27D9173DA5C4C7C815B99FEF5ADAADF8D20E2BBF09D038826EDDAF2A5D0E8DD79D89D6631C2B47485FE350C912504AAB4F1E,IsolateApps" decryptionKey="2C7FA1284F8573B1F0F95F761ED7B212C368643F33A9A6FE,IsolateApps" validation="SHA1" />
    <sessionState timeout="5400"/>-->
   
    <sessionState mode="StateServer" cookieless="false" timeout="5"/>
    <machineKey
        validationKey="59361B5E99D541785FF6EBA8650E08CC87428B34DBB6C68B401CE07ECEBE886EC3413E59C53FC46A31F6FCCADAED2A14CCC27E63DAD789CCDF20191F0612E3B3"
        decryptionKey="E0289E75B93F90F755AC3A7F4B2A5F4FBDD2091A9B193A3BBCF5F4AFB23E64EF"
        validation="SHA1"
        decryption="AES" />
    <httpRuntime maxRequestLength="1048576" />
    <pages maintainScrollPositionOnPostBack="true" enableEventValidation="false" viewStateEncryptionMode="Never" />
    <customErrors mode="Off" />
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <!--<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />-->
        <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
        <add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
        <add assembly="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
        <add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
        <add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
        <add assembly="CrystalDecisions.ReportAppServer.DataDefModel, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
        <add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
      <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" /></assemblies>
      <buildProviders>
        <!--<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>-->
      </buildProviders>
    </compilation>
    <httpHandlers>
      <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
      <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
     
    <add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
      
    </httpHandlers>
   
     
    </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <add name="ReportViewerWebControlHandler" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      <add name="Telerik_Web_UI_DialogHandler_aspx" preCondition="integrated" verb="*" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" />
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" preCondition="integrated" verb="*" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" />
      <add name="ChartImage_axd" verb="*" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" />
      <add name="Telerik_Web_UI_WebResource_axd" preCondition="integrated" verb="*" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="Telerik.Web.UI.WebResource" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
      <add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode" /></handlers>
        <modules>
            <add name="ErrorHandlerModule" type="System.Web.Mobile.ErrorHandlerModule, System.Web.Mobile, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" preCondition="managedHandler" />
            <add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler" />
            <!--<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="managedHandler" />-->
            <!--<add name="ScriptModule-4.0" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler" />-->
        </modules>
    
  </system.webServer>
</configuration>​

Plamen
Telerik team
 answered on 26 Oct 2015
0 answers
99 views

We are using telerik old version which was using dll of rad controls.Now we are upgrading these controls to latest version of telerik and getting more code issue which was not working .

My following code is not working , So please let us know How we can fixed this issue.​

Telerik.Web.UI.RadTreeView was unable to find an embedded skin with the name '~/RadControls/TreeView/Skins/Arrows/3DBlue'. Please, make sure that the skin name is spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.

<telerik:RadTreeView ID="rtvTopLeftPatientMenu" Skin="Arrows/3DBlue" 
                            runat="server" OnNodeClick="rtvTopLeftPatientMenu_NodeClick" 
                            BeforeClientToggle = "BeforeToggleHandler" BeforeClientClick = "BeforeClientClick" >
 </telerik:RadTreeView>​​

ashishpandey21jan
Top achievements
Rank 1
 asked on 26 Oct 2015
1 answer
74 views

We are using telerik old version which was using dll of rad controls.Now we are upgrading these controls to latest version of telerik and getting more code issue which was not working .

My following code is not working , So please let us know How we can fixed this issue.​

'Telerik.Web.UI.RadEditor' does not contain a definition for 'ConvertToLower' and  'FileEncoding' .

Telerik.Web.UI.RadEditor rd = new Telerik.Web.UI.RadEditor();
        rd.ConvertToLower = true;                                                                  ----------error
        rd.FileEncoding = 65001; //UTF8                                                       --------error
        rd.Html = sMessage;
        sMessage = rd.Text;​

Marin Bratanov
Telerik team
 answered on 26 Oct 2015
1 answer
117 views

I have added telerik:RadDatePicker in a gridView. Its fetching results and calender as expected. But when i am exporting to excel. I am getting error.

 

Server Error in '/' Application.

Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.

Source Error: 

Line 121: Line 122: // render the table into the htmlwriter Line 123: table.RenderControl(htw); Line 124: Line 125: // render the htmlwriter into the response
Source File: \App_Code\GridViewExportUtil.cs    Line: 123 

Stack Trace: 

[InvalidOperationException: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.] Telerik.Web.UI.ScriptRegistrar.GetScriptManager(Control control) +161 Telerik.Web.UI.RadWebControl.RegisterScriptDescriptors() +39​

 

Maria Ilieva
Telerik team
 answered on 26 Oct 2015
7 answers
77 views

I have a RadGrid with SEO Paging and Routing turned on. I'm using the NextPrevNumericAndAdvanced mode with TopAndBottom position.

When entering a custom page number (i.e. page 33 of 66) and click on the go button it just goes to the current page.

The individual page number buttons are fine (except the CSS issue I've reported before) and go to the correct page.

 

Kostadin
Telerik team
 answered on 26 Oct 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?