.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

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -