Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
239 views
hello,
 how are you all?

i recently started to work with "Prometheus" Scheduler.

i placed on a page Scheduler and Calender.

whem i dont use RadAjaxManager its work fine,i mean selecting a date on the calendar do effect the scheduler - ofcourse  with postback.

when i add the RadAjaxManager to the page i keep getting this JS error :

sys.webforms.pagerequestmanager is null - what is this?

hope some one can help me.

thanks.

here is my form and code  behind :

<%

@ Page Language="C#" MasterPageFile="~/Basic.master" AutoEventWireup="true" CodeFile="prometheus.aspx.cs"

Inherits="prometheus" Title="Untitled Page" EnableEventValidation="false" %>

<%

@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<

asp:Content ID="Content1" ContentPlaceHolderID="PageTitle" runat="Server">

<title>Promotheus</title>

</

asp:Content>

<

asp:Content ID="Content2" ContentPlaceHolderID="TopHeader" runat="Server">

Promotheus

</

asp:Content>

<

asp:Content ID="Content3" ContentPlaceHolderID="PageInnerTitle" runat="Server">

Promotheus

</

asp:Content>

<

asp:Content ID="Content4" ContentPlaceHolderID="Content" runat="Server">

<asp:ScriptManager ID="ScriptManager" runat="server" />

<telerik:RadAjaxManager EnableAJAX=true ID="RadAjaxManager1" runat="server" OnAjaxSettingCreating="RadAjaxManager1_AjaxSettingCreating">

</telerik:RadAjaxManager>

<telerik:RadCalendar runat="server" ID="RadCalendar1" Skin="Office2007" AutoPostBack="true"

EnableMultiSelect="false" DayNameFormat="Shortest" UseRowHeadersAsSelectors="true"

OnSelectionChanged="RadCalendar1_SelectionChanged">

</telerik:RadCalendar>

<telerik:RadScheduler ShowViewTabs="false" runat="server" ID="RadScheduler1" Width="100%"

Height="565px" Skin="Office2007" DataKeyField="ID" DayEndTime="18:00:00" DayStartTime="08:00:00"

TimeZoneOffset="03:00:00" SelectedView="WeekView" WeekHeaderDateFormat="dd.MM"

OnAppointmentCreated="RadScheduler1_AppointmentCreated">

</telerik:RadScheduler>

</

asp:Content>


Code Behind :


protected

void Page_Load(object sender, EventArgs e)

{

RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadCalendar1,RadScheduler1);

if (!IsPostBack)

{

//Machines.DataSource = bpss.BLL.Machine.GetAll();

RadCalendar1.SelectedDate = RadScheduler1.SelectedDate;

RadCalendar1.FocusedDate = RadScheduler1.SelectedDate;

LoadData();

}

}

private void LoadData()

{

machineID =

Utilities.ParseIntSafe(1);

if(machineID>0)

{

machine =

new bpss.BLL.Machine(1);

RadScheduler1.DataSource =

machine.GetTimeTableAndOrders(RadScheduler1.SelectedDate, RadScheduler1.SelectedDate.AddDays(7));

RadScheduler1.DataStartField =

"Start";

RadScheduler1.DataEndField =

"End";

RadScheduler1.DataSubjectField =

"Notes";

}

DataBind();

}

protected void RadCalendar1_SelectionChanged(object sender, Telerik.Web.UI.Calendar.SelectedDatesEventArgs e)

{

if (RadCalendar1.SelectedDates.Count > 0)

{

RadScheduler1.SelectedDate = RadCalendar1.SelectedDate;

}

}

 

protected void RadAjaxManager1_AjaxSettingCreating(object sender, AjaxSettingCreatingEventArgs e)

{

e.UpdatePanel.UpdateMode =

UpdatePanelUpdateMode.Always;

}

Vlad
Telerik team
 answered on 11 Sep 2008
0 answers
95 views
Iam using rad horrizontal menu, on mouseover it displays the submenu items vertically, and on putting mouse on any of the submenu items it displays further submenu items to its right, it is working fine in IE7, Mozilla and Safari,

But it is a crash in IE6, as it doesn't display the 2nd level sub-items at right side to its vertical parent(sub menu item to main horrizontal menu items).

Plz help,
Thank you,
Aman Verma
aman
Top achievements
Rank 1
 asked on 11 Sep 2008
2 answers
311 views
I need to turn off  "No child records to display."

