Do you have any way to bind a sql to Ig grid?
Hello spark_li,
Can you please clarify the scenario that you are trying to implement?
At this moment the best and only way is to point the DataSource to an instance of an IQueryable object
http://help.infragistics.com/Help/NetAdvantage/jQuery/2012.1/CLR4.0/html/igGrid_Developing_ASP_NET_MVC_Applications_with_igGrid.html
Hope hearing from you.
I know ig grid needs a IQueryable object.
I know you apend the paging function in GridDataSourceAction aginst Linq.
GridDataSourceAction aginst Linq.
My question is that I only have some sql now. How can I convert these SQL to an IQueryable object, and I don't want to lost the delay query feature.
For example. I have "Select * from Issues''. Issues table has a lot of rows, So I need the paging feature.
following is the code I want:
[GridDataSourceAction] [ActionName("PagingGetData")] public ActionResult PagingGetData() { var ds= ConverSqlToQuerable(" I have "Select * from Issues'"); //Here, I don't want query data from DB. //I have a lot of Rows in DB. So I need deley DB query // until GridDataSourceAction appends the // paging filter at the tail of my sql. return View("RowSelection", ds); }
[GridDataSourceAction] [ActionName("PagingGetData")] public ActionResult PagingGetData() { var ds= ConverSqlToQuerable("
"PagingGetData"
public
var
"); //Here, I don't want query data from DB. //I have a lot of Rows in DB. So I need deley DB query // until
GridDataSourceAction
appends the // paging filter at the tail of my sql. return View("RowSelection", ds); }
return
"RowSelection"
My question looks like an Linq question more. But I'm hoping get some suggestion from your guys.
Thank you!.