Archive for April, 2015

Usually Gridview columns don’t wrap when the text content in the Gridview columns overflows the allocated width, it will keep expanding which makes the Gridview looks a bit odd. To resolve this issue we need a custom implementation which will assign word wrap dynamically to GridView columns.

Problem Demo is given below

In my previous article I have explained the way to apply column wrap in GridView BoundField column. In this article I am going to explain how to apply word wrap for GridView’s Template columns.

Implementation:

You need to subscribe to GridView RowDatabound event and then apply the css styles to your respective columns in GridView.

Usually Gridview columns don’t wrap when the text content in the Gridview columns overflows the allocated width, it will keep expanding which makes the Gridview looks a bit odd. To resolve this issue we need a custom implementation which will assign word wrap dynamically to Gridview columns.

Implementation:

In this article I am going to explain how to apply word wrap for GridView’s BoundField columns. To add word wrap in Gridview we can make use of word-break css style property.

You can follow the below steps to assign the css word wrap to your Gridivew.

In this article I am going to explain how to move the focus to next textbox when user types in textbox and the total character count cross the limit of maxlength property.

Prerequisites:

You need to add the necessary JQuery files to your page prior to use this plugin. In this example I have used the online JQuery CDN files available. If you don’t want to use the online available cdn file then you can manually add the jquery files to your solution. I have explained the steps here in detail.

Implementation:

Here we are make use of .attr() method in Jquery to get the maxlength property of textbox at runtime and then checks if the textbox character count crosses the length. Based on this we will move the focus to next textbox.

In this article I am going to explain an easy way to populate dropdownlist in MVC. There are lots of other options to populate dropdownlist in MVC, However here I am going to explain two options which I have come across.

Solution:

Model:

First you need to create a class in the Model. In this example I have used the DatabaseFirst approach.

You can use the below steps to generate the class files

Right click on the Model folder

Select Add option

And then select the New Item option

Select the Net Entity Data Model option and Provide a name for it

In the Entity Data Model Wizard, selectEF Designer from database and click on Next

If you already have connection string configured then you can select that from the available list.

If you don’t have the connection string configured then use the New Connection option and create the connection

elevateXoom is a Jquery plugin which will xoom the image in a detail preview on mouse hover. In this example I will show to how to implement eleavteZoom plugin in Asp.Net.

Prerequisite’s:

You need to add the necessary JQuery files to your page prior to use this plugin. In this example I have used the online JQuery CDN files available. If you don’t want to use the online available cdn file then you can manually add the jquery files to your solution. I have explained the steps here in detail.

Recently I have come across an excellent Jquery Zoom in plugin. In this article I am going to explain details about the same – elevateZoom Plugin.

elevateZoom Plugin :

elevateXoom is a Jquery plugin which will xoom the image in a detail preview on mouse hover. In this example I will show to how to implement eleavteZoom plugin in Asp.Net

Prerequisite’s:

You need to add the necessary JQuery files to your page prior to use this plugin. In this example I have used the online JQuery CDN files available. If you don’t want to use the online available cdn file then you can manually add the jquery files to your solution. I have explained the steps here in detail.