Hello,
i'm having a problem with my RadGrid, At this moment i need to bind data to my Grid using 2 diferent Store Procedures, mapped on my .edmx.
The idea is to have two buttons, each one to call a procedure. At this moment My problem is when I click on a collumn to sort data, my grid comes blank....I need to allow my RadGrid to sort collumns but for the specific procedure that was bind at last.
How can i do that?
My code is
i'm having a problem with my RadGrid, At this moment i need to bind data to my Grid using 2 diferent Store Procedures, mapped on my .edmx.
The idea is to have two buttons, each one to call a procedure. At this moment My problem is when I click on a collumn to sort data, my grid comes blank....I need to allow my RadGrid to sort collumns but for the specific procedure that was bind at last.
How can i do that?
My code is
public partial class InvoicesScalingDefault : iConnect.Web.iConnect, IInvoicesScale
{
private InvoicesScalePresenter _presenter;
public System.Collections.Generic.IList<
Data.SapDocuments
> SapDocuments
{
get;
set;
}
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
this._presenter.OnViewInitialized();
LoadData();
}
this._presenter.OnViewLoaded();
}
[CreateNew]
public InvoicesScalePresenter Presenter
{
set
{
this._presenter = value;
this._presenter.View = this;
}
}
/// <
summary
>
/// Carregar RadGrid1 com o objecto SapDocuments
/// </
summary
>
private void LoadData()
{
string user = Page.User.Identity.Name.Substring(Page.User.Identity.Name.IndexOf("\\") + 1);
EscalonamentoFacturasEntities objectContx = new EscalonamentoFacturasEntities();
RadGrid1.DataSource = objectContx.ShowUnprocessedInvoices(user);
//RadGrid1.DataBind();
}
protected void RadGrid1_GridExporting(object sender, GridExportingArgs e)
{
e.ExportOutput = e.ExportOutput.Replace("\"\r\n\"", "\"\r\n\"'");
}
protected void ShowProcessed_Click(object sender, EventArgs e)
{
string user = Page.User.Identity.Name.Substring(Page.User.Identity.Name.IndexOf("\\") + 1);
EscalonamentoFacturasEntities objectContx = new EscalonamentoFacturasEntities();
RadGrid1.DataSource = objectContx.ShowProcessedInvoices(user);
RadGrid1.DataBind();
}
protected void ShowUnProcessed_Click(object sender, EventArgs e)
{
LoadData();
}