Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
77 views
Hi,
We are currently evaluating if we should use clientside databinding. In your projects I see that you are using list of classes representing tables in your getdata method. In our case we can't do that, therefore I was wondering if a more generic list type was supported. I tried returning IEnumerable, but that did not work.
staron
Top achievements
Rank 1
 answered on 02 Mar 2009
6 answers
134 views

I have a custom dialog for Quicktime movies I'm just using a simple
object embed etc..

so I am returning a file name and using the editor.pasteHTML method

when I use the editor.pasteHTML it is not pasting the <param> tags in my string, its like it is stripping them out completely

heres the code, why woulkd it be doing this???


var myCallbackFunction = function(sender, args)

{

if(content == "")

{

content = args.name;

}

editor.pasteHtml(String.format(

"<div><div style=\"background: #000; vertical-align: middle; text-align: center\"><object style=\"background-color: #000000\" codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\" height=\"376\" width=\"640\" classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\"><param name=\"SRC\" VALUE=\"/assets/Media/{0}\"><param name=\"AUTOPLAY\" VALUE=\"true\"><param name=\"AUTOSTART\" VALUE=\"true\"><param name=\"CONTROLLER\" VALUE=\"true\"><param name=\"kioskmode\" VALUE=\"true\"><param name=\"bgcolor\" value=\"#000000\" ><EMBED SRC=\"/assets/Media/{0}\" originalAttribute="SRC" originalPath="\"/assets/Media/{0}\"" WIDTH=\"640\" HEIGHT=\"376\" kioskmode=\"true\" AUTOPLAY=\"true\" CONTROLLER=\"true\" PLUGINSPAGE=\"http://www.apple.com/quicktime/download/\"></EMBED></object></div></div>", args.name))

}

editor.showDialog(

"InsertVideo", {}, myCallbackFunction);

};

Yazhou
Top achievements
Rank 1
 answered on 02 Mar 2009
1 answer
163 views
Hi,
I have gone through with http://www.telerik.com/support/kb/aspnet-ajax/window/calling-radalert-from-codebehind.aspx. My case is, i have a aspx page with 4 frame and each frame contains a aspx page. from Frame A, i enter a code, based on this code frame 2 load, if nothing is found shows an message. I want to show this message by radalert. How can i do this?

thanks in advance

Mamun
Georgi Tunev
Telerik team
 answered on 02 Mar 2009
3 answers
107 views

<telerik:GridDropDownColumn DataField="id_zeme" HeaderText="Zeme" ListDataMember="typZeme"

ListTextField="nazev_zeme" ListValueField="id_zeme" UniqueName="id_zeme">

</telerik:GridDropDownColumn>

 

p_RadGrid.ExportSettings.ExportOnlyData = true;

p_RadGrid.ExportSettings.IgnorePaging = true;

p_RadGrid.ExportSettings.OpenInNewWindow = true;

 p_RadGrid.ExportSettings.FileName = p_Nazev;

This code is running in ASP. NET --> finish in Excel is ListTextField (I have version RadGrid_5_1_5_dev.exe)
no in ASP.NET AJAX  --> finish in Excel is ListValueField (I have version RadControls_for_ASP.NET_AJAX_2008_3_1314_dev.exe)

It's OK ?

Daniel
Telerik team
 answered on 02 Mar 2009
3 answers
162 views
I've got a RadGrid with an "Add" link button at the bottom in the CommandItem.  What event is fired off when the user clicks that button?  I've got an ItemCommand method that does things for "Edit", "RowClick", etc. but clicking on this button does not trigger that event...  Also, on the other side of the CommandItem bar is the "Refresh".  Is that tied to an event as well?  Can't find either of those.  Can someone help me out?

Thanks!
Sebastian
Telerik team
 answered on 02 Mar 2009
2 answers
134 views
I'm currently working on a form for user searching and have found an interesting behavior for the radcombobox. When a user searches the value of the selected dropdown I can get the value no problem. If the user then hits the back button the correct value is selected in the dropdown but when they search again the selected value is then changed to the first value in the list. I pasted some simple code below that works as I described. Is this a bug in the control? This is not how dropdownbox performs on the back button its selected value is its selected value.

<

telerik:RadScriptManager ID="sadsad" runat="server"></telerik:RadScriptManager>

