我在“玻璃窗”应用中有一个数据网,我的代码是
private void BindGrid(SmsPdu pdu)
{
DataRow dr=dt.NewRow();
SmsDeliverPdu data = (SmsDeliverPdu)pdu;
dr[0]=data.OriginatingAddress.ToString();
dr[1]=data.SCTimestamp.ToString();
dr[2]=data.UserDataText;
dt.Rows.Add(dr);
dataGrid1.DataSource=dt;
}
And my datagrid looks like this alt text http://www.freeimagehosting.net/uploads/c368f82e0e.jpg
- How to set width of all three columns sender,time,Message?