Hi,
With Insert, Update and Delete methods but without a Select method, LinqDataSource control looks just like a chair with only three legs! Such a powerful and flexible control is used to get connected to a DataBound control like GridView, while it could excel in many scenarios if it had a Select method! For example, it [...]
Posts Tagged ‘name’
Sorting and ordering Linq results with string field names
Posted in ASP.NET, C#, tagged Field, IEnumerable, IQueryable, Linq, LinqDataSource, name, Order, Sort, SortExpression, String on September 10, 2008 | 4 Comments »
Hi,
Today at work, I had to bind a GridView control to a stored procedure through a LinqDataSource. To do this, I used LinqDataSource’s Selecting event. For example :
protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)
{ e.Result = CustomersBiz.GetAll(); }
If we bind a grid to a store procedure, the grid and LinqDataSource won’t support sorting automatically. Therefore, to [...]