Telerik Forums
UI for ASP.NET AJAX Forum
11 answers
232 views
Hello,

Can someone point me to or explain how to get the RadTools installed and working on my server?

I have them installed locally and now I need to display what I have to my client.  I'm building some screens and developing skins for an application so I do not have an actual application, just a couple of pages I need to post for others to view.

I tried to follow the instructions found here: Deploying RadControls on Shared Hosting, http://www.telerik.com/help/aspnet-ajax/installdeployingonsharedhosting.html but I'm lost after step one.  I have a dedicated vertual hosting account with remote access to the desktop.  I got as far as creating a Telerik directory in the "inetpub/wwwroot" directory.  Then it says "Follow the instructions from the first case above."  The first step says "Copy/upload the compiled application via FTP to the production server, i.e. on the shared hosting. The application should reside in the inetpub/wwwroot folder"  but I don't have an application.   How would I get the tools to work if I simply want them to appear on a single Web page?

Thank you,
Bob
Pavlina
Telerik team
 answered on 10 Apr 2009
1 answer
118 views
I am using the ajax rad treeview control.  I am loading treeview nodes on-demand using the serversidecallback property.  The treeview control is in a radupdatepanel.  I am using checkboxes.  When a user expands a node I evaluate whether the node is checked or not in a BuildRADDeptNode Method.  If  it is checked then the new sub-nodes are checked as well.

The problem is that no matter what the parent nodes state is when it is expanded it also gets passed to the event as a checked = false.  This is a real problem.
 

 

protected void RadTree1_NodeExpand(object o,RadTreeNodeEventArgs e)

{

 

 

    RadTreeNode nodeClicked = e.Node;

    BuildRADDeptNode(nodeClicked);

    pnlDeptTree.Visible = true;  

}

Please advise.

 

 

Veselin Vasilev
Telerik team
 answered on 10 Apr 2009
1 answer
85 views
We just upgraded our Telerik Ajax components from version 2008.2.826.20 to 2009.1.402.20 version. How can we update our projects which were written using the 2008 version of the components to the 2009 version

Thanks
Maher
Svetlina Anati
Telerik team
 answered on 10 Apr 2009
2 answers
144 views
I am working off of the basics to this demo 
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=grid

I have the grid in a asp:Panel
If I just leave the panel visible from page load then this works fine.
The issue I am having is I have a RadPanel that is controling multiple asp:Panels setting their visible values from true to false and of course this is all wrapped up in a radajaxmanager.

so when I click on the button to view the RadWindow I get a javascript error 
 Sys.InvalidOperationException: Two components with the same id 'UserListDialog' can't be added to the application

can someone shed some light on this subject for me? I am lost as to why the one way it works
Patrick Carlile
Top achievements
Rank 1
 answered on 10 Apr 2009
5 answers
261 views
I have a Rad Grid that has a RadTreeView inside the FormTemplate.  I am unable to add a required field for that control. I get:

Control 'TreeViewApplicationType2' referenced by the ControlToValidate property of 'RequiredFieldValidator2' cannot be validated.



I also tried a custom validation which also didnt work.  Any ideas?. I am using  q2 2008
Veselin Vasilev
Telerik team
 answered on 10 Apr 2009
2 answers
152 views
In the Rad Tree View for Ajax examples on the website, the progress indicator is set to an image (loading.gif).  How is the loading message replaced with the progress indicator? 

Thanks!
Michelle
michelle
Top achievements
Rank 1
 answered on 10 Apr 2009
2 answers
90 views
Hi,

although I use the spellchecker from RadEditor I guess the topic is placed right here.
My Problem - I have a decorated letter like this:
<h3><span style="color: #ff0000;">E</span>uropean...</h3> 
 
The decoration was made by marking the letter and changing the text color.
Spell now argues that "uropean" is misspelled.

Does this mean Spell is not able to check HTML Text with some kind of "decoration"?

Regards

Manfred
ManniAT
Top achievements
Rank 2
 answered on 10 Apr 2009
1 answer
268 views

