Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
148 views
Hi,

I'm experiencing problems with the RadUpload sometimes working great with progress indicator for files up to 2GB and sometimes I get "Internet Explorer cannot display the web page."  The files can be as smaller than 1MB and I can still have the same problem.  I did not seem to have this problem when the server was on our internal network, where of course the network speeds are much faster.  Tthe "Internet Explorer cannot display the web page" can come up after 10 seconds, 20 seconds, 30 seconds, 40 seconds, ...after executing the Submit button to perform the upload.  I've played with client browser timeout settings, set IIS 7.5 uploadReadAheadSize to 5MB, set IIS 7.5 connection timeout to 3 hours (10800 seconds), but I can't seem to solve this problem.  The RadUpload utility logs in the IIS web logs that it is uploading, and the last log when I get "Internet Explorer cannot display the web page" is that it is uploading.  There are no other logs anywhere.  Even if the network is dropping packets or something, is there a way to build in some better error control handling so that when this happens the upload session can stay in progress?

Mary
Peter Filipov
Telerik team
 answered on 10 Jul 2012
1 answer
93 views
Hey,

I was following the example for using a binary image with a listview to display images etc. allowing users to upload, and edit them.

The code is great except in the event the user uploads a bad image, during postback when the listview is displayed it blows up and throws errors saying the binary data is corrupted.

I know there should be a way to grab hold of the data during the ItemDataBound event, and catch the error, and ignore it or substitute the image with something stored on the website like a badimage.jpg

can someone help with this thanks

Andrey
Telerik team
 answered on 10 Jul 2012
5 answers
130 views
Hi all,

