Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: Advanced Datagrid - Help Needed.


Message #1 by "Robert Sindall" <rsindall@z...> on Thu, 7 Nov 2002 12:56:10 -0000
Hi

I'm building a user by roles grid.

Roles across and users down.
They can add roles and users, therefore there is an unknown number of
columns.

I'm adding columns for: id, name and then the roles like this: (see code)

            Dim [UserDB] As New UsersDB()
            Dim RolesList As SqlDataReader = [UserDB].GetAllRoles()
            Dim UserList As SqlDataReader = [UserDB].GetUsers()

            Dim dt As New DataTable()
            Dim dr As DataRow
            Dim i As Integer
            Dim dv As New DataView(dt)

            dt.Columns.Add(New DataColumn("ID", GetType(Int32)))
            dt.Columns.Add(New DataColumn("Name", GetType(String)))

		' adding role columns
            While RolesList.Read
                dt.Columns.Add(New DataColumn(CStr(RolesList("RoleName")),
GetType(Boolean)))
            End While

I need to add edit columns after and I also need the role columns to appear
as check boxes when in edit mode?

I also need the value in the cell to appear as an image rather than
TRUE/FALSE

and I'd like the text in the column header to appear vertically.

Is this all possible seeing that I can't set everything in the ASP.NET
interface layer and I have top set everything dynamically in the code behind
?

Thanks

Robert


  Return to Index