You are here:

C#/C#.net datagridview

Advertisement


Question
Hi,I am using datagridview in c#.net.I have kept the fixed column width.I want to adjust the row height to fit the contents in every column for that particular row whenever user clicks on any cell.So that user can view the whole contents of that row on the screen.If we set autosizerow mode it does not solve my problem.But if we set autosizecolumn mode then it adjusts the column width to fit the contents.but i want fixed width of column and row height should be increased so that user need not scroll horizontally.vertical scrolling can be done.

Answer
hi

if you use fixed column width, you have to make sure give enough space to each column and total grid width.. if any calculations goes over the defined size it will add the scrolling..

first calculate how much width you need and split the width to each column based on the requirement.  

-srini

C#

All Answers


Answers by Expert:


Ask Experts

Volunteer


Srini Nagarajan

Expertise

can answer any kind of questions in ASP.NET, C#, VB.NET, ASP, SharePoint 2007, Coldfusion, Powerbuilder 7.00 / 8.00, JAVA servlets, MS SQL 2000 / MSSQL7, Sybase

Experience

Contact me if you need any custom development on ASP.NET, ASP, Coldfusion, Powerbuilder

©2012 About.com, a part of The New York Times Company. All rights reserved.