modify output table

Last post 12-18-2008, 11:08 AM by cutechat. 1 replies.
Sort Posts: Previous Next
  •  12-15-2008, 9:55 AM 46939

    modify output table

    I'm testing the AJAX uploader and have som questions about the output table.
    Is it possible to add more then one  ItemTemplate?
    If not. Is there other ways to modify the output table. A VB exampel would help me a lot.
  •  12-18-2008, 11:08 AM 47094 in reply to 46939

    Re: modify output table

    Hi,
     
    Please try this code :
     
     

    <%@ Page Language="VB" %>

    <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <script runat="server">
     Protected Overrides Sub OnPreRender(ByVal e As System.EventArgs)
      MyBase.OnPreRender(e)
      
      'hide the default table
      UploadAttachments1.GetItemsTable().Visible = False
      DataGrid1.DataSource = UploadAttachments1.Items
      DataGrid1.DataBind()
     End Sub
    </script>

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
     <title>DataGridVB</title>
    </head>
    <body>
     <form id="form1" runat="server">
      <div>
       <CuteWebUI:UploadAttachments runat="server" ID="UploadAttachments1">
       </CuteWebUI:UploadAttachments>
       <hr />
       <asp:DataGrid ID="DataGrid1" runat="server" AutoGenerateColumns="false" DataKeyField="FileGuid">
        <Columns>
         <asp:BoundColumn DataField="FileGuid" HeaderText="File Guid" />
         <asp:BoundColumn DataField="FileName" HeaderText="File Name" />
         <asp:BoundColumn DataField="FileSize" HeaderText="File Size" />
        </Columns>
       </asp:DataGrid>
      </div>
     </form>
    </body>
    </html>

     
    Regards,
    Terry
View as RSS news feed in XML