473,662 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Image TemplateColumn DataGrid Viewstate

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.W ebControls.Imag e. 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.W ebControls.Imag e? 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 advance
Nov 18 '05 #1
0 993

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

Similar topics

1
2258
by: Jim Hammond | last post by:
The code below implements two datagrid columns that display images. The first column is just a test that always displays the same image directly from a file. The second column pulls the image from the dataset. The datagrid contains several additional columns that are not seen here because they are automatically generated and bound to the dataset. All columns work except the second image column, which attempts to bind to the dataset. When...
1
2497
by: John Thompson | last post by:
We're sooo close. When we load the page to upload the image, all of the prms go through except the binary image data. Using SQL server with the data type set to "image". Please help! Thanks- John
2
2693
by: J Sahoo | last post by:
Hi, I have a browse page where I am showing few fields from my SQL Server table. One of the field is Image type, all the fields are bound to a single table. I want to show the image from the table on this browse along with the other fields. Here is the code what I have from the HTML view, I am using a datagrid to show the result. It does not show the image rather it shows "System.Byte " on the output. I did not have any code behind...
3
2502
by: Rob Rogers | last post by:
I have an ASP.NET datagrid that loads an image. I would like to load one image if the value in my SQL table is true and another if it is false. Here is my code. <%@ Page Language="vb" AutoEventWireup="false" Codebehind="Search.aspx.vb" Inherits="PROJECT.WebForm1"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <title>WebForm1</title>
4
6941
by: rkbnair | last post by:
Is there any way to display an image button instead of the traditional Edit/Update/Cancel push button in a datagrid (with bound data)?
1
2213
by: ltt19 | last post by:
Hi everyone! I want to do da Image gallery using just the datagrid, this one will dilpays only images, no text, that means that it will have about 4 Collumns that will displays just images from the same database table, from the same collumn of the table. However I could not reproduce this, since each Row (with 4 collumns) displays 4 times the same image. How can i fix it? here is a part of the code:
1
1290
by: Shapper | last post by:
Hello, How to create a Template Column with an Image in a datagrid from my VB code? Thanks, Miguel
0
1228
by: Tim::.. | last post by:
Please, please, please help!!! I have a datagrid that displays a list of contacts on our intranet site using the ActiveDirectory as it's main Data Source. I want to be able to show an image of each employee using a popup layer but am not sure how I match the Active Directory Data to the correct image stored in an SQL database. I plan on using the users fullname or email address as an identifier to match up the image with the correct...
2
3279
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 + e.Item.Cells.Text; /* column index 2 and 3 are boundcolumn */ The issue that I have is that the column header (index 1) would be blank after it.
0
8432
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8343
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8856
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8762
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8545
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1992
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.