public ActionResult Index() { // Get an instance of the QueryBuilder object var qb = QueryBuilderStore.GetOrCreate(instanceId, InitializeQueryBuilder); var qt = QueryTransformerStore.GetOrCreate(instanceId, q => { q.QueryProvider = qb.SQLQuery; q.AlwaysExpandColumnsInQuery = true; }); ViewBag.QueryTransformer = qt; return(View(qb)); }
protected void Page_Load(object sender, EventArgs e) { // Get an instance of the QueryBuilder object var qb = QueryBuilderStore.GetOrCreate(InstanceId, InitializeQueryBuilder); var qt = QueryTransformerStore.GetOrCreate(InstanceId, q => { q.QueryProvider = qb.SQLQuery; q.AlwaysExpandColumnsInQuery = true; }); QueryBuilderControl1.QueryBuilder = qb; ObjectTreeView1.QueryBuilder = qb; Canvas1.QueryBuilder = qb; Grid1.QueryBuilder = qb; SubQueryNavigationBar1.QueryBuilder = qb; SqlEditor1.QueryBuilder = qb; StatusBar1.QueryBuilder = qb; CriteriaBuilder1.QueryTransformer = qt; }