or
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
<AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="RadGrid1"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
<telerik:AjaxSetting AjaxControlID="RadTabStrip1"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> |
<telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
<telerik:AjaxSetting AjaxControlID="RadMultiPage1"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:RadAjaxManager> |
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> |
<script type="text/javascript"> |
function onTabSelecting(sender, args) { |
if (args.get_tab().get_pageViewID()) { |
args.get_tab().set_postBack(false); |
} |
} |
</script> |
<h4>Attendee List</h4> |
<asp:ObjectDataSource ID="odsAttendeeList" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="dsAttendeeList" TypeName="WorkshopsLibrary.CAttendees"> |
<SelectParameters> |
<asp:SessionParameter Name="sUserID" SessionField="UserID" Type="String" /> |
<asp:SessionParameter Name="sWorkshopID" SessionField="AdminWorkshopID" Type="String" /> |
</SelectParameters> |
</asp:ObjectDataSource> |
<telerik:RadGrid ID="RadGrid1" DataSourceID="odsAttendeeList" runat="server" AutoGenerateColumns="False" AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True" PageSize="5" GridLines="None" ShowGroupPanel="true" OnPreRender="RadGrid1_PreRender"> |
<PagerStyle Mode="NumericPages" /> |
<MasterTableView DataSourceID="odsAttendeeList" DataKeyNames="RegistrationID" AllowMultiColumnSorting="True" GroupLoadMode="Server"> |
<NestedViewTemplate> |
<asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap" Visible="false"> |
<telerik:RadTabStrip ID="RadTabStrip1" SelectedIndex="0" CssClass="tabStrip" runat="server" MultiPageID="RadMultiPage1" Orientation="HorizontalTop" OnClientTabSelecting="onTabSelecting" OnTabClick="RadTabStrip1_TabClick" /> |
<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" CssClass="multiPage" OnPageViewCreated="RadMultiPage1_PageViewCreated" /> |
</asp:Panel> |
</NestedViewTemplate> |
<Columns> |
<telerik:GridBoundColumn SortExpression="RegistrationID" HeaderText="RegistrationID" HeaderButtonType="TextButton" DataField="RegistrationID" UniqueName="RegistrationID" /> |
<telerik:GridBoundColumn SortExpression="FirstName" HeaderText="First Name" HeaderButtonType="TextButton" DataField="FirstName" UniqueName="FirstName" /> |
<telerik:GridBoundColumn SortExpression="LastName" HeaderText="Last Name" HeaderButtonType="TextButton" DataField="LastName" UniqueName="LastName" /> |
<telerik:GridBoundColumn SortExpression="Citizenship" HeaderText="Citizenship" HeaderButtonType="TextButton" DataField="Citizenship" UniqueName="Citizenship" /> |
<telerik:GridBoundColumn SortExpression="Phone" HeaderText="Phone" HeaderButtonType="TextButton" DataField="Phone" UniqueName="Phone" /> |
<telerik:GridBoundColumn SortExpression="Email" HeaderText="Email" HeaderButtonType="TextButton" DataField="Email" UniqueName="Email" /> |
<telerik:GridBoundColumn SortExpression="Cancelled" HeaderText="Cancelled" HeaderButtonType="TextButton" DataField="Cancelled" UniqueName="Cancelled" /> |
<telerik:GridBoundColumn SortExpression="Accepted" HeaderText="Accepted" HeaderButtonType="TextButton" DataField="Accepted" UniqueName="Accepted" /> |
</Columns> |
</MasterTableView> |
<ClientSettings AllowDragToGroup="true" /> |
</telerik:RadGrid> |
Protected WithEvents RadTabStrip1 As RadTabStrip |
Protected WithEvents RadMultiPage1 As RadMultiPage |
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
Dim cPageRoutines As New CPageRoutines |
Dim cWorkshops As New CWorkshops |
If HttpContext.Current.Session("UserID") Is Nothing Then |
cPageRoutines.Login(User) |
End If |
cPageRoutines.VerifyRole("SystemAdministrator") |
cPageRoutines.VerifyAdminWorkshop("AdminWorkshopID") |
End Sub |
Private Sub AddPageView(ByVal tab As RadTab) |
For Each nestedItem As GridNestedViewItem In RadGrid1.MasterTableView.GetItems(GridItemType.NestedView) |
Dim RadMultiPage1 As RadMultiPage = DirectCast(nestedItem.FindControl("RadMultiPage1"), RadMultiPage) |
Dim pageView As RadPageView = New RadPageView |
pageView.ID = tab.Text.Replace(" ", "") |
RadMultiPage1.PageViews.Add(pageView) |
pageView.CssClass = "pageView" |
tab.PageViewID = pageView.ID |
Next |
End Sub |
Private Sub AddTab(ByVal tabName As String) |
For Each nestedItem As GridNestedViewItem In RadGrid1.MasterTableView.GetItems(GridItemType.NestedView) |
Dim RadTabStrip1 As RadTabStrip = DirectCast(nestedItem.FindControl("RadTabStrip1"), RadTabStrip) |
Dim tab As RadTab = New RadTab |
tab.Text = tabName |
RadTabStrip1.Tabs.Add(tab) |
Next |
End Sub |
Protected Sub RadGrid1_PreRender(ByVal sender As Object, ByVal e As EventArgs) Handles RadGrid1.PreRender |
If Not Page.IsPostBack Then |
RadGrid1.MasterTableView.Items(0).Expanded = False |
RadGrid1.MasterTableView.Items(0).ChildItem.FindControl("InnerContainer").Visible = True |
End If |
End Sub |
Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs) Handles RadGrid1.ItemCommand |
If e.CommandName = RadGrid.ExpandCollapseCommandName Then |
DirectCast(e.Item, GridDataItem).ChildItem.FindControl("InnerContainer").Visible = Not e.Item.Expanded |
End If |
End Sub |
Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid1.ItemCreated |
If TypeOf e.Item Is GridNestedViewItem Then |
e.Item.FindControl("InnerContainer").Visible = (DirectCast(e.Item, GridNestedViewItem)).ParentItem.Expanded |
Dim nestedItem As GridNestedViewItem = DirectCast(e.Item, GridNestedViewItem) |
Dim RadTabStrip1 As RadTabStrip = DirectCast(nestedItem.FindControl("RadTabStrip1"), RadTabStrip) |
AddTab("Attendee") |
AddPageView(RadTabStrip1.FindTabByText("Attendee")) |
AddTab("Additional Questions") |
Dim cCustomFields As New CCustomFields |
Dim dt As DataTable = cCustomFields.dsCustomFieldList(HttpContext.Current.Session("UserID").ToString, HttpContext.Current.Session("AdminWorkshopID").ToString).Tables(0) |
If dt.Rows.Count > 0 Then |
AddTab("Additional Questions") |
End If |
AddTab("Orders") |
AddTab("Payments") |
End If |
End Sub |
Protected Sub RadMultiPage1_PageViewCreated(ByVal sender As Object, ByVal e As RadMultiPageEventArgs) Handles RadMultiPage1.PageViewCreated |
Dim userControlName As String = e.PageView.ID & ".ascx" |
Dim userControl As Control = Page.LoadControl(userControlName) |
userControl.ID = e.PageView.ID & "_userControl" |
userControl.GetType().GetProperty("RegistrationID").SetValue(userControl, RadGrid1.MasterTableView.DataKeyValues(??)("RegistrationID").ToString, Nothing) |
e.PageView.Controls.Add(userControl) |
End Sub |
Protected Sub RadTabStrip1_TabClick(ByVal sender As Object, ByVal e As RadTabStripEventArgs) Handles RadTabStrip1.TabClick |
AddPageView(e.Tab) |
e.Tab.PageView.Selected = True |
End Sub |
Is it possible to allow end user to upload multiple images using AsyncUploaded to the temporyfolder and display those temporary file images via RadBinaryImage (IE in a repeater or listview etc) allowing user to preview those images before submitting the images to the filesystem or database.
Note that the end user might upload one image at a time or mutiple images at once to the form and even remove images before finally hitting the submit button to move the previewed uploaded files from the temporary location to the filesystem or database.
If so how and is there an example somewhere?
Thanks