How can I do this?
Shinu
Top achievements
Rank 2
 answered on 11 Sep 2008
0 answers
100 views
Hi Everyone,
I have a problem with my project. The combobox cannot dropdown item for selected it's items.
I searched in this forum but I can't find a result to resolved
I looking up for resolved this problem
Thanks and regards


 
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> 
<%@ 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>Test Combobox Expanded Item </title> 
</head> 
<body> 
    <form id="form1" runat="server"
       <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        </telerik:RadScriptManager> 
      
        <telerik:RadComboBox ID="RadComboBox1" runat="server"
            <Items> 
                <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" Value="RadComboBoxItem1" /> 
                <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" Value="RadComboBoxItem2" /> 
                <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem3" Value="RadComboBoxItem3" /> 
                <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem4" Value="RadComboBoxItem4" /> 
                <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem5" Value="RadComboBoxItem5" /> 
            </Items> 
            <CollapseAnimation Duration="200" Type="OutQuint" /> 
        </telerik:RadComboBox> 
    </form> 
</body> 
</html> 


Nguyen
Top achievements
Rank 1
 asked on 11 Sep 2008
0 answers
119 views
Hi,
 
                I  created grid dynamically and paced button on page.It is working fine except column width when i browse the page first time.
                I am also  displaying seach conditions in RadWindow when user clicks on button.

Note : I created xml file for columns definations and using to generate the bound columns.

Below is my code for HTML,codebehind, xml and xml helper functions.

Can you please help me to resolve the below issues?

Issues List :
               1. I am getting extra columns when i click on pager to selct particular page or  column for sort.
               2. I want to sort the records within the page not on data source, Is there any way we can sort the records present in the page?
              3. How can we set the column width in RadGrid?
              4. I am getting the popup with retry and cancel buttons with the below message when i seach the records other than first page or before selecting the column sort or paging. Can you please advice me on this?
  
To Display the webpage again, Internet Explorer needs to resend the information you've previously submited

If you were making a purchase, you should click Cancel to avoid a duplicate transaction. Otherwise, click Retry to display the webpage again.


HTML :

<%

@ Page Language="C#" MasterPageFile="~/DealerFinance.master" AutoEventWireup="true" CodeFile="DealerList.aspx.cs" Inherits="Dealer_DealerList" Title="Untitled Page" %>

<%

@ MasterType VirtualPath="~/DealerFinance.master" %>

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<

asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</

asp:Content>

<

asp:Content ID="Content2" ContentPlaceHolderID="DealerFinancePlaceHolder" Runat="Server">

<table>

<tr>

<td align="left">

<asp:Button ID="btnSearch" runat="server" CausesValidation="false" SkinID="DisplayButton"

Text="Search" />

&nbsp;

</td>

</tr>

<tr>

<td>

<telerik:RadGrid ID="grdDealerList" runat="server" >

</telerik:RadGrid>

</td>

</tr>

</table>

<telerik:radwindow openerelementid="<%# btnSearch.ClientID %>" navigateurl="DealersSearch.aspx"

runat="server" width="400px" height="350px" id="Radwindow4" visiblestatusbar="false"

skin="Mac"></telerik:radwindow>

</

asp:Content>

ASPX :

using

System;

using

System.Collections;

using

System.Configuration;

using

System.Data;

using

System.Linq;

using

System.Web;

using

System.Web.Security;

using

System.Web.UI;

using

System.Web.UI.HtmlControls;

using

System.Web.UI.WebControls;

using

System.Web.UI.WebControls.WebParts;

using

System.Xml.Linq;

using

Telerik.Web.UI;

using

System.Data.SqlClient;

using

System.Xml;

public

partial class Dealer_DealerList : System.Web.UI.Page

{

public string searchCondition = "";

protected void Page_Load(object sender, EventArgs e)

{

if (!IsPostBack)

{

Master.SelectedDealerTab = 1;

DealSearchFields dealerSeachFieldsObj = (DealSearchFields)Session["DealerSearchFields"];

if (dealerSeachFieldsObj != null)

{

searchCondition = dealerSeachFieldsObj.DealerNumber;

}

else

{

searchCondition =

"";

}

}

 

}

protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)

{

grdDealerList.DataSource = BindGrid();

}

private DataTable BindGrid()

