Column width - DataTabel source

2 posts, 0 answers
  1. ITA
    ITA avatar
    381 posts
    Member since:
    Aug 2009

    Posted 10 Feb 2014 Link to this post


    i bind a DataTable to my RadGridView like this:

    ​DataTable source = new DataTable();
    source.Columns.Add("Nr.", typeof(int));
    source.Columns.Add("Modul", typeof(string));
    source.Columns.Add("ID", typeof(string));
    source.Columns.Add("Nummer", typeof(string));
    source.Columns.Add("Suchwort", typeof(string));
    source.Columns.Add("Inhalt", typeof(string));
    source.Columns.Add("Feld", typeof(string));

    How do i set the width of each column in code behind?

    Thanks a lot
    Best Regards
  2. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 10 Feb 2014 Link to this post


    You could specify Width for the columns of RadGridView (available in RadGridView.Columns collection). There is not way to specify this through the source collection though. 

    Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

  3. DevCraft R3 2016 release webinar banner
Back to Top