-
Notifications
You must be signed in to change notification settings - Fork 0
/
WebForm1.aspx.cs
31 lines (27 loc) · 985 Bytes
/
WebForm1.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using DevExpress.Web;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace T501713 {
public partial class WebForm1 : System.Web.UI.Page {
protected void Page_PreInit(object sender, EventArgs e) {
Master.PopupInit += Master_PopupInit;
}
private void Master_PopupInit(object sender, EventArgs e) {
RenderGrid((ASPxPopupControl)sender);
}
private void RenderGrid(ASPxPopupControl container) {
ASPxGridView grid = new ASPxGridView();
grid.ID = "ASPxGridView";
container.Controls.Add(grid);
grid.Width = Unit.Percentage(100);
grid.DataBinding += (sender, e) => {
(sender as ASPxGridView).DataSource = Enumerable.Range(0, 10).Select(i => new { Id = i, Name = "Name" + i }).ToList();
};
grid.DataBind();
}
}
}