Apr 25, 2017, 1:44 PM
[CLOSED] Dynamic and static data in Store
I add static data to the store:
List<object> data = new List<object>() {
new { name="", grouptype="Normal Types", fieldtype="SimpleText", tooltip="", icon="../Images/buttons/01_simpletext.svg" },
new { name="", grouptype="Normal Types", fieldtype="LongText", tooltip="", icon="../Images/buttons/02_textlong.svg" },
new { name="", grouptype="Normal Types", fieldtype="Numeric", tooltip="", icon="../Images/buttons/03_numeric.svg" }
};
LabDatatoStore();
this.StoreControlTypes.DataSource = data;
this.StoreControlTypes.DataBind();
and I am calling LabDatatoStore() to add also some dynamic data from the database: protected void LabDatatoStore()
{
DAL.DataContext dc = new DAL.DataContext();
var data = from i in dc.Tests
where i.id != "HEIGHT" && i.id != "WEIGHT"
select new { fieldtype = i.id, grouptype = "Data Types", tooltip = i.Name, icon = "../Images/test.png" };
this.StoreControlTypes.DataSource = data;
this.StoreControlTypes.DataBind();
}
But I get only the static data. How I can get both ones?
Last edited by fabricio.murta; Apr 26, 2017 at 4:40 PM.