PDA

View Full Version : Row Expander Plugin with Gridpanels



NishaLijo
Aug 19, 2010, 12:07 PM
Hi,

I want to add checkbox through dynamically.


protected void BeforeExpand(object sender, DirectEventArgs e)
{
string id = e.ExtraParams["id"];

Store store = new Store { ID = "StoreRow_" + id };

JsonReader reader = new JsonReader();
reader.IDProperty = "OrderID";
reader.Fields.Add("OrderID", "ItemName","TablesName");
store.Reader.Add(reader);
store.DataSource = OrderAdditions.DisplayOrderDetails(int.Parse(id));

this.RemoveFromCache(store.ID);
store.Render();
this.AddToCache(store.ID);

GridPanel grid = new GridPanel
{
ID = "GridPanelRow_" + id,
StoreID = "{raw}StoreRow_" + id,
Height = 200
};
grid.ColumnModel.Columns.AddRange(new Column[] {
new Column
{
ColumnID = "TablesName",
Header = "Tables Name",
DataIndex = "TablesName"
},
new Column
{
Header = "Item",
DataIndex = "ItemName"

},

new Checkboxcolumn
{


},



});

grid.ColumnModel.ID = "GridPanelRowCM_" + id;

grid.View.Add(new Ext.Net.GridView { ID = "GridPanelRowView_" + id, ForceFit = true });

//important
X.Get("row-" + id).SwallowEvent(new string[] { "click", "mousedown", "mouseup", "dblclick" }, true);

this.RemoveFromCache(grid.ID);
grid.Render("row-" + id, RenderMode.RenderTo);
this.AddToCache(grid.ID);
}


How can i create checkbox from server side