{

string sql = "SELECT ROW_ID ,DEALER_NUM ,NAME, LEGAL_NAME, SALES_DISTRICT, BUSINESS_TYPE FROM KF_DEALER where DEALER_NUM LIKE '%" + searchCondition + "%' order by DEALER_NUM";

SqlDataAdapter adapter = new SqlDataAdapter(sql,

ConfigurationManager.ConnectionStrings["KC_DealerFinanceConnectionString"].ConnectionString);

DataTable dt = new DataTable();

adapter.Fill(dt);

return dt;

}

protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)

{

if (e.CommandName == "Select")

{

GridDataItem dataItem = (GridDataItem)e.Item;

string strTxt = dataItem.GetDataKeyValue("DEALER_NUM").ToString();

string rowID = dataItem.GetDataKeyValue("ROW_ID").ToString();

Response.Redirect(

"DealerDetails.aspx");

}

 

 

}

protected void Page_Init(object sender, System.EventArgs e)

{

DefineGridStructure();

}

 

private void DefineGridStructure()

{

//RadGrid grdDealerList = new RadGrid();

//grdDealerList.ID = "RadGrid1";

grdDealerList.NeedDataSource +=

new GridNeedDataSourceEventHandler(this.RadGrid1_NeedDataSource);

grdDealerList.ItemCommand +=

new GridCommandEventHandler(this.RadGrid1_ItemCommand);

//grdDealerList.DataSource = BindGrid();

grdDealerList.Skin =

"Inox";

//grdDealerList.Width = Unit.Percentage(100);

grdDealerList.PageSize = 5;

grdDealerList.AllowPaging =

true;

grdDealerList.PagerStyle.Mode =

GridPagerMode.NextPrevAndNumeric;

grdDealerList.AutoGenerateColumns =

false;

//grdDealerList.GroupingEnabled = true;

//grdDealerList.ShowGroupPanel = true;

grdDealerList.ShowStatusBar =

true;

grdDealerList.ClientSettings.AllowDragToGroup =

true;

grdDealerList.AllowSorting =

true;

grdDealerList.Width =

Unit.Percentage(100);

 

grdDealerList.MasterTableView.PageSize = 15;

grdDealerList.MasterTableView.DataKeyNames =

new string[] { "ROW_ID", "DEALER_NUM" };

GridButtonColumn selectColumn = new GridButtonColumn();

selectColumn.DataTextField =

"DEALER_NUM";

selectColumn.CommandArgument =

"DEALER_NUM";

selectColumn.CommandName =

"Select";

selectColumn.HeaderText =

"DealerNumber";

//selectColumn.

grdDealerList.MasterTableView.Columns.Add(selectColumn);

 

XmlDocument xmlDoc = new XmlDocument();

xmlDoc.Load(Request.MapPath(

"~/App_Data/DataMapping.xml"));

XmlNodeList columnNodeList = XML.GetNodeList("/DealerGrids/DealerGrid[@Name ='DealerList']/Columns/Column", xmlDoc);

 

foreach (XmlNode columnNode in columnNodeList)

{

string headerText = "";

headerText =

XML.GetAttributeValue("/Column", "DisplayText", columnNode.OuterXml);

if (headerText != null && headerText.Length > 0)

{

GridBoundColumn boundColumn = new GridBoundColumn();

boundColumn.DataField =

XML.GetAttributeValue("/Column", "TableColumnName", columnNode.OuterXml);

boundColumn.HeaderText = headerText;

grdDealerList.MasterTableView.Columns.Add(boundColumn);

}

}

this.PlaceHolder1.Controls.Add(grdDealerList);

}

}

XML :

<

DealerGrids>

<

DealerGrid Name="DealerList">

<

Columns>

<

Column TableColumnName="ROW_ID" DisplayText="" isDataKey="true" />

<

Column TableColumnName="DEALER_NUM" DisplayText="Dealer Number" isDataKey="true" />

<

Column TableColumnName="NAME" DisplayText="Dealer Name" isDataKey="true" />

<

Column TableColumnName="LEGAL_NAME" DisplayText="Legal Name" isDataKey="false" />

<

Column TableColumnName="SALES_DISTRICT" DisplayText="District" isDataKey="false" />

<

Column TableColumnName="BUSINESS_TYPE" DisplayText="Business Type" isDataKey="false" />

</

Columns>

</

DealerGrid>

</

DealerGrids>


XML Helper Methods :

public

static string GetAttributeValue (string xPath, string attribute, XmlDocument xmlDocument)