<telerik:RadComboBox ID="tst" runat="server">

<Items>

<telerik:RadComboBoxItem Text="TESTING" Value="" />

<telerik:RadComboBoxItem Text="TESTING2" Value="TESTING2" />

</Items>

</telerik:RadComboBox>

<asp:Button ID="tstButton" runat="server" Text="TEST" OnClick="tstButton_Click" />

protected

void Page_Load(object sender, EventArgs e)

{

}

protected void tstButton_Click(object sender, EventArgs e)

{

System.Diagnostics.

Debug.Write(tst.SelectedValue);

}

Maria
Top achievements
Rank 1
 answered on 02 Mar 2009
1 answer
77 views
Greetings,

I'm using the RadGrid control as part of a Sharepoint web part. I need to be able to change the font and color fopr some items. I can't seem to grasp the concept of overriding any css styles. As an example I need to change the HeaderStyle font to "Trebuchet MS" but can't seem to figure that part out. I also need to change the alternating itemstyle backcolor to "#f6f6f6", but I only get actual color names in the intellisense. So I'm assuming that I need to override that somehow.

The web part is built programatically.

If anyone can help me that'd be great.

Thanks,

-Matt

Dimo
Telerik team
 answered on 02 Mar 2009
3 answers
166 views
I have a situation where we are getting an error loading viewstate.  The setup (code below) is that we have a page, using a master page.  On the master page we have a radwindowmanager.  That master page plugs 2 windows into its list that are common to all pages.  Inside our specific content pages, we have dynamic code that reads an xml file and uses that info to add additional windows to the radwindowmanager.  In this way, the master page handles making global windows available (like Help, Settings, etc.) and each content page adds whatever windows it needs to that.

Anyway, in those same content pages we also have ajaxpanels containing things like calendar controls, grids, and things like that.  What I've found is that after adding all the dynamic window code, using the controls in the ajaxpanel (like going to the next month on a calendar) causes the viewstate loading error.

What's the best way to correct this problem and also follow good design for all pages that do this?

Here's the .cs for the content page that shows the windows being built dynamically.  The relevant stuff is the SetupWindows method:

 

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;  
using Sample.Schedule.Views;  
using Microsoft.Practices.ObjectBuilder;  
using Telerik.Web.UI;  
using Sample.CommonShared;  
using Sample.Messaging.Interface;  
 
namespace Sample.Schedule.Views  
{  
    public partial class ScheduleDefault : Microsoft.Practices.CompositeWeb.Web.UI.Page, IDefaultView  
    {  
        private DefaultViewPresenter _presenter;  
 
        protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!this.IsPostBack)  
            {  
                this._presenter.OnViewInitialized();  
                SetupWindows();  
            }  
            this._presenter.OnViewLoaded();  
        }  
 
        [CreateNew]  
        public DefaultViewPresenter Presenter  
        {  
            get 
            {  
                return this._presenter;  
            }  
            set 
            {  
                if (value == null)  
                    throw new ArgumentNullException("value");  
 
                this._presenter = value;  
                this._presenter.View = this;  
            }  
        }  
 
 
        private void SetupWindows()  
        {  
            RadWindowManager mgr = this.Master.FindControl("RadWindowManagerMaster"as RadWindowManager;  
            if (null == mgr)  
                throw new Exception("Contacts : RadWindowManager not found");  
 
            TypedDialog tds = new TypedDialog();  
            tds.ReadXml(Server.MapPath(this._presenter.msg.GetMessage("schedule_dialogxml")));  
 
            RadWindow thewin = new RadWindow();  
 
            for (int i = 0; i < tds.window.Count; i++)  
            {  
                thewin.NavigateUrl = tds.window[i].navigateurl;  
                thewin.ID = tds.window[i].id;  
                thewin.VisibleOnPageLoad = false;  
                thewin.Width = tds.window[i].width;  
                thewin.Height = tds.window[i].height;  
                thewin.EnableEmbeddedSkins = (tds.window[i].enableembeddedskins == "true");  
                thewin.Skin = tds.window[i].skin;  
                if (string.Empty != tds.window[i].onclientclose) thewin.OnClientClose = tds.window[i].onclientclose;  
                if ("true" == tds.window[i].ismodal) thewin.Modal = true;  
                thewin.VisibleStatusbar = false;  
                mgr.Windows.Add(thewin);  
 
                thewin = new RadWindow();  
            }  
            thewin.Dispose();  
        }  
    }  
}  
 

 

