HI all. I am working on a web site that i need to dynamically add menus to a start page depending on if that user has permission to view the menu or not. So i create the menus and put them in a gridview, if the user does not have permission for that menu, I hide that column in the gridview. It works great the way it is. The only problem is a small column at the end that I can' remove. I think it may be because of the way I get the gridview to display. Any help would be appreciated. BTW I am a noob here, so th emay be another way of displaying this as well. I am open to suggestions. Thanks. here is the code.
''THIS is just to get the gridview to render on pageload
Dim arrMenu As New ArrayListarrMenu.Add("1")
gvMenu.DataSource = arrMenu
gvMenu.DataBind()
'Add Menus to grid
Dim cell As New TableCell
gvMenu.Rows(0).Cells.Add(cell)
gvMenu.Rows(0).Cells(0).Controls.Add(mnuAdmin)
gvMenu.Rows(0).Cells.Add(cell)
gvMenu.Rows(0).Cells(1).Controls.Add(mnuCS)
gvMenu.Rows(0).Cells.Add(cell)
gvMenu.Rows(0).Cells(2).Controls.Add(mnuTransaction)
gvMenu.Rows(0).Cells.Add(cell)
gvMenu.Rows(0).Cells(3).Controls.Add(mnuItem)
gvMenu.Rows(0).Cells.Add(cell)
gvMenu.Rows(0).Cells(4).Controls.Add(mnuInventory)
If there is a way to put these controls i a datatable, I could try that too. I just couldn't figure it out.