Solved

Gridview Format Lost During Edit Mode and Cancel?

Posted on 2012-03-23
3
370 Views
Last Modified: 2012-03-28
This code works well to format the Gridview until I click Edit, thus placing the grid in edit-mode.

http://aspalliance.com/1268_CodeSnip_How_to_Group_Data_in_the_GridView_Control.all

Q. How can I keep the gridview formatting in Edit-Mode or Cancel-mode?
0
Comment
Question by:pointeman
  • 2
3 Comments
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 500 total points
ID: 37759091
By default, the formatting string is applied to the field value only when the data-bound control that contains the BoundField object is in read-only mode. To apply the formatting string to field values while in edit mode, set the ApplyFormatInEditMode property to true.

From : http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.boundfield.dataformatstring%28VS.85%29.aspx
0
 

Author Comment

by:pointeman
ID: 37759119
I'm using a TemplateField
0
 

Author Closing Comment

by:pointeman
ID: 37776412
thx
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

839 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