...and here's the content page aspx file:

 

<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Default.aspx.cs" Inherits="Sample.Schedule.Views.ScheduleDefault" 
    Title="Default" MasterPageFile="~/Shared/DefaultMaster.master" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Register src="../RecentDeployments.ascx" tagname="RecentDeployments" tagprefix="uc1" %> 
<%@ Register src="../ScheduleCalendar.ascx" tagname="ScheduleCalendar" tagprefix="uc2" %> 
<asp:Content ID="content" ContentPlaceHolderID="DefaultContent" Runat="Server">  
<link href="../Css/Schedule/Schedule.css" rel="stylesheet" type="text/css" /> 
<link href="../Css/UserControls/RecentDeployments.css" rel="stylesheet" type="text/css" /> 
<link href="../Css/UserControls/ScheduleCalendar.css" rel="stylesheet" type="text/css" /> 
 
<telerik:RadFormDecorator ID="RadFormDecorator1" Runat="server" Skin="Sample" EnableEmbeddedSkins="false" DecoratedControls="All" /> 
 
    <script type="text/javascript">  
        //<![CDATA[
        function showGetStarted() {
            var oM = GetRadWindowManager();
            var oW = oM.GetWindowByName("wndDeploy");
            oW.Show();
        }
        function showAddContacts() {
            var oM = GetRadWindowManager();
            var oW = oM.GetWindowByName("wndAddContacts");
            oW.Show();
        }
        function showUploadContacts() {
            var oM = GetRadWindowManager();
            var oW = oM.GetWindowByName("wndUploadContacts");
            oW.Show();
        }
        function showEditContacts() {
            var oM = GetRadWindowManager();
            var oW = oM.GetWindowByName("wndEditContacts");
            oW.Show();
        }
        function OnClientClose(radWindow) {
            //TODO window.location.href = window.location.href;
        }
        //]]> 
    </script> 
 
