Monthly Archives: April 2014

How to use jQuery and Footable to make GridView responsive

Nowadays make a website compatible with desktop platforms and mobile is a must.
Making a responsive design is important to adapt the content of your website to the platform where it will be viewed.
To render the GridView control responsive we procdeed to hide some columns with Footable and jQuery plugins.
In order to do that, download Footable plugin
Now in your aspx page add the follow code:

Add a GridView control, this is the ASP.NET code for that:

Initialize footable plugin to the GridView control

Populate the GridView with data

The default header row for GridView is now generated, now we need to make it accessible

So we can proceed to define which colums will be hided in which devices

You can teel to Footable which columns to hide on which breakpoints, by specifying data-hide attributes on the table head columns

Microsoft SQL LocalDB

LocalDB was introduced in SQL Server 2012 CTP3. It’s basically a new version of SQL Express, with same functionality, dedicated to developers. So you don’t need to install any SQL server. If you have installed SQL 2012 or Visual Studio 11 then you already have it, and it runs over .Net 4 or higher. If you are using Visual Studio 11 and have been playing with the new EntityFramework and MVC, you can see it on the default connection string.
When you start a debug session the LocalDB starts on a different process with a clean instance of SQL. When you stop the debug session, it stops. And this is quite fun sinceyou get a full local dedicated database per debug session started and stopes by VS. The LocalDB also support Database as a file during the connection process letting the developers work on local MDF/LDF file.
  1. LocalDB uses the same sqlservr.exe as the regular SQL Express and other editions of SQL Server. The application is using the same client-side providers (ADO.NET, ODBC, PDO and others) to connect to it and operates on data using the same T-SQL language as provided by SQL Express.
  2. LocalDB is installed once on a machine (per major SQL Server version). Multiple applications can start multiple LocalDB processes, but they are all started from the same sqlservr.exe executable file from the same disk location.
  3. LocalDB doesn’t create any database services; LocalDB processes are started and stopped automatically when needed. The application is just connecting to “Data Source=(localdb)v11.0″ and LocalDB process is started as a child process of the application. A few minutes after the last connection to this process is closed the process shuts down.
  4. LocalDB connections support AttachDbFileName property, which allows developers to specify a database file location. LocalDB will attach the specified database file and the connection will be made to it.
If you have an instance of SQL Server 2008 or Visual Studio 2010 than you cannot connect to this database. You can only connect using SQL 2012 or VS 11

You can download LocalDB from this page. And as I mentioned above – get the full functionality of SQL Express (Linq, XML, ADO .Net, Spatial Types, SP, T-SQL). It will only work with local connections, does not run on mobile devices and the DB size is limited to 10GB (1 CPU).