protected void rdgMeals_ItemDataBound(object source, GridItemEventArgs e)
{
if (e.Item != null)
{
if (e.Item.ItemType == GridItemType.GroupHeader)
{
GridGroupHeaderItem xGridGroupHeaderItem = (GridGroupHeaderItem)e.Item;
HtmlAnchor xHtmlAnchor = new HtmlAnchor();
String xDate = ((DateTime)DataBinder.Eval(xGridGroupHeaderItem.DataItem, "Date")).ToString("yyyy-MM-dd");
xHtmlAnchor.InnerHtml = "<img alt='Statistics' src='/Images/Statistics.png' height='12' width='12' style='border: none;' /> " + xDate;
xHtmlAnchor.HRef = "javascript:void(0);";
xHtmlAnchor.Attributes.Add("onclick", "OpenFoodStatisticsMeals('0', '" + this.CurrentUserId + "', '" + xDate + "', '" + xDate + "');");
xHtmlAnchor.Style.Add("color", "#000000");
xHtmlAnchor.Style.Add("border", "none");
xHtmlAnchor.Style.Add("text-decoration", "none");
xGridGroupHeaderItem.DataCell.Controls.Add(xHtmlAnchor);
}
}
}
<%@ Page Title="" Language="C#" MasterPageFile="App_master/MasterPage.master" AutoEventWireup="true" CodeFile="Posts.aspx.cs" Inherits="ccc_Posts" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> <telerik:AjaxUpdatedControl ControlID="RadToolBar1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="RadToolBar1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1"> </telerik:RadAjaxLoadingPanel> <telerik:RadTreeView runat="Server" ID="RadTreeView1" EnableViewState="False" Style="margin-top: 4px; margin-left: 4px;"> </telerik:RadTreeView></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server"> <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> var toolbar; var grid; function pageLoad() { grid = $find("<%=RadGrid1.ClientID %>"); toolbar = $find("<%= RadToolBar1.ClientID %>"); if (grid.get_masterTableView().get_selectedItems().length == 0) toolbar.findButtonByCommandName("DeletePost").disable(); } function onGridRowSelected(sender, args) { toolbar.findButtonByCommandName("DeletePost").enable(); } // Open window function OpenWindow(url) { radopen(url, "NewPost"); } function OnClientButtonClickingHandler(sender, eventArgs) { if (eventArgs.get_item().get_value() == "NewPost") { OpenWindow('NewPost.aspx'); } } </script> </telerik:RadScriptBlock> <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Modal="true" Width="1024px" OnClientClose="closeRadWindow" Behaviors="Close, Reload, Resize, Move, Maximize" Height="710px" ViewStateMode="Disabled" ShowContentDuringLoad="false" VisibleStatusbar="false"> </telerik:RadWindowManager> <telerik:RadSplitter runat="server" ID="RadSplitter1" Width="100%" BorderSize="0" BorderStyle="None" PanesBorderSize="0" Height="100%" Orientation="Horizontal"> <telerik:RadPane runat="server" ID="RadPane1" Height="30px" EnableViewState="false" Scrollable="false"> <telerik:RadToolBar runat="server" ID="RadToolBar1" EnableViewState="false" CssClass="inbox-search-toolbar" OnClientButtonClicking="OnClientButtonClickingHandler" OnButtonClick="RadToolBar1_ButtonClick"> <Items> <telerik:RadToolBarButton Text="New Post" Value="NewPost" PostBack="false" ImageUrl="Themes/Default/Icons/Telerik/Add.png"> </telerik:RadToolBarButton> <telerik:RadToolBarButton IsSeparator="true" /> <telerik:RadToolBarButton Text="Delete" CommandName="DeletePost" PostBack="false" ImageUrl="Themes/Default/Icons/Telerik/Delete.png"> </telerik:RadToolBarButton> <telerik:RadToolBarButton IsSeparator="true" /> <telerik:RadToolBarButton Value="searchTextBoxButton"> <ItemTemplate> <telerik:RadTextBox runat="server" ID="blogToolBarSearchTb" EmptyMessage="Search Posts" CssClass="inbox-search-textbox" Width="300px" /> </ItemTemplate> </telerik:RadToolBarButton> <telerik:RadToolBarButton ImageUrl="Themes/Default/Icons/16x16/search.png" Value="search" /> </Items> </telerik:RadToolBar> </telerik:RadPane> <telerik:RadPane runat="server" ID="RadPane2"> <telerik:RadGrid runat="server" ID="RadGrid1" AutoGenerateColumns="false" GridLines="None" AllowMultiRowSelection="true" Height="100%" BorderWidth="0px" AllowSorting="True" Style="outline: none" ShowGroupPanel="True"> <ClientSettings Scrolling-AllowScroll="True" Scrolling-UseStaticHeaders="true" Selecting-AllowRowSelect="true" EnablePostBackOnRowClick="false" AllowDragToGroup="true" EnableRowHoverStyle="true" ClientEvents-OnRowSelected="onGridRowSelected"> </ClientSettings> <MasterTableView TableLayout="Fixed" GroupLoadMode="Client" Width="100%"> <Columns> <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" CommandName="SelectPost" HeaderStyle-Width="40px" /> <telerik:GridTemplateColumn HeaderText="Title" UniqueName="BlogTitle" Groupable="false" HeaderStyle-Width="100%"> <ItemTemplate> <a href="#"><b> <%# Eval("Title")%></b></a> <div style="margin: 4px 0px;"> <asp:ImageButton ID="statusBtn" runat="server" ImageUrl="~/Themes/Default/Icons/16x16/finished-work2.png" Style="vertical-align: middle;" /> <span style="vertical-align: middle; margin-left: 2px;">Status:</span> </div> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Action" UniqueName="BlogAction" HeaderStyle-Width="110px" Groupable="false"> <ItemTemplate> <div style="margin: 4px 0px;"> <asp:ImageButton ID="actionBtn" runat="server" ImageUrl="~/Themes/Default/Icons/16x16/edit.png" Style="vertical-align: middle;" /> <span style="vertical-align: middle; margin-left: 2px;"><a href="javascript:OpenWindow('NewPost.aspx?id=<%# Eval("BlogPostId")%>')"> Edit</a></span> </div> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Comments" UniqueName="BlogComments" HeaderStyle-Width="85px" Groupable="false"> <ItemTemplate> <div style="margin: 4px 0px;"> <span style="vertical-align: middle; margin-left: 2px;">(num)</span> </div> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="User" UniqueName="BlogUserName" HeaderStyle-Width="170px" GroupByExpression="Username Group by Username"> <ItemTemplate> <div style="margin: 4px 0px;"> <span style="vertical-align: middle; margin-left: 2px;"> <%# Eval("Username")%></span> </div> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Blog Date" UniqueName="BlogDate" HeaderStyle-Width="150px" GroupByExpression="BlogDate Group by BlogDate"> <ItemTemplate> <div style="margin: 4px 0px;"> <span style="vertical-align: middle; margin-left: 2px;"> <%# Eval("BlogDate")%></span> </div> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid> </telerik:RadPane> </telerik:RadSplitter> <script type="text/javascript"> function closeRadWindow() { $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(); } </script></asp:Content>using System;using System.Collections.Generic;using System.Configuration;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using CSSUtilityLib;using CSSUtilityLib.Configuration;using CSSUtilityLib.Cookie;using CSSUtilityLib.DataAccess;using CSSUtilityLib.Email;using CSSUtilityLib.Process;using CSSUtilityLib.Security;using CSSUtilityLib.Transfer;using CSSUtilityLib.Validation;using System.Data;using System.Data.SqlClient;using Telerik.Web.UI;public partial class ccc_Posts : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { // code layer for testing purpose string connStr = ConfigManager.GetConnStr("CSSBlogDB"); DataSet ds0 = SqlServerDataAccessHelper.ExecuteDataSet(connStr, CommandType.StoredProcedure, "SelectAllBlogPost"); RadGrid1.DataSource = ds0; RadGrid1.DataBind(); } protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) { string sCommand = e.Item.Text; switch (sCommand) { case "Delete": // Code here.. break; } } protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) { RadGrid1.Rebind(); } }
<telerik:RadMenu ID="xxxRadMenu" runat="server" Skin="Office2007" ClickToOpen="true"
OnClientItemClicking="DoIt.OnMenuItemClicking" OnItemClick="xxxRadMenu_ItemClicked"
CollapseAnimation-Type="None" CssClass="ActionsRadMenu" OnClientItemPopulating="itemPopulating">
<WebServiceSettings Method="PopulateAccountMenuItems" />
<Items>
<telerik:RadMenuItem Text="Actions..."
Value="Actions"
PostBack="false"
ExpandMode="WebService">
</telerik:RadMenuItem>
</Items>
</telerik:RadMenu>
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="ddlCountry"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="ddlState" UpdatePanelHeight="" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="ddlState"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="ddlLocation" UpdatePanelHeight="" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="ddlLocation"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="ddlPostcode" UpdatePanelHeight="" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManagerProxy> <table id="Table1" width="100%" class="style1"> <tr runat="server" width="150px" id="tr10"> <td> Country </td> <td> <telerik:RadComboBox ID="ddlCountry" runat="server" OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged" Width="300px" EnableLoadOnDemand="True" AutoPostBack="True"> </telerik:RadComboBox> <asp:RequiredFieldValidator ID="rfvCountry" runat="server" ErrorMessage="*" ControlToValidate="ddlCountry" ValidationGroup="Customer"></asp:RequiredFieldValidator> </td> </tr> <tr runat="server" id="trState"> <td> State </td> <td> <telerik:RadComboBox ID="ddlState" OnSelectedIndexChanged="ddlState_SelectedIndexChanged" Width="300px" runat="server" AutoPostBack="True"> </telerik:RadComboBox> <asp:RequiredFieldValidator ID="rfvState" runat="server" ErrorMessage="*" ControlToValidate="ddlState" ValidationGroup="Customer"></asp:RequiredFieldValidator> </td> <td> Location </td> <td> <telerik:RadComboBox ID="ddlLocation" OnSelectedIndexChanged="ddlLocation_SelectedIndexChanged" Width="300px" runat="server" AutoPostBack="True"> </telerik:RadComboBox> <asp:RequiredFieldValidator ID="rfvLocation" runat="server" ErrorMessage="*" ControlToValidate="ddlLocation" ValidationGroup="Customer"></asp:RequiredFieldValidator> </td> </tr> <tr runat="server" id="trPostcode"> <td> Postcode </td> <td> <telerik:RadComboBox ID="ddlPostcode" runat="server" Width="300px"> </telerik:RadComboBox> <asp:RequiredFieldValidator ID="rfvPostcode" runat="server" ErrorMessage="*" ControlToValidate="ddlPostcode" ValidationGroup="Customer"></asp:RequiredFieldValidator> </td> </tr> </table>#region Location ddlsprivate void BindCountry(){ string sql = "SELECT DISTINCT LookupID_LookupTable, LookupID, LookupParentID FROM " + XDEV.xd_Schema.ToString() + "xd_lookup_tables WHERE (LookupParentID = 41)"; DataTable dt = data.GetDataTable(sql); if (dt.Rows.Count > 0) { ddlCountry.DataSource = dt; ddlCountry.DataTextField = "LookupID_LookupTable"; ddlCountry.DataValueField = "LookupID"; ddlCountry.DataBind(); //RadAjaxManager1.FocusControl(ddlCountry); }}private void BindState(string country){ string sql = string.Format("SELECT DISTINCT LookupID_LookupTable, LookupID, LookupParentID FROM " + XDEV.xd_Schema.ToString() + "xd_lookup_tables WHERE ( LookupID_ParentLookupID ={0})", country); DataTable dt = data.GetDataTable(sql); if (dt.Rows.Count > 0) { ddlState.DataSource = dt; ddlState.DataTextField = "LookupID_LookupTable"; ddlState.DataValueField = "LookupID"; ddlState.DataBind(); //RadComboBoxItem StateItem = new RadComboBoxItem("- Select a State -", "0"); //Creates new item for RadCombobox //ddlState.Items.Add(StateItem); }}private void BindLocation(string state){ string sql = string.Format("SELECT DISTINCT LookupID_LookupTable, LookupID, LookupParentID FROM " + XDEV.xd_Schema.ToString() + "xd_lookup_tables WHERE ( LookupID_ParentLookupID = {0})", state); DataTable dt = data.GetDataTable(sql); if (dt.Rows.Count > 0) { ddlLocation.DataSource = dt; ddlLocation.DataTextField = "LookupID_LookupTable"; ddlLocation.DataValueField = "LookupID"; ddlLocation.DataBind(); //RadComboBoxItem LocationItem = new RadComboBoxItem("- Select a Location -", "0"); //Creates new item for RadCombobox //ddlLocation.Items.Add(LocationItem); }}private void BindPostcode(string location){ string sql = string.Format("SELECT DISTINCT LookupID_LookupTable, LookupID, LookupParentID FROM " + XDEV.xd_Schema.ToString() + "xd_lookup_tables WHERE ( LookupID_ParentLookupID = {0})", location); DataTable dt = data.GetDataTable(sql); if (dt.Rows.Count > 0) { ddlPostcode.DataSource = dt; ddlPostcode.DataTextField = "LookupID_LookupTable"; ddlPostcode.DataValueField = "LookupID"; ddlPostcode.DataBind(); //RadComboBoxItem PostcodeItem = new RadComboBoxItem("- Select a Postcode -", "0"); //Creates new item for RadCombobox //ddlPostcode.Items.Add(PostcodeItem); }}protected void ddlCountry_SelectedIndexChanged(object sender, EventArgs e){ BindState(ddlCountry.SelectedValue);}protected void ddlState_SelectedIndexChanged(object sender, EventArgs e){ BindLocation(ddlState.SelectedValue);}protected void ddlLocation_SelectedIndexChanged(object sender, EventArgs e){ BindPostcode(ddlLocation.SelectedValue);}#endregion#region cascading ddlsif (!String.IsNullOrEmpty(dt.Rows[0]["LookupID_Country"].ToString())){ if (ddlCountry.Items.Contains(ddlCountry.Items.FindItemByValue(dt.Rows[0]["LookupID_Country"].ToString()))) { ddlCountry.SelectedValue = dt.Rows[0]["LookupID_Country"].ToString(); BindCountry(); }}if (!String.IsNullOrEmpty(dt.Rows[0]["LookupID_State"].ToString())){ if (ddlState.Items.Contains(ddlState.Items.FindItemByValue(dt.Rows[0]["LookupID_State"].ToString()))) { ddlState.SelectedValue = dt.Rows[0]["LookupID_State"].ToString(); BindState(ddlCountry.SelectedValue); } else { }}if (!String.IsNullOrEmpty(dt.Rows[0]["LookupID_Location"].ToString())){ if (ddlLocation.Items.Contains(ddlLocation.Items.FindItemByValue(dt.Rows[0]["LookupID_Location"].ToString()))) { ddlLocation.SelectedValue = dt.Rows[0]["LookupID_Location"].ToString(); BindLocation(ddlState.SelectedValue); }}if (!string.IsNullOrEmpty(dt.Rows[0]["LookupID_Postcode"].ToString())){ if (ddlPostcode.Items.Contains(ddlPostcode.Items.FindItemByValue(dt.Rows[0]["LookupID_Postcode"].ToString()))) { ddlPostcode.SelectedValue = dt.Rows[0]["LookupID_Postcode"].ToString(); BindPostcode(ddlLocation.SelectedValue); }}#endregion);# region Radgrid code protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) { if (e.CommandName == "Select") { //Session.Add("CustomerID", e.Item.Cells[3].Text.ToString()); Geek.XTV7_Videos_ID = e.Item.Cells[4].Text.ToString(); } } #endregion<asp:ImageButton ID="btnImageDisplay" runat="server" CommandName="Select" OnClick="Image_Click" Width="120px" /><telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" />public string source{ get { return btnImageDisplay.ImageUrl; } set { btnImageDisplay.ImageUrl = value; }}protected void Image_Click(object sender, ImageClickEventArgs e){ ReturnImages(Geek.XTV7_Videos_ID.ToString());}#region SQLCommandspublic void ReturnImages(string VideoID){ if (!String.IsNullOrEmpty(Geek.XTV7_Videos_ID.ToString())) { string sql = ""; var dt = new DataTable(); sql += string.Format("Select [XTV7_Videos_Image] From Xtrain.XTV7_2_Videos WHERE (XTV7_Videos_ID= {0})", VideoID); dt = data.GetDataTable(sql); if (dt.Rows.Count > 0) { Geek.XTV7_Image = (dt.Rows[0]["XTV7_Videos_Image"].ToString()).ToString(); RadAjaxManager1.ResponseScripts.Add("radopen('Forms/View/ImageViewer.aspx','RadWindow2')"); } dt.Dispose(); }}#endregion<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AutoGenerateColumns="False" BackColor="White" CellSpacing="0" DataSourceID="SqlDataSource2" EnableLinqExpressions="False" GridLines="None" Height="650px" AllowPaging="True" PageSize="4" OnItemCommand="RadGrid1_ItemCommand" ShowGroupPanel="True"> <ClientSettings EnablePostBackOnRowClick="true"> <Selecting AllowRowSelect="True" /> <ClientEvents OnRowSelected="RowSelected" /> <Scrolling AllowScroll="True" UseStaticHeaders="True" /> </ClientSettings> <MasterTableView AllowMultiColumnSorting="true" DataKeyNames="XTV7_Videos_ID,XTV7_Videos_Image" DataSourceID="SqlDataSource2" ShowGroupFooter="false" Summary="Video Lessons"> <CommandItemSettings ExportToPdfText="Export to PDF" /> <GroupByExpressions> <telerik:GridGroupByExpression> <SelectFields> <telerik:GridGroupByField FieldAlias=":" FieldName="XTV7_Categories_Name" /> <telerik:GridGroupByField FieldAlias="SubCategory" FieldName="XTV7_Categories_Sub_Name" /> </SelectFields> <GroupByFields> <telerik:GridGroupByField FieldName="XTV7_Videos_Date_Uploaded" HeaderText="Sort By Date Uploaded" SortOrder="Descending" /> </GroupByFields> </telerik:GridGroupByExpression> </GroupByExpressions> <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"> </RowIndicatorColumn> <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"> </ExpandCollapseColumn> <Columns> <telerik:GridTemplateColumn AllowFiltering="false" HeaderStyle-Width="110px" HeaderText="Lesson Snapshot" ItemStyle-Width="110px" SortExpression="XTV7_Categories_Image" UniqueName="XTV7_Categories_Sub_Image"> <ItemTemplate> <%-- <asp:ImageButton ID="btnImageDisplay" runat="server" CommandName="Select" ImageUrl='<%# "~/App_Portal/xTrain/Images/VideoImages/" + Eval("XTV7_Videos_Image") %>' OnClick="Image_Click" Width="120px" />--%> <xTrain:xImgButton ID="xt_ImageButton1" runat="server" source='<%# "~/App_Portal/xTrain/Images/VideoImages/" + Eval("XTV7_Videos_Image") %>' /> </ItemTemplate> <HeaderStyle Width="130px" /> <ItemStyle Width="110px" /> </telerik:GridTemplateColumn> <telerik:GridBoundColumn DataField="XTV7_Videos_ID" DataType="System.Int32" FilterControlAltText="Filter XTV7_Videos_ID column" HeaderText="ID" ItemStyle-Width="20px" ReadOnly="False" SortExpression="XTV7_Videos_ID" UniqueName="XTV7_Videos_ID" Visible="False"> <ItemStyle Width="20px" /> </telerik:GridBoundColumn> <telerik:GridTemplateColumn AllowFiltering="false" HeaderStyle-Width="50px" ItemStyle-Width="50px"> <ItemTemplate> <asp:ImageButton ID="imgbtnStartVideo" runat="server" CommandName="Select" ImageUrl="~/App_Themes/XGIS/Images/LessonLevels/PlayVideo32.png" ToolTip="Play Video" /> </ItemTemplate> <HeaderStyle Width="50px" /> <ItemStyle Width="50px" /> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn AllowFiltering="false" HeaderStyle-Width="50px" ItemStyle-Width="50px"> <ItemTemplate> <asp:ImageButton ID="imgbtnStartVideoIPOD" runat="server" CommandName="Select" ImageUrl="~/App_Themes/XGIS/Images/LessonLevels/IPAD30.png" ToolTip="Podcast" /> </ItemTemplate> <HeaderStyle Width="50px" /> <ItemStyle Width="50px" /> </telerik:GridTemplateColumn> <telerik:GridBoundColumn Aggregate="Count" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" DataField="XTV7_Videos_Title" EmptyDataText="Search Titles" FilterControlToolTip="Search Titles" FilterControlWidth="200px" FooterText="Videos: " HeaderStyle-Width="240px" HeaderText="Search Video Titles" ItemStyle-Width="50px" ItemStyle-Wrap="true" SortExpression="XTV7_Videos_Title" UniqueName="XTV7_Videos_Title"> <HeaderStyle Width="240px" /> <ItemStyle Width="50px" Wrap="True" /> </telerik:GridBoundColumn> <telerik:GridTemplateColumn AllowFiltering="false" DataField="XTV7_Videos_Difficulty" DataType="System.Int32" HeaderText="Difficulty" ItemStyle-Width="20px" SortExpression="XTV7_Videos_Difficulty" UniqueName="XTV7_Videos_Difficulty"> <ItemTemplate> <asp:Image ID="imgD" runat="server" ImageUrl='<%# GetImageUrl((int)Eval("XTV7_Videos_Difficulty")) %>' /> </ItemTemplate> <ItemStyle Width="20px" /> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn AllowFiltering="false" DataField="XTV7_Videos_Captions" DataType="System.Byte" HeaderText="Captions" ItemStyle-Width="20px" SortExpression="XTV7_Videos_Captions" UniqueName="XTV7_Videos_Captions"> <ItemTemplate> <asp:Image ID="imgCaption" runat="server" ImageUrl='<%# (bool)Eval("XTV7_Videos_Captions") ? "~/App_Themes/XGIS/images/boolean/true.gif" : "~/App_Themes/XGIS/images/boolean/false.gif" %>' /> </ItemTemplate> <ItemStyle Width="20px" /> </telerik:GridTemplateColumn> <telerik:GridBoundColumn AllowFiltering="False" DataField="XTV7_VideoHits" DataType="System.Int32" FilterControlAltText="Filter XTV7_VideoHits column" HeaderText="Hits" SortExpression="XTV7_VideoHits" UniqueName="XTV7_VideoHits"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="XTV7_Videos_FileName" DataType="System.String" HeaderText="Hits" SortExpression="XTV7_Videos_FileName" UniqueName="XTV7_Videos_FileName" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="XTV7_Videos_Date_Uploaded" DataFormatString="{0:d}" DataType="System.DateTime" HeaderText="Uploaded" SortExpression="XTV7_Videos_Date_Uploaded" UniqueName="XTV7_Videos_Date_Uploaded" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="XTV7_Categories_Name" HeaderText="XTV7_Categories_Name" SortExpression="XTV7_Categories_Name" UniqueName="XTV7_Categories_Name" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="XTV7_Categories_Sub_Name" HeaderText="XTV7_Categories_Sub_Name" SortExpression="XTV7_Categories_Sub_Name" UniqueName="XTV7_Categories_Sub_Name" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="XTV7_Categories_ID" DataType="System.Int32" HeaderText="XTV7_Categories_ID" SortExpression="XTV7_Categories_ID" UniqueName="XTV7_Categories_ID" Visible="false" ReadOnly="false"> </telerik:GridBoundColumn> </Columns> <EditFormSettings> <EditColumn FilterControlAltText="Filter EditCommandColumn column"> </EditColumn> </EditFormSettings> </MasterTableView> <PagerStyle EnableSEOPaging="True" PageButtonCount="20" /> <FilterMenu EnableImageSprites="False"> </FilterMenu> <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Black"> </HeaderContextMenu></telerik:RadGrid> <DetailTables> <telerik:GridTableView name="Partecipanti" TableLayout="Fixed" DataKeyNames="PortalID,UserID,CodRiunione" AllowFilteringByColumn="false" DataSourceID="objDataSourceGridPartecipantiRiunione" Width="60%" HorizontalAlign="Right" ShowFooter="false" ShowGroupFooter="false" AllowCustomSorting="false" AllowCustomPaging="false" CommandItemSettings-AddNewRecordText="Conferma / Rifiuta partecipazione" CommandItemDisplay="Top" CommandItemSettings-ShowRefreshButton="false" runat="server"> <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="PortalID,CodRiunione" MasterKeyField="PortalID,ItemID" /> </ParentTableRelation> <Columns> <telerik:GridBoundColumn Visible="false" HeaderText="PortalID" AllowFiltering="false" DataField="PortalID" UniqueName="PortalID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn Visible="false" HeaderText="UserID" AllowFiltering="false" DataField="UserID" UniqueName="UserID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn Visible="false" HeaderText="CodRiunione" AllowFiltering="false" DataField="CodRiunione" UniqueName="CodRiunione"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderStyle-Width="200" HeaderText="Partecipanti" AllowFiltering="false" DataField="Nominativo" UniqueName="Nominativo"> </telerik:GridBoundColumn> <telerik:GridCheckBoxColumn Visible="false" HeaderText="FlgConfermaPartecipazione" AllowFiltering="false" DataField="FlgConfermaPartecipazione" UniqueName="FlgConfermaPartecipazione"> </telerik:GridCheckBoxColumn> <telerik:GridBoundColumn HeaderStyle-Width="120" HeaderText="Stato" AllowFiltering="false" DataField="ConfermaPartecipazioneTestuale" UniqueName="ConfermaPartecipazioneTestuale"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Note" AllowFiltering="false" DataField="Note" MaxLength="150" UniqueName="Note"> </telerik:GridBoundColumn> <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Edit" Text="Modifica" UniqueName="EditDetailCommandColumn" HeaderStyle-Width="30"> <HeaderStyle Width="30px"></HeaderStyle> <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> </telerik:GridButtonColumn> <telerik:GridButtonColumn ConfirmText="Sei sicuro di voler eliminare il partecipante da questa riunione?" ConfirmDialogType="Classic" ConfirmTitle="Conferma cancellazione" ButtonType="ImageButton" CommandName="Delete" Text="Elimina" UniqueName="DeleteDetailColumn" HeaderStyle-Width="30"> <HeaderStyle Width="30px"></HeaderStyle> <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> </telerik:GridButtonColumn> </Columns> <EditFormSettings EditFormType="Template"> <FormTemplate> <table border="0" cellspacing="2" cellpadding="1" width="100%" border="1" rules="none" style="border-collapse: collapse"> <tr class="EditFormHeader"> <td colspan="2"> <b>Conferma / Rifiuta partecipazione</b> </td> </tr> <tr> <td> <table border="0" cellspacing="1" cellpadding="1" width="100%" border="0"> <tr> <td> Utente: </td> <td> <telerik:RadComboBox ID="RadComboBoxUtente" runat="server" DataSourceID="objDataSourceUtentiUfficialiNonUfficialiGDL" Filter="Contains" DataTextField="NominativoConFlagPredefinito" Width="400" DataValueField="UserID" SelectedValue='<%# Bind("UserID") %>'> </telerik:RadComboBox> </td> </tr> <tr> <td> Presenza: </td> <td> <telerik:RadComboBox ID="RadComboBoxPartecipazione" Width="150" runat="server" SelectedValue = '<%# Bind("FlgConfermaPartecipazione") %>' OnDataBinding="RadComboBoxPartecipazione_OnDataBinding"> <Items> <telerik:RadComboBoxItem Text="Parteciperò" Value="1" /> <telerik:RadComboBoxItem Text="Non parteciperò" Value="0" /> </Items> </telerik:RadComboBox> </td> </tr> <tr> <td> Note: </td> <td> <asp:TextBox ID="txtNote" MaxLength="150" Width="300" runat="server" Text='<%# Bind("Note") %>'> </asp:TextBox> </td> </tr> </table> </td> </tr> <tr> <td align="right" colspan="2"> <br /><br /> <telerik:RadButton ID="btnUpdate" runat="server" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Inserisci", "Aggiorna") %>' CssClass="MyImageButton" CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>'> </telerik:RadButton> <telerik:RadButton ID="btnCancel" Text="Annulla" runat="server" CausesValidation="False" CommandName="Cancel"> </telerik:RadButton> </td> </tr> </table> <asp:HiddenField ID="hidUserID" runat="server" Value='<%# UserID %>' /> </FormTemplate> <EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"> </EditColumn> </EditFormSettings> <NoRecordsTemplate> Nessun partecipante per questa riunione </NoRecordsTemplate> </telerik:GridTableView> </DetailTables>DirectCast(DirectCast(rdgrd_Agenda, Telerik.Web.UI.RadGrid).MasterTableView.DetailTables(0),Telerik.Web.UI.GridTableView).DataKeyValues(e.Item.ItemIndex)("UserID")