Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
133 views
Hello.

I have a Grid with an EditMode="Popup". I would like to display a gif image (an animated wheel or anything else) while the popup window is loading (this takes around 1 or 2 seconds).

How can I do this?

Thanks for you help
Regards
Augusto
Augusto
Top achievements
Rank 1
 answered on 01 Dec 2011
2 answers
120 views
Dear all,
I want to write a javascript function  to check a List using CheckBOX in RADGRID below:

If there is no item is checked=> return false;
If there is one or more item(s) is checked=> return true;

Please help me to do it
Thanks alot,
Ky
Top achievements
Rank 1
 answered on 01 Dec 2011
5 answers
331 views
Hello ,

am using  RadAsyncUpload .
below is my code

 

//To validate upload control.
       function validationFailed(sender, eventArgs) {
           $telerik.$(".ErrorHolder").html("");
           $(".ErrorHolder").append("<p>Attachment exceeding the maximum total size for the file '" + eventArgs.get_fileName() + "'.</p>").fadeIn("slow");
       }
       //Remove Error Message.
       function RemoveErrorMessage(sender, eventArgs) {
           $(".ErrorHolder").fadeOut("slow");
       }

 


 

<telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload" MultipleFileSelection="Disabled" TemporaryFolder="attachments"
                            TargetFolder="attachments" MaxFileSize="524288" OnFileUploaded="RadAsyncUpload_FileUploaded"  
                            OnClientValidationFailed="validationFailed" MaxFileInputsCount="1" OnClientFileUploadRemoved="RemoveErrorMessage">
                        </telerik:RadAsyncUpload>


 

public void RadAsyncUpload_FileUploaded(object sender, FileUploadedEventArgs e)
        {
            Label fileName = new Label();
            fileName.Text = e.File.FileName;
            string strFileName = string.Empty;
  
            if (itotalBytes < iMaxTotalBytes)
            {
                // Total bytes limit has not been reached, accept the file
                e.IsValid = true;
                itotalBytes += e.File.ContentLength;
            }
            else
            {
                // Limit reached, discard the file
                e.IsValid = false;
            }
  
            if (e.IsValid)
            {
                string targetFolder = RadAsyncUpload.TargetFolder;
                strFileName = e.File.FileName;
                //If same file uploaded again then it will overwrite.
                e.File.SaveAs(Path.Combine(Server.MapPath(targetFolder), strFileName));
            }
        }

It creates RadUploadTestFile file by default in attachment folder.
Why so?? Can we avoid that?

