pocket pc datagrid in vb.net
Mobile
1
Posts
1
Posters
0
Views
1
Watching
-
I am using datagrid in my vb.net (pocket pc) application. I am using the following code to set the tablestyle to the datagrid to adjust the column width
Dim ts As DataGridTableStyle = New DataGridTableStyle ts.MappingName = "Products" Dim Product As DataGridTextBoxColumn = New DataGridTextBoxColumn Product.MappingName = "Product" Product.HeaderText = "Product" Product.Width = 130 ts.GridColumnStyles.Add(Product) Dim Qty As DataGridTextBoxColumn = New DataGridTextBoxColumn Qty.MappingName = "Quantity" Qty.HeaderText = "Quantity" Qty.Width = 75 ts.GridColumnStyles.Add(Qty) Me.DataGrid1.TableStyles.Add(ts) Me.DataGrid1.TableStyles(0).GridColumnStyles(0).Width = 100
After binding the datagrid I use this code to set the datagridtablestyle but it only show my one column me nothing even it does not return the values in the datagrid with original tablestyle. It show only row header in the grid but does not show the columns. Any idea how I can solve this problem???? Thanks In advance