我有一个函数,它包含一个包含信息的字符串,将其拆分,然后将行和列添加到一个asp.net GridView。将数据绑定到事件中的数据网格
这很好,但问题是,这个功能是从一个触发的事件,然后当我这样做:
TestGrid.DataSource = (myTable).DefaultView;
TestGrid.DataBind();
它不填写的网格和显示(为myTable拥有所有正确的信息)
我网的样子:
<asp:UpdatePanel ID="UpdateTestingGrid" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="TestGrid" runat="server" CssClass="pipesTbl">
</asp:GridView>
</ContentTemplate>
如果我理解正确,这是有关的事情,这是不正常的,
任何人可以尝试和帮助吗? 甚至只是帮助我和谁开始搜索谷歌?我在找什么?
编辑
希望这有助于有点
protected void progressBar_RunTask(object sender, EO.Web.ProgressTaskEventArgs e)
{
tester.done += new tester.PipeDoneEvtArgs(tester_Done);
progressBar.Maximum = 100;
}
void tester_Done(double runTime)
{
DataTable myTable = new DataTable();
//Here i fill the myTable with rows and columns
TestGrid.DataSource = (myTable).DefaultView;
TestGrid.DataBind();
}
哪个控件触发将数据绑定到GridView的事件? –
你正在处理哪个事件来填充“myTable”并绑定一个GridView? – adatapost
@AVD,谢谢我编辑了更多代码的问题... – Ovi