Column width - DataTabel source

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

    Posted 10 Feb 2014 Link to this post

    Hi,

    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
    MJ
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 10 Feb 2014 Link to this post

    Hello,

    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. 
     
    Regards,
    Didie
    Telerik

    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. UI for WPF is Visual Studio 2017 Ready
Back to Top