bhavna_816 0 Junior Poster

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