Re: modify output table

  •  12-18-2008, 11:08 AM

    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 Complete Thread