adding new row thru code

2 posts, 0 answers
  1. santosh
    santosh avatar
    8 posts
    Member since:
    Mar 2008

    Posted 17 Mar 2008 Link to this post

    hi Telerik
     
       this is very first simple problem with Radgridview control.
     
       i am using winform Q3 2007.
       
       i want to add row to GridView programattically.
     
       in your sample code you using DB(which i dont wanna to use)
       and in your Help, you suggest to use

         radGridView.Rows.Add(new string() {"asdas","asdas","asdasdaasd"}); like statement.
       but this statement throws error
     
           ")" expected "; expected"  like error.

      
        
       //////////////
       my sample code is
          radGridView1.MasterGridViewTemplate.Columns.Add(new GridViewTextBoxColumn("Image                 "));
          radGridView1.MasterGridViewTemplate.Columns.Add(new GridViewTextBoxColumn("Name                    "));
          radGridView1.MasterGridViewTemplate.Columns.Add(new GridViewTextBoxColumn("Role                     "));
          radGridView1.MasterGridViewTemplate.Columns.Add(new GridViewTextBoxColumn("Permission               "));
          radGridView1.MasterGridViewTemplate.Columns.Add(new GridViewTextBoxColumn("Operation        "));           

          //image
           GridViewImageColumn imgCol = new GridViewImageColumn("D:\\kumar\\security-lab\\RandD - code\\Sample-RadControl\\add_reviewer.gif");
                imgCol.UniqueName = "Img";
                imgCol.HeaderText = "img";
                radGridView1.MasterGridViewTemplate.Columns.Add(imgCol);

     
           //data
          radGridView1.Rows.Add(new String() {"c:\\image\\myimage.jpg","sdfS","ABC","Admin","read","delete"});
          /////////////////

       and i need to add first coloumn as a image column.
     
      i didnt find this simple adding example in your forum, tutorials, so requestiing for the same
      
      Please help me.
     
    thanks,
     Santosh kumar

  2. Kiril
    Admin
    Kiril avatar
    158 posts

    Posted 17 Mar 2008 Link to this post

    Hi santosh,

    Thank you for contacting me.

    We have released a beta version of the upcoming Q1 2008. It includes a significantly improved version of RadGridView, which supports your scenario. I encourage you to download the Q1 2008 Beta, and share any feedback with us. It will let us take the official release in the direction most beneficial to you.

    If you have any further questions, please do not hesitate to contact me.

    All the best,
    Kiril
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top