forum.venkateswarlu.net
      Register      Login
Add new record in Telerik radgrid not working when there are no records

1 replies to this topic

Murali Krishna #1
Member
26 Points
Posted on 15 Jul 2013 12:44 PM IST While we are working with  Telerik rad grid control there is a an attribute AddNewRecordText  in CommandItemSettings tag . Whenever we click on AddNewRecordText button it displays the fields along with textboxes to enter the values. The displayed fields are equal to the fields in the rows which we are populating in the grid. If there is atleast one record we can able to use this AddNewRecordText button without any issue. The issue comes when the datasource is with no records. At this time when we click on button it wont provide the fields to enter the values. To fix this we have to use DataTable as below:

 DataTable table = new DataTable();
                        table.Columns.Add("xxxxx");
Radgridcntrl.DataSource = table;



 
Dot Net     1440 views     Reply to this topic
Jahnavi N #2
Member
164 Points
Replied on 15 Jul 2013 02:43 PM IST
Hi Murali,

I have faced the same issue long back I found the same solution which you provided in some other blogs. 
Good to see your post on this forum.

Thanks,
Jahnavi
 
Reply to this topic