I'm having trouble setting default column width.
protected void Page_Load(object sender, EventArgs e)
-- getting dataset from database here.
WebDataGrid1.DataBind();
WebDataGrid1.Columns[1].Width = 150; //this is my attempt to setting default column width
}
I am getting "Object reference not set to an instance of an object" error. I can only set default column if I have data source defined at design time. Can someone help me figure out how I can set the default column width?
Thank you in advance for all your help.
That was it! Thank you so much for all your help and quick response.