I use RadGrid control version 4.6.
I am trying to create a custom pager that have ability, besides jump from one page to another, to change the size of the master table and / or detail table of the grid. I can resize the master table. Unfortunately, when I resize the master table, the dimensions of the detail table also change. It is not the behavior I need.

 

Another problem I have is when I try to change the size of detail table, I’m getting the following exception:

 
Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]

   Telerik.WebControls.GridPageSizeChangedEventArgs.ExecuteCommand(Object source) +18
   Telerik.WebControls.RadGrid.OnBubbleEvent(Object source, EventArgs e) +134
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.WebControls.GridItem.OnBubbleEvent(Object source, EventArgs e) +38
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.WebControls.GridTableView.set_PageSize(Int32 value) +176
   Telerik.WebControls.GridPageChangedEventArgs.ExecuteCommand(Object source) +722
 
[GridException: The specified value cannot be set on PageSize]
   Telerik.WebControls.GridPageChangedEventArgs.ExecuteCommand(Object source) +822
   Telerik.WebControls.RadGrid.OnBubbleEvent(Object source, EventArgs e) +134
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.WebControls.GridItem.OnBubbleEvent(Object source, EventArgs e) +38
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.WebControls.GridItem.OnBubbleEvent(Object source, EventArgs e) +38
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.WebControls.GridItem.OnBubbleEvent(Object source, EventArgs e) +115
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175

   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

 

Belowyou will find the sample code that you can use to reproduce the problems I described above. Can somebody helps me to figure out if I did anything wrong?

 

Thank you very much in advance for all your help !!!

 

 

 

 

 

WWR.Master:
 

<%@ Master Language="C#" AutoEventWireup="true" Codebehind="WWR.Master.cs" Inherits="TestingStaff.WWR" %>

 

 

 

<!

 

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></title>

 

</

 

head>

 

<

 

body>

 

 

 

 

 

<form id="form1" runat="server">

 

 

 

 

 

<asp:ContentPlaceHolder ID="cp1" runat="server" />

 

 

 

 

 

</form>

 

</

 

body>

 

</

 

html>

 

 

 

 

 

 

GridPager.aspx:

<%@ Page Language="C#" MasterPageFile="~/MasterPage/WWR.Master" AutoEventWireup="true" 

 

 

CodeBehind="GridPager.aspx.cs" Inherits="TestingStaff.GridPager" Title="Grid Pager" %>

 

 

<%

 

@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="radG" %>

 

 

 

<asp:Content ID="Content1" ContentPlaceHolderID="cp1" runat="server">

 

 

 

<radG:RadGrid ID="rgSchedules" runat="server" Skin="Yellow" Width="100%" AllowPaging="true"  OnNeedDataSource="rgSchedules_NeedDataSource">

 

 

 

<MasterTableView Name="Master" DataKeyNames="ScheduleId">

 

 

 

<Columns>

 

 

 

<radG:GridBoundColumn DataField="ScheduleId" HeaderText="Schedule ID" UniqueName="ScheduleId" />

 

 

 

<radG:GridBoundColumn DataField="ScheduleName" HeaderText="Schedule Name" UniqueName="ScheduleName" />

 

 

 

</Columns>

 

 

 

<DetailTables>

 

 

 

<radG:GridTableView runat="server" Name="Detail" Width="100%" GridLines="Both">

 

 

 

<ParentTableRelation>

 

 

 

<radG:GridRelationFields DetailKeyField="ScheduleId" MasterKeyField="ScheduleId" />

 

 

 

</ParentTableRelation>

 

 

 

<Columns>

 

 

 

<radG:GridBoundColumn DataField="ClientId" HeaderText="Client ID" UniqueName="ClientNumber" />

 

 

 

<radG:GridBoundColumn DataField="ClientName" HeaderText="Client Name" UniqueName="ClientName" />

 

 

 

<radG:GridBoundColumn DataField="ScheduleId" UniqueName="ScheduleId" Visible="false" />

 

 

 

</Columns>

 

 

 

</radG:GridTableView>

 

 

 

</DetailTables>

 

 

 

</MasterTableView>

 

 

 