Plus it creates some wired ext file which i upload ... :(

Mugdha Aditya
Top achievements
Rank 1
 answered on 01 Dec 2011
2 answers
77 views
Hi,
i'm trying to Show and Position the RadDialog on the screen ,but i can't find a way to control the position. So i want to know how can I make ti?
Thank you.
c
Top achievements
Rank 1
 answered on 01 Dec 2011
1 answer
119 views
I am trying to include an user control inside radwindow and trying to open it using readopen but unfortunately this
is not working for me.
<telerik:RadWindow runat="server" ID="RadWindow1" Skin="Vista" KeepInScreenBounds="true" VisibleOnPageLoad="false" Modal="true" Title="Search Client"
       Behaviors="Close,Maximize,Move" Width="500" Height="500">
       <ContentTemplate>
           <cti:ucSearchClient ID="searchClient" runat="server" /> 
       </ContentTemplate>
   </telerik:RadWindow>

On a button click we are trying to call the following javascript method.

function openWindow() {
            var oWnd = radopen(null, "RadWindow1");
        }

Can you please let me know is there a way to open user control using radwindow and get the selected row values into the main page?

we noticed another issue that if we are using Rad Button in place of Html or ASP.net button, it is calling javascript on pageload even before we click and throws error.

Shinu
Top achievements
Rank 2
 answered on 01 Dec 2011
0 answers
115 views
Hi All,

I am new to telerik controls. I really appreciate if you can help me in solving this issue which i have already wasted a lot of time.

Issue:

I have a content page(say Page1) which contains a radComboBox with few items. I have a search image icon to which opens a window popup( this is not radwindow, but ordinary window popup opened using window.open method, cannot use rad window as it is giving issues in the design). Now from the popup i will select an item in the grid, the selected item is an item contained in the rad combo box present in parent page. So based on the item selected in the popup i need to set the item in parent combo box.

I have tried this in the javascript method in the popup page,

var

myarray = window.dialogArguments[0]; 

 

var dd = myarray.parent.document.getElementById("ctl00_ContentBody_radComboPaymentTerms_DropDown")
dd.set_text(selectedvalue);

but this didnt work. it gives an error 'object doesn't support this prop'.

please let me know if there is any other way to solve this issue.

 


Thanks in advance,
Sooraj.S
Sooraj
Top achievements
Rank 1
 asked on 01 Dec 2011
4 answers
144 views

Hi Telerik,

I'm encountering the error below when i tried to use the arrow to in my radgrid to move the page to the next/previous page. The weird thing is when i move the page by clicking on the page number instead of the arrow im not encountering the error. Below is a sample code that recreates the error i'm encountering.

Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

ASPX:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication9.WebForm1" %>
  
<%@ 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">
  
<head runat="server">
    <title></title>
</head>
<body >
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server" />
        <asp:Label ID="lbl_Notification" runat="server" Font-Bold="true" Font-Size="Large" Text="No Row right clicked" />
        <br />
        <telerik:RadGrid ID="RadGrid1" runat="server" 
            AllowFilteringByColumn="true"
            AutoGenerateColumns="false"
            AllowPaging="true" 
            AllowSorting="true" 
            ShowGroupPanel="true" 
            OnNeedDataSource="RadGrid1_NeedDataSource" 
            OnItemDataBound="RadGrid1_ItemDataBound"
            PageSize="15">
            <MasterTableView GroupLoadMode="Client" TableLayout="Fixed" >
                <Columns>
                    <telerik:GridBoundColumn DataField="item1" HeaderText="Item1" />
                    <telerik:GridBoundColumn DataField="item2" HeaderText="Item2" />
                    <telerik:GridBoundColumn DataField="item3" HeaderText="Item3" />
                    <telerik:GridBoundColumn DataField="item4" HeaderText="Item4" />
                    <telerik:GridBoundColumn DataField="item5" HeaderText="Item5" />
                </Columns>
            </MasterTableView>
            <ClientSettings AllowGroupExpandCollapse="True" ReorderColumnsOnClient="True" 
                AllowDragToGroup="True" AllowColumnsReorder="True" EnableRowHoverStyle="True" />            
            <FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>
    </form>
</body>
</html>

C#

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.Collections.ObjectModel;
  
namespace WebApplication9
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //If i remove the binding on page load the error with regards to the post back is not encountered 
            //when clicking the arrow and the number. However the label is not properly updated and the radcontextmenu is no longer 
            //available on right click after postback.
            RadGrid1.Rebind();
        }
  
        protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            ObservableCollection<GridItem> items = new ObservableCollection<GridItem>();
            for (int i = 0; i < 20; i++)
                items.Add(new GridItem(i + 1));
  
            RadGrid1.DataSource = items;
        }
  
        protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item.DataItem != null && e.Item.DataItem.GetType() == typeof(GridItem))
            {
                var menu = new RadContextMenu();
                menu.Targets.Add(new ContextMenuElementTarget() { ElementID = e.Item.ClientID, });
  
                RadMenuItem menu1 = new RadMenuItem("Menu1");
                menu1.Value = (e.Item.ItemIndex + 1).ToString();
                menu1.Attributes["Column1"] = (e.Item.DataItem as GridItem).item1;
                RadMenuItem menu2 = new RadMenuItem("Menu2");
                menu2.Value = (e.Item.ItemIndex + 1).ToString();
                menu2.Attributes["Column1"] = (e.Item.DataItem as GridItem).item1;
                RadMenuItem menu3 = new RadMenuItem("Menu3");
                menu3.Value = (e.Item.ItemIndex + 1).ToString();
                menu3.Attributes["Column1"] = (e.Item.DataItem as GridItem).item1;
                RadMenuItem menu4 = new RadMenuItem("Menu4");
                menu4.Value = (e.Item.ItemIndex + 1).ToString();
                menu4.Attributes["Column1"] = (e.Item.DataItem as GridItem).item1;
                RadMenuItem menu5 = new RadMenuItem("Menu5");
  
                RadMenuItem subItem1 = new RadMenuItem("subMenu1") { Value = (e.Item.ItemIndex + 1).ToString() };
                subItem1.Attributes["Column1"] = (e.Item.DataItem as GridItem).item1;
  
                RadMenuItem subItem2 = new RadMenuItem("subMenu2") { Value = (e.Item.ItemIndex + 1).ToString() };
                subItem2.Attributes["Column1"] = (e.Item.DataItem as GridItem).item1;
  
                menu5.Items.Add(subItem1);
                menu5.Items.Add(subItem2);
  
                menu.Items.Add(menu1);
                menu.Items.Add(menu2);
                menu.Items.Add(menu3);
                menu.Items.Add(menu4);
                menu.Items.Add(menu5);
                menu.ItemClick += new RadMenuEventHandler(menu_ItemClick);
                RadGrid1.Controls.Add(menu);
            }
        }
  
        void menu_ItemClick(object sender, RadMenuEventArgs e)
        {
            lbl_Notification.Text = e.Item.Text + "selected from the radcontextmenu for\nRow " + e.Item.Value + "\n with Column1= " + e.Item.Attributes["Column1"];
        }
    }
  
    public class GridItem
    {
        public string item1 { get; set; }
        public string item2 { get; set; }
        public string item3 { get; set; }
        public string item4 { get; set; }
        public string item5 { get; set; }
  
        public GridItem(int rowNum)
        {
            item1 = "dsadas" + rowNum;
            item2 = "dsadas" + rowNum;
            item3 = "itdsadsaem" + rowNum;
            item4 = "idsadsatem" + rowNum;
            item5 = "itedsadam" + rowNum;
        }
    }
}

