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

See "Add New Record" in a GridView not populate

1 Answer 38 Views
Grid
This is a migrated thread and some comments may be shown as answers.
lupotana
Top achievements
Rank 1
lupotana asked on 31 Oct 2011, 04:34 PM
Hi, I use the gria as like this example (http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx) 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 ?

Thanks,
Marco


1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 01 Nov 2011, 05:42 AM
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[] {}

-Shinu.
Tags
Grid
Asked by
lupotana
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or