If I have a RadGrid hidden on the page (either through setting it's property or doing it dynamically at runtime in Page_Load), and then later make it visible, it looses all it's Skin information.   Here's a quick sample page I created to demonstrate the problem..  I tried also using the RadScriptManager and got the same effect.

Thanks!!

ASP.NET

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="HiddenRadGridTest.aspx.cs" Inherits="HiddenRadGridTest" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server"
        &nbsp;<asp:ScriptManager ID="ScriptManager1" runat="server"
        </asp:ScriptManager> 
        &nbsp;<div> 
            <br /> 
            <asp:UpdatePanel ID="UpdatePanel1" runat="server"
                <ContentTemplate> 
                    &nbsp;<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> 
                    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="dsTest" GridLines="None" 
                        Visible="False"
                        <ExportSettings> 
                            <Pdf FontType="Subset" PaperSize="Letter" /> 
                            <Excel Format="Html" /> 
                        </ExportSettings> 
                        <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst" 
                            DataKeyNames="CustomerID" DataSourceID="dsTest" Dir="LTR" Frame="Border" TableLayout="Auto"
                            <EditFormSettings> 
                                <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
                                </EditColumn> 
                            </EditFormSettings> 
                            <Columns> 
                                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="CustomerID" 
                                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="CustomerID" 
                                    ReadOnly="True" SortExpression="CustomerID" UniqueName="CustomerID"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="CustomerName" 
                                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="CustomerName" 
                                    SortExpression="CustomerName" UniqueName="CustomerName"
                                </telerik:GridBoundColumn> 
                            </Columns> 
                            <ExpandCollapseColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                                Resizable="False" Visible="False"
                                <HeaderStyle Width="20px" /> 
                            </ExpandCollapseColumn> 
                            <RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                                Visible="False"
                                <HeaderStyle Width="20px" /> 
                            </RowIndicatorColumn> 
                        </MasterTableView> 
                    </telerik:RadGrid><br /> 
                    &nbsp;<asp:SqlDataSource ID="dsTest" runat="server" ConnectionString="<%$ ConnectionStrings:XXX_ConnectionString %>" 
                        SelectCommand="SELECT * FROM [MyTable]"></asp:SqlDataSource> 
                </ContentTemplate> 
            </asp:UpdatePanel> 
            &nbsp;</div> 
    </form> 
</body> 
</html> 


C# CODEBEHIND
using System; 
using System.Data; 
using System.Configuration; 
using System.Collections; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Web.UI.HtmlControls; 
 
public partial class HiddenRadGridTest : System.Web.UI.Page 
    protected void Page_Load(object sender, EventArgs e) 
    { 
         
    } 
    protected void Button1_Click(object sender, EventArgs e) 
    { 
        Button1.Visible = false
        RadGrid1.Visible = true
    } 


Hari Prasad
Top achievements
Rank 1
 answered on 10 Jul 2012
2 answers
183 views
Hi,

I have a problem since few days with the RadCombox on LoadOnDemande.
The load is OK, but when i select an item in the list and i post the page, i have an error message : "Selection out of range Parameter name : Value"

I don't understand the problem, the same code worked before.

Thanks for help

Aspx code :
<telerik:RadComboBox ID="MRLieu" runat="server"
          AllowCustomText="true"
          ItemRequestTimeout="1000"
          Filter="Contains"
          ShowDropDownOnTextboxClick="false"
          MinFilterLength="2"
          EnableLoadOnDemand="true"
          EnableVirtualScrolling="true"
          ShowToggleImage="false"
          OnClientFocus="ChangeOu"
          OnClientItemsRequesting="OnClientItemsRequesting">
           <webservicesettings method="GetLieu" path="~/Utils/WebService/Utils.asmx" />
</telerik:RadComboBox>

JS Code :
function OnClientItemsRequesting(sender, eventArgs) {
    var context = eventArgs.get_context();
    context["coffret"] = "16";
}
 
function ChangeOu(sender) {
    var lieu = $find("MRech_MRLieu");
    lieu.clearSelection();
    lieu.clearItems();
  }


C# Code WS :
[WebMethod]
[ScriptMethod]
public RadComboBoxItemData[] GetLieu(object context)
{
  IDictionary<string, object> contextDictionary = (IDictionary<string, object>)context;
 
  string txt = contextDictionary["Text"].ToString();
  int coffret = Convert.ToInt32(contextDictionary["coffret"]);
 
  txt = txt.Replace("'", " ");
  txt = txt.Replace("\"", " ");
  txt = string.Concat("\"", txt, "*\"");
 
  string sql = @"MyRequest";
 
  ConnexionUtil cnnUtil = new ConnexionUtil();
  DataTable data = cnnUtil.ExecuteRequeteDataTable(sql);
 
  int itemOffset = Convert.ToInt32(contextDictionary["NumberOfItems"]);
  int endOffset = Math.Min(itemOffset + NBITEMS, data.Rows.Count);
 
  List<RadComboBoxItemData> result = new List<RadComboBoxItemData>();
  RadComboBoxItemData itemData;
  for (int i = itemOffset; i < endOffset; i++)
  {
    itemData = new RadComboBoxItemData();
    itemData.Text = data.Rows[i]["nom"].ToString();
    itemData.Value = data.Rows[i]["id"].ToString();
    result.Add(itemData);
  }
 
  data.Dispose();
  cnnUtil.Dispose();
 
  return result.ToArray();
}
mathieu emptoz
Top achievements
Rank 1
 answered on 10 Jul 2012
17 answers
1.5K+ views
I have a rad upload on a user control and i cannot upload my files because after debugging, i found that RadUpload1.UploadedFiles.Count = 0.  i've looked at the examples and I'm at a loss.  My code is below.  What am I missing?

ASPX
<telerik:RadUpload ID="RadUpload1" runat="server" EnableEmbeddedSkins="false" Skin="Hay2" InitialFileInputsCount="3" ControlObjectsVisibility="All" InputSize="75" Width="700px" />

C#
if (RadUpload1.UploadedFiles.Count > 0)
{
    foreach (UploadedFile validFile in RadUpload1.UploadedFiles)
{
    string targetFolder = Server.MapPath("/attachments/");
    validFile.SaveAs(
Path.Combine(targetFolder, validFile.GetName()), true);
}
labelNoResults.Visible =
false;
repeaterValidResults.Visible =
true;
repeaterValidResults.DataSource = RadUpload1.UploadedFiles;
repeaterValidResults.DataBind();
}
else
{
labelNoResults.Visible =
true;
repeaterValidResults.Visible =
false;
}
Peter Filipov
Telerik team
 answered on 10 Jul 2012
1 answer
80 views
I have a page that contains one Button and one Iframe.
The Button opens one popup(jquery dialog) and the Iframe contains one Telerik.ReportViewer.WebForms.
My problem is that when i open the popup that is above the report, the dropdown from the report tools overlaps the popup.
 
  This problem occurs only on internet explorer 6.

P.S. I have noticed that the export feature does not work :(
Steve
Telerik team
 answered on 10 Jul 2012
3 answers
95 views
I am very new at this so, sorry if this is very basic.

I got a rad grid for all my employees and am trying to have a Race, Sex and Classification drop down box to populate the data.

Is there a way to do that right in the editor?

Do I just replace my bound fields with the dropdownboxes and enter the list of available choices somewhere? 

I can not seem to find a way to do this?

Thanks
Matt
Eyup
Telerik team
 answered on 10 Jul 2012
1 answer
95 views
Hello all ,

i've nested radgrid : Radgrid2 into radgrid1

and i want to get the selected row id when "onRowClick" event fires ,

i wrote this js function :   

 function RowClick(sender, eventArgs) {
        var grid = sender;
        var MasterTable = grid.get_masterTableView();
        var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
        var cell = MasterTable.getCellByColumnUniqueName(row, "Forum_id");
        alert(cell.innerHTML);
    }
 

the client side code is :
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
            <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="true"  OnItemCommand="RadGrid1_ItemCommand" >           
                    <MasterTableView>
                    <NestedViewTemplate>
                        <telerik:RadGrid ID="RadGrid2" runat="server" AllowPaging="True" OnNeedDataSource="RadGrid2_NeedDataSource">                                 
                               <ClientSettings>
                
        <ClientEvents OnRowClick="RowClick"/>
    </ClientSettings>
                       </telerik:RadGrid>
      
                    </NestedViewTemplate>                    
                </MasterTableView>
                <ClientSettings>     
        <ClientEvents OnRowClick="RowClick"/>
    </ClientSettings>
            </telerik:RadGrid>
        </telerik:RadAjaxPanel>

when i click on a row of radgrid1 , js function works rightly .
but when i click on a row of radgrid2 , 2 alert messages appear : the first one gives me the right selected id (what i want ) but the other one gives me the the selected index ..  

how to prevent "onRowClick" event to fire 2 times when i click on radgrid2??  
Tsvetoslav
Telerik team
 answered on 10 Jul 2012
1 answer
100 views
Hi,

I have a RadGrid Control on my WebPage with an editable column.
After edit this column and postback the request, inside the CSharp event

protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
    {
// rg is the RadGrid       
        if (rg != null)
        {
            if (e.Argument == string.Empty)
            {
                rg.Rebind();
            }

            string[] editedItemIds = e.Argument.Split(':');
            int i;
            for (i = 0; i <= editedItemIds.Length - 2; i++)
            {
                try
                {
                    Guid itemId = Guid.Parse(editedItemIds[i]);

//This is the row that give the problem

                    GridDataItem updatedItem = rg.MasterTableView.FindItemByKeyValue("ArticoloId", itemId);
                   
                    UpdateValues(itemId, updatedItem);
                }
                catch
                {
                }
            }
            rg.Rebind();
        }
    }


As told before the rg.MasterTableView.Items collection is empty and so the method "FindItemByKeyValue" does not never return any value.
I follow your example at
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx

Your help will be much appreciated.
Thanks in advance.

Tsvetoslav
Telerik team
 answered on 10 Jul 2012
3 answers
330 views
Hi, i have been using the RadScheduler for a few Days. I want to Display Data from my Database in the Calendar.

My Table looks like that:

RoomName
Description
From-Date
Until-Date

I want to display these Data in the Calendar. I added a SqlDataSource and established an Connection to my Database. I tested the Query and it works. 

My Question is, how can i use this Data to Display the different Appointments in the Calendar. I only want to display them. No new Insert or Update.


Thanks in advcance
Vijaianand
Top achievements
Rank 1
 answered on 09 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?