In software development, we always need to be worked with ASP.NET grid (GridView). It may be possible that below scenario happens.
To make consistent row height, which are messed up because of the columns data which are not able to reside for the configured column width. So height of the row is increased.
There are 2 possible ways to remove above scenario, which are described
below.
There are 2 possible ways to remove above scenario, which are described
below.
Solution 1:
Get the trimmed data from database and bind it in GridView. This solution is not explored in this mail.
Solution 2:
Use the power of JQuery without any server side manipulation. Please refer below image and javascript.
Fig 1. GridView Column
Fig 2: Resultant output
3: JQuery solution
Developer Guide:
1. Just add above function "GridManipuation" in your page.
2. Apply class "col-limit" to columns whose chars need to be trimmed.
3. Syntax: GridManipulation(grid,limit)
grid: jquery grid object
limit: chars are displayed in the column
2. Apply class "col-limit" to columns whose chars need to be trimmed.
3. Syntax: GridManipulation(grid,limit)
grid: jquery grid object
limit: chars are displayed in the column
On particular event, find the grid object using jquery("ready" event in above example).
and call the function on that event.
Pros:
1.Grid looks consistent.
Cons:
1.To read full column detail, user needs to hover particular column of the row. Because full detail are written.
NOTE:
1. Do not use above
solution where more information is actually
required. In some grid, client wants more information like Customer’s
Full Address in single column.
2. Generally, this solution is useful to display logs.
solution where more information is actually
required. In some grid, client wants more information like Customer’s
Full Address in single column.
2. Generally, this solution is useful to display logs.



