Simple way to bind iList to webgrid

4 replies. Last post: December 26, 2010 8:51 AM by Hosney
Tags :
  • New Discussion
  • New Question
  • New Product Feedback
Hosney Member
Hi,


Is there a simple way to bind an IList to a webgrid? I tried this and it's not working

<ISWebGrid:WebGrid ID="WebGrid1" runat="server" Height="300px" UseDefaultStyle="True"
Width="100%">
</ISWebGrid:WebGrid>
protected void btnGo_Click(object sender, EventArgs e)
{
WebGrid1.DataSource = ObjectMgr.GetList(); // Returns IList<MyCustomObj>
WebGrid1.DataBind();
}

but nothing happens to the grid. Anything I'm missing?


Thanks

All times are GMT -5. The time now is 6:38 PM.
Previous Next