473,387 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

TemplateColumn of DataGrid

I have a Datagrid with several TemplateColumns. I am creating ALL (BoundColumn & TemplateColumn) of the columns for the DataGrid during the PAGE_INIT. One TemplateColumn is a checkbox that allows the user to select the row/datagriditem to carry forward in a wizard. The other TemplateColumns contain a System.Web.UI.WebControls.Image. In the ITEMCREATED event for the datagrid, I toggle the ImageURL property for each Image based on certain parameters. My problem is getting the property changes I make to each Image to carry forward on subsequent postbacks. Initially I had the problem with the checkbox until I realized I was naming it in my ItemCreated event. On postbacks after the ITEMCREATED event if fired, the Images default back to the properties I assigned to them when they were created

Is there a limitation on what is kept in the Viewstate for a System.Web.UI.WebControls.Image? Perhaps someone knows of a classic pitfall that would keep this from happening? Is there a better event in which to create the columns for my datagrid other than the PAGE_INIT

Thanks in advanc

Nov 18 '05 #1
1 1125
A good link for DataGrids:
http://www.datagridgirl.com

"Steve R" <bo********@nowhere.com> wrote in message
news:38**********************************@microsof t.com...
Anyone?

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Kilic Beg via .NET 247 | last post by:
Hi, I am having trouble adding a dropdown to DataGrid at runtime. I create all boundColumns and the TemplateColumn for the dropdown at runtime. The dropdown has a different datasource then the...
0
by: Steve R | last post by:
I have a Datagrid with several TemplateColumns. I am creating ALL (BoundColumn & TemplateColumn) of the columns for the DataGrid during the PAGE_INIT. One TemplateColumn is a checkbox that allows...
1
by: Dave | last post by:
Hello. Can anybody explain me how to use TemplateColumn?
4
by: Carlo Marchesoni | last post by:
I have an editable Datagrid and some columns (4 and 5) are TemplateColumns (because I have DropDownLists there). Everything works fine except that if I want to retrieve the values (that I can see...
2
by: Ricardo | last post by:
Hi, How can I insert a TemplateColumn on a Datagrid on the fly? Basically I'm after how to create a TemplateColumn, add a button and a label to its control list and add the TemplateColumn to...
0
by: Gujju | last post by:
Hi all, Have a question from the following post to create user control in a Datagrid.... http://www.dotnet247.com/247reference/msgs/45/225337.aspx I have a question.... I can create the...
0
by: Vagabond Software | last post by:
I am fairly new to ASP.NET, so bear with me... I have a Datagrid with a data-bound DropDownList in the TemplateColumn. Here is the HTML code: <asp:TemplateColumn HeaderText="Void"> <ItemStyle...
2
by: MrCrool | last post by:
Hi I need to be able to handle the following ASP programming in pure C# code: <asp:TemplateColumn HeaderText="Customer Information"> <ItemTemplate> <table border="0"> <tr> <td...
3
by: rn5a | last post by:
A DataGrid has the following TemplateColumn: <asp:DataGrid ID="dgCart"...OnSortCommand="SortGrid" AllowSorting="true"....> <Column> <asp:TemplateColumn HeaderImageUrl="Images\Up.gif"...
2
by: =?Utf-8?B?RXVnZW5l?= | last post by:
Hi, I use a datagrid with asp:templatecolumn, and handles the datagrid's ItemDataBound event, whereby I assign a value to this asp:templatecolumn text. e.Item.Cells.Text = e.Item.Cells.Text +...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.