or
<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 ddls
private
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 ddls
if
(!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 SQLCommands
public
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")
Protected
Sub
Page_Load(sender
As
Object
, e
As
System.EventArgs)
Handles
Me
.Load
rgd_CurrentGroups.DataSource = GetGroups()
rgd_CurrentGroups.DataBind()
RadListBox1.DataSource = GetGroups().DefaultView
RadListBox1.DataBind()
End
Sub
Private
Function
GetGroups()
As
DataTable
'Dim UserName As String = Request.QueryString("UserName")
Dim
UserName
As
String
=
"fred"
Dim
connectionString
As
String
=
DirectCast
(ConfigurationManager.ConnectionStrings(
"IT_CentralConnectionString"
).ConnectionString,
String
)
Dim
connection
As
New
SqlConnection(connectionString)
Dim
command
As
New
SqlCommand(connectionString, connection)
command =
New
SqlCommand(
"procGetGroupUsers"
, connection)
command.CommandType = CommandType.StoredProcedure
command.Parameters.Add(
"@UserName"
, SqlDbType.VarChar).Value = UserName
command.Connection.Open()
Dim
myDataAdapter
As
New
SqlDataAdapter(command)
Dim
myDataSet
As
New
DataSet
Dim
dtData
As
New
DataTable
myDataAdapter.Fill(myDataSet)
Return
myDataSet.Tables(0)
command.Connection.Close()
End
Function