</radG:RadGrid>

 

</

 

 

asp:Content>


GridPager.aspx.cs:
 

 

 

using

 

System;

 

 

 

 

using System.Web.UI;

 

 

 

 

using System.Collections.Generic;

 

 

 

 

using Telerik.WebControls;

 

 

 

 

namespace TestingStaff

 

 

 {

 

 

public partial class GridPager : Page

 

 

 {

 

 

private class Schedule

 

 

 

 

 

{

 

 

 

private int scheduleID;

 

 

private string scheduleName;

 

 

public int ScheduleID

 

{

 

get { return scheduleID; } set { scheduleID = value; } }

 

 

 

 

public string ScheduleName

 

 

{

 

get { return scheduleName; } set { scheduleName = value; } }

 

 

}

 

 

private class Client

 

 

 

 

 

{

 

 

 

 

private int clientID;

 

 

 

 

private string clientName;

 

 

 

 

private int scheduleID;

 

 

 

public int ClientID

 

{

 

get { return clientID; } set { clientID = value; }

 

}

 

public string ClientName

{

 

 

get { return clientName; } set { clientName = value; }

 

 

}

 

 

public int ScheduleID

 

 

 {

 

 

get { return scheduleID; }

 

 

 

 

set { scheduleID = value; }

 

 

}

}

 

protected void Page_Init(object sender, EventArgs e)

{

 

 

WWRAdvancedPager pagerSchedules = new WWRAdvancedPager(rgSchedules);

 

 

 rgSchedules.MasterTableView.PagerTemplate = pagerSchedules;

rgSchedules.ItemDataBound +=

 

 

new GridItemEventHandler(pagerSchedules.ItemDataBound);

 rgSchedules.MasterTableView.DetailTables[0].PagerTemplate = pagerSchedules;

}

 

 

protected void rgSchedules_NeedDataSource(object source, GridNeedDataSourceEventArgs e)

 

 

{

 

 

List<Schedule> schedules = new List<Schedule>();
List<Client> clients = new List<Client>();

 

 

 

for (int i = 1; i <= 2; i++)

 

{

 

 

Schedule schedule = new Schedule();

 

 

schedule.ScheduleID = i;

schedule.ScheduleName =

 

"Schedule " + i.ToString();

 

 

schedules.Add(schedule);

 

 

for (int j = 1; j <= 10; j++)

 

 

 {

 

 

Client client = new Client();

 

 

 client.ClientID = j;

client.ClientName =

 

" Client " + j.ToString() + " of Schedule " + i.ToString();

 

 

 client.ScheduleID = i;

clients.Add(client);

}

}

rgSchedules.DataSource = schedules;

rgSchedules.MasterTableView.DetailTables[0].DataSource = clients;

}

}

}


WWRAdvancedPager.cs:

 

using

 

 

System;

 

 

 

using System.Collections.Generic;

 

 

using System.Text;

 

 

using System.Web.UI;

 

 

using System.Web.UI.HtmlControls;

 

 

using System.Web.UI.WebControls;

 

 

using Telerik.WebControls;

 

 

 

 

 

 

namespace

 

 