{

XmlElement eleNode = null;

XmlAttribute atrNode = null;

eleNode = (XmlElement)xmlDocument.SelectSingleNode(xPath);

atrNode = (XmlAttribute)eleNode.Attributes.GetNamedItem(attribute);

if (null == atrNode)

{

return "";

}

else

{

return atrNode.Value;

}

}

public

static XmlNodeList GetNodeList (string xPath, XmlDocument xmlDocument)

{

if (0 == xPath.Length || null == xmlDocument)

{

return null;

}

XmlNodeList nodeList = null;

nodeList = xmlDocument.SelectNodes(xPath);

if(0 == nodeList.Count)

{

return null;

}

else

{

return nodeList;

}

}




             
Ravi Prasad Potturi
Top achievements
Rank 1
 asked on 11 Sep 2008
2 answers
90 views
We have an issue where duplicate markup is being created when users are editing wiki content using the Rad Editor.

An example is when a user clicks edit on a wiki page, makes NO changes and clicks ok, duplicate <p> tags are inserted into the page causing formatting issues.

We have also seen this issue with <li> tags.

This is affecting v5.2.0.0 of the MOSS rad editor.
Tom.S
Top achievements
Rank 1
 answered on 11 Sep 2008
0 answers
102 views
I have MS DropDownlist as the ItemTemplate column in the RADGrid with other columns. I am binding DropDownList in ItemBound method(similar to http://www.telerik.com/help/aspnet/grid/grdoperationswithdropdownlistinedititemtemplate.html). The button on page fires postback event and reload grid. I have saving the selected value of DropDownlist in Datatable and rebind the grid.

The DropDownList shows values but loses the selected value.

My code is very similar to link above with extra Button rebind the grid. There is not EditTemplate.
A
Top achievements
Rank 1
 asked on 10 Sep 2008
2 answers
429 views
I'm not sure if I missed it in the docs, but this should probably put somewhere a little bit more explicitly.  Heck, maybe the code that adds it can check for any Forms authentication and raise a warning... or always add it.

When ever using Forms based authentication the Telerik.Web.UI.WebResource.axd is denied access and all scripts fail.

<authentication mode="Forms"
    <forms name=".XAPP" path="/" loginUrl="~/Login.aspx" protection="All" /> 
</authentication> 
<authorization> 
    <deny users="?"/> 
</authorization> 

Needs to this appended after the system.web element:

</system.web> 
<location path="Telerik.Web.UI.WebResource.axd"
    <system.web> 
        <authorization> 
            <allow users="*"/> 
        </authorization> 
    </system.web> 
</location> 

a
Top achievements
Rank 1
 answered on 10 Sep 2008
1 answer
125 views
Is it not possible to have both AllowRowSelect and OnRowClick in the ClientSettings?

I can get either one to work properly when the other is not present.  With the setup below the OnRowClick functions, but my clicked row is not highlighted anymore.

<ClientSettings EnablePostBackOnRowClick="true">
<Selecting  AllowRowSelect="True" />
<ClientEvents OnRowClick="OnRowClick" />
</ClientSettings>

<script language="javascript"  type="text/javascript">
function OnRowClick(index)
{
    var ContactId = this.GetCellByColumnUniqueName(this.Rows[index], "ContactId").innerHTML;
    var AccountId = this.GetCellByColumnUniqueName(this.Rows[index], "AccountId").innerHTML;
    var FullName = this.GetCellByColumnUniqueName(this.Rows[index], "FullName").innerHTML;
   
    document.getElementById('<%= hdnContactId.ClientID %>').value = ContactId;
    document.getElementById('<%= hdnAccountId.ClientID %>').value = AccountId;
    document.getElementById('<%= hdnContactName.ClientID %>').value = FullName;
   
    return false;
}
</script>
DJ
Top achievements
Rank 1
 answered on 10 Sep 2008
1 answer
91 views
I have a grid and every row has a hyperlink that gets added to a tooltip manager's target control collection (an example of an id is:ctl00_ContentPlaceHolder1_rgBkrInvoice_ctl00_ctl06_hlDiscussion).  When I do a single grouping, the tooltips don't come up, and the target controls have odd numbers instead of even (ctl07 instead of clt06, etc).  When i group a second time everything works again and the target controls are back to even numbers.  Any ideas how to get this working?

Thanks
Lars Solberg
Top achievements
Rank 1
 answered on 10 Sep 2008
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?