Increase width of datagrid
-
hi all, i m using datagrid to show data.Each column of this datagrid have fixed length(width). How can i increase the width of particular column?
Rupesh Kumar Swami Software Engineer, Integrated Solution, Bikaner (India) My Company
-
hi all, i m using datagrid to show data.Each column of this datagrid have fixed length(width). How can i increase the width of particular column?
Rupesh Kumar Swami Software Engineer, Integrated Solution, Bikaner (India) My Company
you can use TableStyles: For Example: Dim ts As New DataGridTableStyle() ts.MappingName = "TblEmployees" GrdEmployees.TableStyles.Clear() 'GrdEmployees=Name of your datagrid 'Define all your columns Dim ColID As New DataGridTextBoxColumn With ColID .MappingName = "EmployeeID" .HeaderText = "ID" .Width = 100 End With With ts.GridColumnStyles .Add(ColID) End With GrdMoves.TableStyles.Add(ts) Hope it helped :laugh:
-
you can use TableStyles: For Example: Dim ts As New DataGridTableStyle() ts.MappingName = "TblEmployees" GrdEmployees.TableStyles.Clear() 'GrdEmployees=Name of your datagrid 'Define all your columns Dim ColID As New DataGridTextBoxColumn With ColID .MappingName = "EmployeeID" .HeaderText = "ID" .Width = 100 End With With ts.GridColumnStyles .Add(ColID) End With GrdMoves.TableStyles.Add(ts) Hope it helped :laugh:
Thanks a lot. its work for me.
Rupesh Kumar Swami Software Engineer, Integrated Solution, Bikaner (India) My Company