<
telerik:RadAsyncUpload
ID
=
"uplCVAsync"
runat
=
"server"
MaxFileInputsCount
=
"1"
MultipleFileSelection
=
"Disabled"
EnableInlineProgress
=
"true"
AllowedFileExtensions='<%#AllowedExtensions%>' MaxFileSize="<%#MaxFileSize%>" OnClientProgressUpdating="checkUploadedFilesSize"
OnClientFileUploading="fileUploadStart" OnClientFileUploaded="fileUploadEnd"
OnClientFileUploadFailed="fileUploadEnd" OnClientValidationFailed="fileUploadValidationFailed"> </
telerik:RadAsyncUpload
>
protected
override
void
OnInit(EventArgs e)
{
base
.OnInit(e);
ajaxmgr =
new
RadAjaxManager();
ajaxmgr.AjaxRequest +=
new
RadAjaxControl.AjaxRequestDelegate(AjaxManager_AjaxRequest);
Page.Items.Add(
typeof
(RadAjaxManager), ajaxmgr);
Page.Form.Controls.AddAt(0, ajaxmgr);
}
protected
override
void
CreateChildControls()
{
Control control = Page.LoadControl(_ascxPath);
Controls.Add(control);
RadGrid panel = control.FindControl(
"RadGrid1"
)
as
RadGrid;
RadAjaxLoadingPanel loadingPanel = control.FindControl(
"RadAjaxLoadingPanel1"
)
as
RadAjaxLoadingPanel;
ajaxmgr.AjaxSettings.AddAjaxSetting(panel, panel, loadingPanel);
}
$find(
"<%= RadAjaxManager1.ClientID %>"
).ajaxRequest(
"Rebind"
);
$find(
'<%# this.Page.Forms.FindControl("MyRadAjaxManager").ClientID %>'
).ajaxRequest(
"Rebind"
);
$find(
"ctl00_ctl44"
).ajaxRequest(
"Rebind"
);
<%
@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="general.master" CodeBehind="reportsList.aspx.vb" Inherits=".ReportsList" uiCulture="Auto" Culture="Auto" %>
<%
@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<
asp:Content ID="Content1" ContentPlaceHolderID="Content2" runat="Server">
</
asp:Content>
<
asp:Content ID="Content2" ContentPlaceHolderID="OEEDirectContent" runat="server">
<script type="text/javascript">
function showingMenu(sender, args) {
//Disable the menu on the category image
if (args.get_targetElement().id == "RadListView1") {
args.set_cancel(
true);
}
}
function OnClientNodeClickedHandler(sender, e) {
var comboBox = $find("<%= ReportsListItems.ClientID %>");
var node = e.get_node();
if (!node.get_enabled()) return;
comboBox.set_text(node.get_text());
comboBox.trackChanges();
comboBox.get_items().getItem(0).set_value(node.get_value());
comboBox.commitChanges();
comboBox.hideDropDown();
}
</script>
<div>
<div class="Contents">
<telerik:RadFormDecorator runat="server" id="radFormDecorator" DecoratedControls="All" />
<telerik:RadListView id="RadListView1" runat="server" datasourceid="SqlDataSource1"
ItemPlaceholderID="ListViewContainer" >
<LayoutTemplate>
<asp:PlaceHolder runat="server" id="ListViewContainer" />
</LayoutTemplate>
<ItemTemplate>
<fieldset id="fieldset" style="float: left; width: 230px; height: 150px; border-style:solid; border-width:1px; border-color:#008080; ">
<legend>
<b><font size="3"><%# Eval("category")%></font></b></legend>
<div class="details">
<asp:HiddenField ID="HideF" runat="server" Value= '<%# Eval("id_category")%>'/>
<div class="photo-container">
<telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("image_value") %>'
AutoAdjustImageControlSize="false" Width="55px" Height="55px"
AlternateText='<%#Eval("category", "Categorie {0}") %>' />
</div>
<div class="data-container">
<div class="data_leftitem" title="<%# Eval("descript")%>">
<label>Description:</label><br><%# Eval("descript")%>
</div>
<div class="data_bottomitem">
<label><strong>Rapports </strong><note>(<%# Eval("nbReports")%>):</note></label>
<telerik:RadComboBox
runat="server"
ID= "ReportsListItems"
OnClientNodeClicked="OnClientNodeClickedHandler"
AllowCustomText="false"
skin="Windows7"
AutoPostBack="True"
datafieldvalue="id_Report" datatextfield="Reporttitle"
DataSourceID="SqlDataSource2"
Width="215px"
ImageUrl="images/report.png"
EmptyMessage="">
<ItemTemplate>
<div>
<asp:Image runat="server" ImageUrl="images/report2.png" Width="18" Height="18" />
<asp:Label runat="server" ID="Label1">
<asp:HyperLink id="hyperlink1"
DataNavigateUrlFields="id_Report"
DataNavigateUrlFormatString="viewreports.aspx?id={0}"
NavigateUrl='<%#"viewreport.aspx?ID=" + EVAL("id_Report").tostring %>'
Text='<%# Eval("Reporttitle") %>'
Target="_blank"
runat="server"/>
</asp:Label>
</div>
</ItemTemplate>
</telerik:RadComboBox>
<br />
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:TF5100ConnectionString %>"
SelectCommand="SELECT Reporttitle, id_Report FROM report where id_category=@param and isReport =1">
<selectparameters>
<asp:controlparameter name="param" controlid="HideF" PropertyName="Value"/>
</selectparameters>
</asp:SqlDataSource>
</div>
</div>
</div>
</fieldset>
</ItemTemplate>
</telerik:RadListView>
</div>
<div style="clear: both;">
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TF5100ConnectionString %>"
SelectCommand="SELECT * FROM (SELECT DISTINCT rc.id_category, rc.category, rc.descript, rc.image_value, (Select ri.num_order from ReportCategory ri where id_category = rc.id_category ) as num, (SELECT COUNT(id_category) FROM Report WHERE id_category = rc.id_category AND isReport= 1) as nbReports FROM ReportCategory rc INNER JOIN Report ON rc.id_category = Report.id_category WHERE (rc.category <> '')) as tbl WHERE nbReports >0 ORDER BY num ">
</asp:SqlDataSource>
</div>
</
asp:Content>
Thank you for your help