This is a migrated thread and some comments may be shown as answers.

adding new row thru code

1 Answer 128 Views
GridView
This is a migrated thread and some comments may be shown as answers.
santosh
Top achievements
Rank 2
santosh asked on 17 Mar 2008, 08:03 AM

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

1 Answer, 1 is accepted

Sort by
0
Kiril
Telerik team
answered on 17 Mar 2008, 08:38 AM
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
Tags
GridView
Asked by
santosh
Top achievements
Rank 2
Answers by
Kiril
Telerik team
Share this question
or