TestingStaff

 

 

 {

 

 

public class WWRAdvancedPager : ITemplate

 

 

 

 

 

 

{

 

 

 

private RadGrid _grid;

 

 

 

public WWRAdvancedPager() : base() {}

 

 

 

public WWRAdvancedPager(RadGrid rg) : base() {_grid = rg;}

 

 

 

public void InstantiateIn(Control container)

 

 {

 

HtmlGenericControl MainSpan = new HtmlGenericControl("span");

MainSpan.ID =

 

"MainSpan";

 

 

MainSpan.Attributes.Add(

 

"style", "line-height: 14pt");

 

 

 

 

 

Literal ChangePageLiteral2 = new Literal();

 

ChangePageLiteral2.ID =

"ChangePageLiteral2";

 

 

ChangePageLiteral2.Text =

 

"Change page: ";

 

 

MainSpan.Controls.Add(ChangePageLiteral2);

 

 

TextBox GoToPageTextBox = new TextBox();

GoToPageTextBox.ID =

 

"GoToPageTextBox";

 

 

GoToPageTextBox.AutoPostBack =

 

false;

 

 

 GoToPageTextBox.Columns = 4;

MainSpan.Controls.Add(GoToPageTextBox);

 

 

Literal SpaceLiteral = new Literal();

 

 

 SpaceLiteral.Text =

 

" ";

 

 

 MainSpan.Controls.Add(SpaceLiteral);

 

 

LinkButton GoToPageLinkButton = new LinkButton();

 

 

 GoToPageLinkButton.ID =

 

"GoToPageLinkButton";

 

 

 GoToPageLinkButton.CommandName =

 

"Page";

 

 

GoToPageLinkButton.CommandArgument =

 

"GoToPage";

 

 

 GoToPageLinkButton.Text =

 

"Go";

 

 

 MainSpan.Controls.Add(GoToPageLinkButton);

 

 

Literal ItemsDisplayedLiteral = new Literal();

 

 

 ItemsDisplayedLiteral.ID =

 

"ItemsDisplayedLiteral";

 

 

 ItemsDisplayedLiteral.Text =

 

"&nbsp;&nbsp;&nbsp;&nbsp;Items displayed: ";

 

 

 

 

LinkButton ChangePageSizeLinkButton = new LinkButton();

 

 

 ChangePageSizeLinkButton.ID =

 

"ChangePageSizeLinkButton";

 

 

ChangePageSizeLinkButton.CommandName =

 

"Page";

 

 

ChangePageSizeLinkButton.CommandArgument =

 

"ChangePageSize";

 

 

ChangePageSizeLinkButton.Text =

 

"Change";

 

 

 

 

RangeValidator ChangePageSizeValidator = new RangeValidator();

 

 

 ChangePageSizeValidator.ID =

 

"ChangePageSizeValidator";

 

 

 ChangePageSizeValidator.ControlToValidate =

 

"ChangePageSizeTextBox";

 

 

 ChangePageSizeValidator.EnableClientScript =

 

true;

 

 

 ChangePageSizeValidator.MinimumValue =

 

"1";

 

 

 ChangePageSizeValidator.MaximumValue =

 

"1";

 

 

 ChangePageSizeValidator.Type =

 

ValidationDataType.Integer;

 

 

 ChangePageSizeValidator.Display =

 

ValidatorDisplay.Dynamic;

 

 

 

 

TextBox ChangePageSizeTextBox = new TextBox();

 

 

 ChangePageSizeTextBox.ID =

 

"ChangePageSizeTextBox";

 

 

 ChangePageSizeTextBox.AutoPostBack =

 

false;

 

 

 ChangePageSizeTextBox.Columns = 3;

SpaceLiteral =

 

new Literal();

 

 

 SpaceLiteral.Text =

 

" ";

 

 

 MainSpan.Controls.Add(ItemsDisplayedLiteral);

MainSpan.Controls.Add(ChangePageSizeTextBox);

MainSpan.Controls.Add(SpaceLiteral);

MainSpan.Controls.Add(ChangePageSizeLinkButton);

container.Controls.Add(MainSpan);

}

 

 

 

public void ItemDataBound(object sender, GridItemEventArgs e)

 {

 

 

if (e.Item is GridPagerItem)

 

 

 {

 

 

GridPagerItem PagerItem = (GridPagerItem)e.Item;

 

 

 BindPagerItem(PagerItem);

}

}

 

 

private void BindPagerItem(GridPagerItem pagerItem)

 

 

 {

 

 

TextBox GoToPageTextBox = (TextBox)pagerItem.FindControl("GoToPageTextBox");

 

 

 GoToPageTextBox.Text = (pagerItem.Paging.CurrentPageIndex + 1).ToString();

 

 

LinkButton GoToPageLinkButton = (LinkButton)pagerItem.FindControl("GoToPageLinkButton");

 

 

 GoToPageTextBox.Attributes.Add(

 

 

"onclick", "javascript:document.getElementById('" + GoToPageTextBox.ClientID + "').focus();document.getElementById('" + GoToPageTextBox.ClientID + "').select();");

 GoToPageTextBox.Attributes.Add(

 

 

"onkeydown", "javascript:if((event.which && event.which == 13) || (event.keyCode && event.keyCode == 13)){document.getElementById('" + GoToPageLinkButton.ClientID + "').click();if(this.value>0)return false;else document.getElementById('" + GoToPageTextBox.ClientID + "').select(); return true;}else return true;"); 

 

 

TextBox ChangePageSizeTextBox = (TextBox)pagerItem.FindControl("ChangePageSizeTextBox");

 

 

 

if (pagerItem.Paging.PageSize > pagerItem.Paging.LastIndexInPage + 1)

 

{

ChangePageSizeTextBox.Text = (pagerItem.Paging.LastIndexInPage + 1).ToString();

}

 

 

else

 

{

 

ChangePageSizeTextBox.Text = pagerItem.Paging.PageSize.ToString();

}

 

LinkButton ChangePageSizeLinkButton = (LinkButton)pagerItem.FindControl("ChangePageSizeLinkButton");

ChangePageSizeTextBox.Attributes.Add(

 

 

"onclick", "javascript:document.getElementById('" + ChangePageSizeTextBox.ClientID + "').focus();document.getElementById('" + ChangePageSizeTextBox.ClientID + "').select();");

ChangePageSizeTextBox.Attributes.Add(

 

 

"onkeydown", "javascript:if((event.which && event.which == 13) || (event.keyCode && event.keyCode == 13)){document.getElementById('" + ChangePageSizeLinkButton.ClientID + "').click();if(this.value>0)return false;else document.getElementById('" + ChangePageSizeTextBox.ClientID + "').select(); return true;}else return true;");

_grid.PagerStyle.AlwaysVisible =

 

true;

 

 

 }

}

}

 

 

 

 

 

 