C#
Shinu
Top achievements
Rank 2
 answered on 01 Dec 2011
3 answers
76 views
Hello!   could you please direct me to a great example of how (on editing a row) to hook up a drop down on the row to a database class.  It can't be a static list on the page.  So far, I've not been able to find an example or figure this out on my own!

thanks in advance! Tim
Princy
Top achievements
Rank 2
 answered on 01 Dec 2011
1 answer
61 views
Greetings!

Is there any way you could share the code that is used in all of the Rad AJAX demos that allows the user to change the skin?

Many thanks!

Matt
Iana Tsolova
Telerik team
 answered on 01 Dec 2011
1 answer
71 views
I am virtually new to r.a.d. Controls since it has been several years.  Sorry for what is probably a simple question.  I am trying to create a hierarchical layer for reporting several normalized tables.  These tables are custom tables.  The data is very simple.  These tables describe a person (whatever is meant by "person") and will include records like basic information (Name, age, yada yada) which is the master, Phone Numbers, Email Addresses, and Mailing Addresses.

The main table is "Person" (Name, age, yada yada) which is the master.
Subtables 2-4 have variying numbers of records per person.  And, in the case of Mailing Address, have several lines of information per record.
 

Showing these as tables works using the  gridtableview.  However, I need to shrink down the content and have a simple 1 or 2 column table for each of these items. all on the same row underneath the person's basic info.  Every time I set up the tables to work and then try to reformat the data, I get a blank line instead of any information.  I have been trying to use a Panel within the NestedViewTemplate control.  It just ends up turning out blank.  I have tried this many ways and cannot figure out what I am doing wrong.

In the end the information should look like :


Person
Field1    Field2  Field3                              
email                Address                             Home Address            Phone1
email                  Alternate Address             Home Address            Phone2

The basic layout that I tried was as follows with several variations:
RadGrid   person
    NestedViewSettings
        Criteria
    NestedViewTemplate
        ASP:Panel
             RadGrid Address -- or -- GridTable View
               (and repeat for phone and Email)
Person Grid's columns                                   

Any help would be greatly appreciated!

--Larry--
Princy
Top achievements
Rank 2
 answered on 01 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?