See "Add New Record" in a GridView not populate

2 posts, 0 answers
  1. lupotana
    lupotana avatar
    73 posts
    Member since:
    Nov 2006

    Posted 31 Oct 2011 Link to this post

    Hi, I use the gria as like this example ( with an externale Usercontol for Add or Edit record.

    My grid have many filters and the grid is not populate in page load but when I press a button for filter.

    If I don't click the button I don't see the Grid... but in this scenario if I want insert a new record I must search before, populate the grid and after I can see the "Add New Record" button of the grid,

    This is a way for see this button with the grid empty ?


  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 01 Nov 2011 Link to this post

    Hello Marco,

    This is the expected behavior. When there is no Datasource (null), the Grid Cannot insert the data. Also the GridControl will not be visible if the DataSource for the grid is empty, i.e., if you have set RadGrid1.DataSource = null or RadGrid1.DataSourceID = String.Empty.
    If you want to make it visible on the page then you can set the DataSource as RadGrid1.DataSource= new string[] {}

Back to Top