<div id="contentpage">  
<div class="schedule_fullwidth marginbottom-30">  
    <div class="schedule_leftpod">  
        <h3><asp:Label ID="lblDeploy" runat="server" Text="<%$ Resources:WebResources, dash_deployer_lbldeploy %>"/></h3> 
        <h4>Get started Now</h4> 
        <p> 
            <asp:Label ID="lblGetStartedNow" runat="server" Text="<%$ Resources:WebResources, dash_deployer_lblgetstartednow %>"/><br /> 
            <asp:Button ID="btnGetStarted" runat="server" OnClientClick="showGetStarted();return false;" Text="<%$ Resources:WebResources, button_getstarted %>" />   
        </p> 
        <div class="schedule_leftpod_data">  
            <h4><asp:Label ID="lblContacts" runat="server" Text="<%$ Resources:WebResources, dash_deployer_lblcontacts %>"/></h4> 
            <p> 
                <asp:Label ID="lblContactsCount" runat="server" Text="<%$ Resources:WebResources, dash_deployer_lblcontactscount %>"/><br /> 
                <asp:Label ID="lblGroupsCount" runat="server" Text="<%$ Resources:WebResources, dash_deployer_lblgroupscount %>"/>  
            </p> 
        </div> 
        <div class="schedule_leftpod_icons">  
            <img src="../Images/deployer-dashboard-contact_male.png" alt="deployer-dashboard-contact_male" width="40" height="50"/>  
            <img src="../Images/deployer-dashboard-contact_female.png" alt="deployer-dashboard-contact_female" width="40" height="50"/>  
        </div> 
        <div class="clear"></div> 
        <p> 
            <asp:Button ID="btnAddContacts" runat="server" OnClientClick="showAddContacts();return false;" Text="<%$ Resources:WebResources, button_addcontacts %>" /><br /> 
            <asp:Button ID="btnEditContacts" runat="server" OnClientClick="showEditContacts();return false;" Text="<%$ Resources:WebResources, button_edit %>" /><br /> 
            <asp:Button ID="btnUploadContacts" runat="server" OnClientClick="showUploadContacts();return false;" Text="<%$ Resources:WebResources, button_uploadcontacts %>" /><br /> 
        </p> 
    </div> 
    <div class="schedule_rightpod">  
        <div class="schedule_rightpod_title">  
            <h3>Schedule</h3> 
        </div> 
        <div class="schedule_rightpod_description">  
            <p>August Stats: 23 Campaigns</p> 
        </div> 
        <div class="clear"></div> 
        <div class="schedule_rightpod_headeritems">  
            <p><img src="../Images/deployer-dashboard-icon_brochure.png" alt="deployer-dashboard-icon_brochure" width="28" height="26"/><strong>BROCHURE<br /></strong>Brochures</p> 
        </div> 
        <div class="schedule_rightpod_headeritems">  
            <p><img src="../Images/deployer-dashboard-icon_email.png" alt="deployer-dashboard-icon_email" width="31" height="25"/><strong>EMAIL&nbsp;&nbsp;&nbsp;<br /></strong>Emails</p> 
        </div> 
        <div class="schedule_rightpod_headeritems">  
            <p><img src="../Images/deployer-dashboard-icon_ecard.png" alt="deployer-dashboard-icon_ecard" width="26" height="26"/><strong>ECARD&nbsp;&nbsp;<br /></strong>Emails</p> 
        </div> 
        <div class="schedule_rightpod_headeritems">  
            <p><img src="../Images/deployer-dashboard-icon_newsletter.png" alt="deployer-dashboard-icon_newsletter" width="24" height="27"/><strong>NEWSLETTER<br /></strong>Newsletters</p> 
        </div> 
        <div class="schedule_rightpod_headeritems">  
            <p><img src="../Images/deployer-dashboard-icon_coversplash.png" alt="deployer-dashboard-icon_coversplash" width="22" height="26"/><strong>COVERSPLASH<br /></strong>Surveys</p> 
        </div> 
        <div class="schedule_rightpod_headeritems">  
            <p><img src="../Images/deployer-dashboard-icon_form.png" alt="deployer-dashboard-icon_form" width="28" height="26"/><strong>FORM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /></strong>Documents</p> 
        </div> 
        <div class="clear"></div> 
        <div class="schedule_rightpod_calendar">  
        <telerik:RadAjaxPanel ID="ajaxpanelScheduleCalendar" runat="server" Height="375px" Width="660px" LoadingPanelID="ajaxloadingpanelScheduleCalendar">  
            <uc2:ScheduleCalendar ID="ScheduleCalendar1" runat="server" width="660" height="375" /> 
        </telerik:RadAjaxPanel> 
        </div> 
    </div> 
</div> 
<div class="schedule_fullwidth">  
</div> 
<telerik:RadAjaxLoadingPanel ID="ajaxloadingpanelScheduleCalendar" runat="server" Height="75px" 
    Width="75px">  
    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
        style="border: 0px;" /> 
</telerik:RadAjaxLoadingPanel> 
</asp:Content> 
 
 

We'll have many pages that take this approach of dynamic window instantiation, plugged into master page radwindowmanager, and multiple ajaxpanels on the content page doing "stuff."

Thx.
Fiko
Telerik team
 answered on 02 Mar 2009
1 answer
140 views
hi

Based on your demo http://demos.telerik.com/aspnet-ajax/controls/examples/integration/raduploadinajaxifiedgrid/defaultcs.aspx?product=upload. How do I upload default image when the user did not select any picture for upload?

For example. i want to upload a NoImage.gif if user did not select any picture for upload. Thanks
Atanas Korchev
Telerik team
 answered on 02 Mar 2009
0 answers
111 views
Hi there,

I have a menu called "A" and I want to attach a menu called "B" to several menu items of "A", without duplicating "B".

First, I guessed there were a possibiliy to attach a menu to another menu but (tell me if I'm wrong) it's not possible.

So, I tried to put "B" in an user control but RadMenu don't allow to put an user control as menu item child.

Then, I tried to attach / copy "B" programatically to menu items of "A" but this acts as a move instead of copy.

Finally, I think the best way is to create an XML file for "A" and another for "B", and to programatically bind "B" to menu items of "A". Is anybody can confirm this option ?
Florian
Top achievements
Rank 1
 asked on 02 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?