Solved

How Do Edit the width of the "Update View"  Gridview on an asp.net 3.5 web page

Posted on 2010-11-08
7
208 Views
Last Modified: 2012-05-10
I want to reduce the width on the cells in an gridview control. I was able to do this for the display template, but once the user clicks on edit , the width is much bigger.
0
Comment
Question by:TonyReba
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 6

Expert Comment

by:jdfulton
ID: 34086144
You should be able to do this via the gridview row editing command in the code behind or in the editing row style in the properties of the control.  It should be no different for the display template.  When you edit the template you should see the edit columns also. However columns that the data values are to large may override your changes.  Can you provide your code?
0
 
LVL 9

Author Comment

by:TonyReba
ID: 34101854
How can I make only a few columns editable??
0
 
LVL 6

Expert Comment

by:jdfulton
ID: 34101886
In the gridview templates view you can change the editable controls (ie text boxes etc... to label controls so they only show the data.  You should also probably change your datasource so it doesn't update the fields also.
0
Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

 
LVL 9

Author Comment

by:TonyReba
ID: 34105411
I just see emptydatatemplate and pagertemplate.
0
 
LVL 6

Expert Comment

by:jdfulton
ID: 34105455
Did you convert your columns to template fields after you setup your datasource?  You can do this by editing the columns in the gridview.  Select the column and then check the convert to template box.  They should then be available.
0
 
LVL 9

Author Comment

by:TonyReba
ID: 34105777
I am using vs 2010 , i re configured the data source but didnt see the convert to template option>?
0
 
LVL 6

Accepted Solution

by:
jdfulton earned 500 total points
ID: 34105853
Ok attached are two screenshots from VS2008.  First you edit the gridview top right of gridview and select Edit Columns.  Second image show the Convert to template.  It is actually a link instead of a checkbox.
gridview1.bmp
gridview2.bmp
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question