Jump to content
  • Revista PROGRAMAR: Já está disponível a edição #60 da revista programar. Faz já o download aqui!

Sign in to follow this  
V4mp1r3

Datagrid Item separador ( urgente !)

Recommended Posts

V4mp1r3

Boassssss!

Estou a tentar adicionar um separador entre items numa datagrid, e para isso, estou a criar um separador no evento datagrid item created

o Código é o seguinte:

Private Sub Datagrid1_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles Datagrid1.ItemCreated

Dim MyTable As Table = Datagrid1.Controls(0) 
Dim MyDatagridItem As DataGridItem

MyDatagridItem = New DataGridItem(0, 0, ListItemType.Separator) Dim cell As TableCell = New TableCell 
MyDatagridItem.Cells.Add(cell) 


MyDatagridItem.ID = "puff" 
MyTable.Rows.AddAt(e.Item.ItemIndex, MyDatagridItem)

End Sub

O problema, é que quando e' feito o render para o browser, o código gerado é apenas :

<tr id="puff"> </tr> 

Quando este devia de conter a <td> dentro.. alguma ideia? :s tou mesmo enrascado com isto..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.