.net - Setting the size of char datacolumn -
i add new column datatable. column of type char length of 10.
datacolumn d = new datacolumn(fieldname, typeof(char)); dt.columns.add(d);
my question how add "size" column?
thanks lot.
note in c#, char
always 1 character. try this:
datacolumn d = new datacolumn(fieldname, typeof(string)); d.maxlength = 10; dt.columns.add(d);
Comments
Post a Comment