I want to set the width of the column by hardcoding it and don't want to allow it to resize at runtime.
i.e. don't allow user to resize the column width.
How can i do this?
I have tried this code
public void SetColWidth(DataGridTableStyle ts1,int colNum,int width)
// {
// try
// {
// ts1.GridColumnStyles[colNum].Width = width;
//
// ts1.DataGrid.Refresh();
// }
// catch{}
//
// }
private void button1_Click(object sender, System.EventArgs e)
{
// DataGridTableStyle ts1 = dataGrid1.TableStyles["dtTest"];
//
// SetColWidth(ts1, 1,10);
}
but its not working !Can anybody have any idea!
I have to do this in:
language-C# Windows application
version-.net 1.1 or 2003
bhavna_816 0 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.