Sebastian
Telerik team
 answered on 10 Apr 2009
11 answers
277 views
hello. I have already review the docs on how to programmatically design a radgrid in code behind but don't think it is supporting my scenario.
I have a grid desiged in basic source mode. <radgrid><mastertable><columns></columns> etc..
I have been requested to design three more grids in the same container page that are identical in nature but only have different embedded filter expressions. same DatasourceID, columns etc..
Is there any way I can just drop something like 

 

 

 

 

<telerik:RadGrid ID="RadGrid3" runat="server">  
</telerik:RadGrid> 
 

in my container and then run something like 

 

 If Not IsPostBack Then  
   For Each item As GridColumn In RadGrid1.MasterTableView.Columns  
      RadGrid3.MasterTableView.Columns.Add(item)  
   Next  
RadGrid3.MasterTableView.FilterExpression = "SomeCol= 'SomeValue'" 
RadGrid3.DataSourceID = RadGrid1.DataSourceID  
RadGrid3.DataBind()  
 End If  
 
This works at runtime but then on any rebind or paging change the grid returns with System.Data.DataRowView.
hoping there is an easy for this vs creating custom class file. or new object with a bunch of different properties.

 

 

Sebastian
Telerik team
 answered on 10 Apr 2009
2 answers
70 views
I have a piece of code that on save click it validates the users data input.
  If myErrorMsg.Length > 0 Then  
            'myErrorMsg.Insert(0, "Please fix the following errors: <br/>", 1)  
            'RadAjaxManager1.Alert(myErrorMsg.ToString)  
            ScriptManager.RegisterStartupScript(Page, GetType(Page), "RadAlertScript", "Sys.Application.add_load(function(){radalert('" & myErrorMsg.ToString & "',330,210,'Please fix the following errors: ');});", True)  
        End If 
This works fine.  If the data is not correct it will pop the RadAlert.  The issue is if the user does not leave the screen and selects another entry from the grid, it pops the Radalert with every update.

The pages uses RadAjaxManager , RadWindows manager, and acouple of RadGrids.  I only want the RadAlert to show when the save button is clicked and there is an error in the data collected.
Eric
Top achievements
Rank 1
 answered on 10 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?