Update: I think its a side effect of a different control I am using
I have a control on the page that does an ajax request back to a page e.g.(clicking a button) in that button event I am making a call to some web service. After I get the results back from that call I am using linq to filter down the data by some items on the page.
I tired setting the data source of my grid after I am done with the linq filtering but rows never show up on the page. I ended up reading this link Rebind grid on command/postback event with EnableViewState = false thiking that would be what I need to do, but that has not worked for me either.
Here is some of the code I have written.
That datasource is set and the Items created code does run but the grid never shows up on the page. It
I have a control on the page that does an ajax request back to a page e.g.(clicking a button) in that button event I am making a call to some web service. After I get the results back from that call I am using linq to filter down the data by some items on the page.
I tired setting the data source of my grid after I am done with the linq filtering but rows never show up on the page. I ended up reading this link Rebind grid on command/postback event with EnableViewState = false thiking that would be what I need to do, but that has not worked for me either.
Here is some of the code I have written.
| public class Programs |
| { |
| public string Name |
| { |
| get; |
| set; |
| } |
| public bool Required |
| { |
| get; |
| set; |
| } |
| public bool Approved |
| { |
| get; |
| set; |
| } |
| } |
| public partial class Charts: Page |
| { |
| List<Programs> ProgramList; |
| protected void Button_Click(object sender, ImageClickEventArgs e) |
| { |
| //Programs has items in it and is declare as a var |
| // for brevity sake I left out the filtering code |
| ProgramList = programs; |
| DetailsGrid.DataSource = null; |
| DetailsGrid.Rebind(); |
| } |
| protected void DetailsGrid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) |
| { |
| if (ProgramList != null) |
| { |
| DetailsGrid.DataSource = ProgramList; |
| } |
That datasource is set and the Items created code does run but the grid never shows up on the page. It