or
<
telerik:GridBoundColumn
HeaderText
=
"Patient Name"
UniqueName
=
"pt_name"
DataField
=
"pt_name"
>
<
FilterTemplate
>
<
telerik:RadTextBox
ID
=
"RTName"
runat
=
"server"
Width
=
"200px"
ClientEvents-OnValueChanged
=
"ValueChanged"
></
telerik:RadTextBox
>
<
telerik:RadScriptBlock
ID
=
"RBName"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function ValueChanged(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
var Name = $find('<%# ((GridItem)Container).FindControl("RTName").ClientID %>');
tableView.filter("pt_name", Name, "StartsWith");
}
</
script
>
</
telerik:RadScriptBlock
>
</
FilterTemplate
>
</
telerik:GridBoundColumn
>
if
(e.CommandName == RadGrid.FilterCommandName)
{
Pair filterPair = (Pair)e.CommandArgument;
switch
(filterPair.Second.ToString())
{
case
"pt_Date"
:
{
//
}
case
(
"pt_name"
):
{
TextBox searchName = (e.Item
as
GridFilteringItem)[filterPair.Second.ToString()].FindControl(
"RTName"
)
as
TextBox;
search = searchName.Text +
"%"
;
break
;
}
}
}
private
void
PopulateChart3(
string
seriesID)
{
RadChart1.Clear();
SapeDBDataContext db =
new
SapeDBDataContext();
int
ID = Convert.ToInt32(seriesID);
var windh = from p
in
db.SAPE_WindSeries where p.id_localidade == ID where p.valorh !=
null
select p;
var windp = from p
in
db.SAPE_WindSeries where p.id_localidade == ID where p.valorp !=
null
select p;
ChartSeries s =
new
ChartSeries();
s.Type = Telerik.Charting.ChartSeriesType.Line;
s.Appearance.LabelAppearance.Visible =
false
;
s.Name =
"Historic"
;
s.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Blue;
foreach
(var wi
in
windh)
{
ChartSeriesItem item =
new
ChartSeriesItem();
item.XValue = Convert.ToInt32(wi.dia);
item.YValue = Convert.ToDouble(wi.valorh);
s.Items.Add(item);
}
ChartSeries s2 =
new
ChartSeries();
s2.Type = Telerik.Charting.ChartSeriesType.Line;
s2.Appearance.LabelAppearance.Visible =
false
;
s2.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Red;
s2.Name =
"Projected"
;
foreach
(var wi
in
windp)
{
ChartSeriesItem item2 =
new
ChartSeriesItem();
item2.XValue = Convert.ToInt32(wi.dia);
item2.YValue = Convert.ToDouble(wi.valorp);
s.Items.Add(item2);
}
RadChart1.Series.Add(s);
RadChart1.Series.Add(s2);
}
function
TanilarRowClick(sender, eventArgs) {
var
id = eventArgs.getDataKeyValue(
"ID"
);
document.getElementById(
"grdTanilarDClickedRowIndex"
).value = id;
$find(
"<%= RadAjaxManager.GetCurrent(Page).ClientID %>"
).ajaxRequest(
"taniekle"
);
}
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
OnAjaxRequest
=
"RadAjaxManager1_AjaxRequest"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadAjaxManager1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"ucpTani"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
RadGrid grdSeciliTanilar = (RadGrid)ucpTani.FindControl(
"grdSeciliTanilar"
);
RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadAjaxManager1, grdSeciliTanilar);
RadAjaxManager1.AjaxSettings.AddAjaxSetting(grdTani, grdSeciliTanilar);
Server Error in '/' Application.
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
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.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
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:
[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
System.Web.UI.ControlCollection.AddAt(Int32 index, Control child) +9585723
Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) +221
[HttpException (0x80004005): Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error.]
Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) +286
Telerik.Web.UI.RadAjaxControl.PerformRender() +498
Telerik.Web.UI.RadAjaxControl.OnPageRender(HtmlTextWriter writer, Control page) +1819
Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +155
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +268
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.Page.Render(HtmlTextWriter writer) +29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1284