O Otto Atzwanger Oct 14, 2004 #1 How to set Datagrid Column width? Is there somewhere an example? Thanks in advance Otto
P Peter Foot [MVP] Oct 14, 2004 #2 You can, by setting up a custom DataGridTableStyle for your specific collection, there is an example here:- http://www.inthehand.com/forums/viewtopic.php?t=96 Peter -- Peter Foot Windows Embedded MVP www.inthehand.com | www.opennetcf.org Do have an opinion on the effectiveness of Microsoft Windows Mobile and Embedded newsgroups? Let us know! https://www.windowsembeddedeval.com/community/newsgroups How to set Datagrid Column width? Is there somewhere an example? Thanks in advance Otto
You can, by setting up a custom DataGridTableStyle for your specific collection, there is an example here:- http://www.inthehand.com/forums/viewtopic.php?t=96 Peter -- Peter Foot Windows Embedded MVP www.inthehand.com | www.opennetcf.org Do have an opinion on the effectiveness of Microsoft Windows Mobile and Embedded newsgroups? Let us know! https://www.windowsembeddedeval.com/community/newsgroups How to set Datagrid Column width? Is there somewhere an example? Thanks in advance Otto
R Rüdiger Kardel Oct 14, 2004 #3 Otto, DataGridTableStyle oStyle = new DataGridTableStyle(); DataGridTextBoxColumn oCity = new DataGridTextBoxColumn(); oCity.HeaderText = "Ort"; oCity.MappingName = "SUPPL_CITY"; oCity.Width = 90; oStyle.GridColumnStyles.Add( oCity ); ...... // add more columns ...... dataGridSuppl.TableStyles.Clear(); dataGridSuppl.TableStyles.Add( oStyle ); dataGridSuppl.RowHeadersVisible = false; HTH Ruediger How to set Datagrid Column width? Is there somewhere an example? Thanks in advance Otto
Otto, DataGridTableStyle oStyle = new DataGridTableStyle(); DataGridTextBoxColumn oCity = new DataGridTextBoxColumn(); oCity.HeaderText = "Ort"; oCity.MappingName = "SUPPL_CITY"; oCity.Width = 90; oStyle.GridColumnStyles.Add( oCity ); ...... // add more columns ...... dataGridSuppl.TableStyles.Clear(); dataGridSuppl.TableStyles.Add( oStyle ); dataGridSuppl.RowHeadersVisible = false; HTH Ruediger How to set Datagrid Column width? Is there somewhere an example? Thanks in advance Otto