Project background:
C# ASP.NET project using a custom class to completely define the RadGrid definition. I am using advanced databinding and ajax.
So far everything I have implemented is working fine. One of the requirements I have is that the user upon entry to the form will select an item from dropdownlist control and then click a button to fetch the datasource based on their selection. This is done because the available selections do not return the same data elements. After the retrieval of the data I am not able to get the grid to display the data. I have added to following to the onClick event of the button. I am using mock data at this time so __getData = true; signifies I want to return data rather than an empty grid. The .Rebind Method is executing NeedDataSource and the DataTable returned from
C# ASP.NET project using a custom class to completely define the RadGrid definition. I am using advanced databinding and ajax.
So far everything I have implemented is working fine. One of the requirements I have is that the user upon entry to the form will select an item from dropdownlist control and then click a button to fetch the datasource based on their selection. This is done because the available selections do not return the same data elements. After the retrieval of the data I am not able to get the grid to display the data. I have added to following to the onClick event of the button. I am using mock data at this time so __getData = true; signifies I want to return data rather than an empty grid. The .Rebind Method is executing NeedDataSource and the DataTable returned from
PolicyAPI.GetPolicyData(__getData)
has data but the grid does not seem to reload. I have checked all of the samples but have not found any direction. I appreciate any assistance.protected void Page_Init(object source, EventArgs e)
{
this.__policyRadGrid = PolicyRadGrid.GridDefinition();
this.PlaceHolder1.Controls.Add(this.__policyRadGrid);
}
protected void Page_Load(object sender, EventArgs e)
{
this.__policyRadGrid.NeedDataSource += new GridNeedDataSourceEventHandler(PolicyRadGrid_NeedDataSource);
}
protected void btnRetrieveData_OnClick(object sender, EventArgs e)
{
__getData = true;
this.__policyRadGrid.Rebind();
}
protected void PolicyRadGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
{
this.__policyRadGrid.DataSource = PolicyAPI.GetPolicyData(__getData);
}