datagrid size
-
Hi! I have an aparent simple problem, but i need some help, please! i have a datagrid. The column are created in code, and not with property builder. I want to change de datagrid' size (and, if possible, the size of every column), so that it can integrate with my design page. In property builder i didn't find anything, and in msdn i found something with an Size object, but...no result. Please, can you give me some directions? Thank you!
-
Hi! I have an aparent simple problem, but i need some help, please! i have a datagrid. The column are created in code, and not with property builder. I want to change de datagrid' size (and, if possible, the size of every column), so that it can integrate with my design page. In property builder i didn't find anything, and in msdn i found something with an Size object, but...no result. Please, can you give me some directions? Thank you!
While creating your dynamic bound columns on page you can give them their sizes.In this code i gave the same size to all my dynamic columns in a "for next" circle.
Private Sub myDataGrid_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles myDataGrid.ItemCreated For ColumnCounter As Integer = 0 To e.Item.Cells.Count - 1 Dim virtualTextBox As TextBox = CType(e.Item.Cells(ColumnCounter).Controls(0), TextBox) virtualtextBox.Width = Unit.Pixel(70) Next End Sub
--junior coder-- -
Hi! I have an aparent simple problem, but i need some help, please! i have a datagrid. The column are created in code, and not with property builder. I want to change de datagrid' size (and, if possible, the size of every column), so that it can integrate with my design page. In property builder i didn't find anything, and in msdn i found something with an Size object, but...no result. Please, can you give me some directions? Thank you!