Hi all,
I'm having a problem with PageViewCreated either not firing at all or firing too often. My markup is this:
<
telerik:RadTabStrip
ID
=
"rtsReturns"
runat
=
"server"
MultiPageID
=
"rmpReturns"
OnTabClick
=
"rtsReturns_TabClick"
>
<
Tabs
>
<
telerik:RadTab
runat
=
"server"
Text
=
"Current Returns"
Value
=
"Current"
></
telerik:RadTab
>
</
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
id
=
"rmpReturns"
runat
=
"server"
SelectedIndex
=
"0"
Width
=
"400"
>
<
telerik:RadPageView
id
=
"pgvwCurrent"
runat
=
"server"
>
<
h1
>This is where the current returns will go</
h1
>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
And my codebehind is:
protected void Page_PreRender(object sender, EventArgs e)
{
if (!IsPostBack)
{
foreach (TrustTaxReturnGroup ttrg in Ctl.FormerTTRGs)
{
RadTab tab1 = new RadTab(ttrg.StartDate.ToString());
tab1.Value = ttrg.StartDate.ToString();
rtsReturns.Tabs.Add(tab1);
RadPageView pg1 = new RadPageView();
pg1.ID = ttrg.StartDate.ToString();
rmpReturns.PageViews.Add(pg1);
}
}
}
and
protected void rmpReturns_PageViewCreated(object sender, RadMultiPageEventArgs e)
{
RadTextBox tb = new RadTextBox();
tb.Text = "This should be on the page just created";
tb.ID = e.PageView.ID + "_textbox";
e.PageView.Controls.Add(tb);
}
If I modify the markup to include
OnPageViewCreated="rmpReturns_PageViewCreated"
the PageViewCreated method fires three times every time I click a tab (since there are three tabs being created programatically). But if I don't have that in my markup it never enters that routine at all. I thought maybe it had something to do with the pageviews being created in the PreRender but I moved it to the Page_OnLoad and the results are the same.
I'm sure it's something I'm just not seeing, but I'm just not seeing it. Can anyone out there set me straight? I'd greatly appreciate it.
chartResults.DataManager.ValuesXColumn = "iDate"
chartResults.DataGroupColumn = "sType"
chartResults.PlotArea.XAxis.Appearance.ValueFormat = Styles.ChartValueFormat.ShortDate
chartResults.DataSource = dt
The snippet below is a sample of data being added to the data table. It converts the date to an object, as suggested in the online documentation.
fValue = rdr("sValue").ToString
Dim dDate As DateTime = rdr("dStartDateTime")
Dim oDate As Date = New Date(dDate.Year, dDate.Month, dDate.Day)
Dim oRow As DataRow = dt.NewRow
oRow("fValue") = fValue
oRow("iDate") = oDate.ToOADate()
oRow("sDate") = rdr("dStartDateTime").ToString
oRow("sType") = sDrug
dt.Rows.Add(oRow)
Is there something I am missing, or doing wrong. The goal is to have the x points from series 1 remain on the correct x point when another series is added. Any advice, or suggestions are appreciated.
Many thanks in advance!
<
telerik:RadAjaxManager
ID
=
"uxRadAjaxManager"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"uxClient"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"uxPortfolio"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadComboBox
ID
=
"uxClient"
Runat
=
"server"
AllowCustomText
=
"true"
CssClass
=
"halfWidthComboBox"
onclientselectedindexchanging
=
"LoadClientChildren"
onitemsrequested
=
"uxClient_ItemsRequested"
MarkFirstMatch
=
"True"
></
telerik:RadComboBox
>
<
br
/>
<
telerik:RadComboBox
ID
=
"uxPortfolio"
Runat
=
"server"
CheckBoxes
=
"true"
EnableCheckAllItemsCheckBox
=
"true"
onitemsrequested
=
"uxPortfolio_ItemsRequested"
MarkFirstMatch
=
"True"
></
telerik:RadComboBox
>
I am working an Asp.net project, I am loading two user controls into another ascx control which uses RadSplitter to divide them. First, I am loading the control1.ascx
and then the control2. After loading both of them inside control2.ascx I want to access a function that reloads some data of control1. I am doing it with the following code:
private ASP.control1_ascx tree;
tree = (ASP.control1_ascx)LoadControl("control1.ascx");
tree.aload();
When I debug the code, it seems that it calls the aload() function and updates the RadTreeView. But the problem is that I cannot see them after the function is called, instead I can see the correct data after a postback event. Why is this happens?. Is there a solution to see them when I call the function ?
<%@ Page Language="C#" EnableEventValidation="false" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GetVersionMapping._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
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadGrid1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AutoGenerateColumns
=
"False"
CellSpacing
=
"0"
GridLines
=
"None"
ShowGroupPanel
=
"True"
>
<
HeaderContextMenu
CssClass
=
"GridContextMenu GridContextMenu_Default"
></
HeaderContextMenu
>
<
MasterTableView
HierarchyDefaultExpanded
=
"True"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Platform"
HeaderText
=
"Platform"
UniqueName
=
"Platform"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Client"
HeaderText
=
"Client"
UniqueName
=
"Client"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Application"
HeaderText
=
"Application"
UniqueName
=
"Application"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Version"
HeaderText
=
"Version"
UniqueName
=
"Version"
>
</
telerik:GridBoundColumn
>
<
telerik:GridDateTimeColumn
DataField
=
"Date"
HeaderText
=
"Publication Date"
UniqueName
=
"Date"
>
</
telerik:GridDateTimeColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
AllowDragToGroup
=
"True"
>
</
ClientSettings
>
</
telerik:RadGrid
>
</
div
>
</
form
>
</
body
>
</
html
>