473,770 Members | 5,284 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataGrid disappears in ASCX control

I am accustomed to displaying datagrids in ASPX pages with data in textboxes
inside template items. Normally I have an Update button on the form. In
the click event of that button I spin through the datagrid comparing the
values in the editable textboxes with the original values to determine what
needs updating.

I have done this dozens of times and it always works great.

BUT, now I'm doing that same thing in an ASCX control. I have a datagrid
with template columns and an update button. In the click event of that
button NOTHING IS IN THE DATAGRID !! dg.items = 0.

Anyone know what is wrong and if it can be fixed?

Thanks,
T
Nov 19 '05 #1
2 1226
Please post your code, and I'll have a look.

Landers

"Tina" <ti**********@n ospammeexcite.c om> wrote in message
news:ei******** ******@TK2MSFTN GP09.phx.gbl...
I am accustomed to displaying datagrids in ASPX pages with data in textboxes inside template items. Normally I have an Update button on the form. In
the click event of that button I spin through the datagrid comparing the
values in the editable textboxes with the original values to determine what needs updating.

I have done this dozens of times and it always works great.

BUT, now I'm doing that same thing in an ASCX control. I have a datagrid
with template columns and an update button. In the click event of that
button NOTHING IS IN THE DATAGRID !! dg.items = 0.

Anyone know what is wrong and if it can be fixed?

Thanks,
T

Nov 19 '05 #2
ae
without the code here. could it be a findcontrol issue?

Pls. see: http://odetocode.com/Articles/116.aspx
"Landley" wrote:
Please post your code, and I'll have a look.

Landers

"Tina" <ti**********@n ospammeexcite.c om> wrote in message
news:ei******** ******@TK2MSFTN GP09.phx.gbl...
I am accustomed to displaying datagrids in ASPX pages with data in

textboxes
inside template items. Normally I have an Update button on the form. In
the click event of that button I spin through the datagrid comparing the
values in the editable textboxes with the original values to determine

what
needs updating.

I have done this dozens of times and it always works great.

BUT, now I'm doing that same thing in an ASCX control. I have a datagrid
with template columns and an update button. In the click event of that
button NOTHING IS IN THE DATAGRID !! dg.items = 0.

Anyone know what is wrong and if it can be fixed?

Thanks,
T


Nov 19 '05 #3

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

Similar topics

3
448
by: Jim | last post by:
I have derived of DataGrid to give functionality of an expandable dataGrid (similar to article in October2003 MSDN). I have override the LoadStateView and SaveStateView to save the extra properties I have added to the derived class. It works perfectly fine at expanding and collapse the row that was clicked on, it displays a web user control (*.ascx) correctly. When the refresh button is pressed(F5) it refreshes correctly with the...
0
1305
by: mortb | last post by:
My problem is with a XML file that resides on my windows 2003 web server. I have this user control which I include on every page in my applicaiton. The control makes it possible for the users to leave feedback when using the page. The feedback is written to a XML file which I have put in a folder "C:/Save/". I've set the access rights on this folder so that the "IUSR_MachineName" has full rights on this folder and it's children. The...
1
2126
by: thegame | last post by:
Filling One DataGrid Based on Selection from Another DataGrid - Both in Separate User Controls Hello, I have an interesting dilemma. I have an ASPX page with two user controls (two ASCXs). Both ASCXs have DataGrids on them. The first user control's DataGrid is populated from our database on page load. The DataGrid also has a Select LinkButton.
2
1639
by: Joanne | last post by:
Hi, I have an "interesting" problem with UserControls in a datagrid and I'm desperate for your help as I work alone and have no-one else to ask. It is quite complicated but I'll try to keep it to a simple example ... FormQuestionAnswer.ascx ----------------------- I have a user Control that displays a question (from a questionnaire) and its answer (as previously selected by a user). The question has a
2
3375
by: Deepesh | last post by:
Good day, I have a specific case of the DataGrid in my solution which is causing the ItemCommand Event Not Firing. So I'm creating a "Skinnable" set of controls. I seperate the actual ASCX file and .CS file. When I initialize my .CS file, in that code there is a method that goes: Page.LoadControl(FILENAME) Which associates a .ascx file with my .CS file, allowing me to plug in any
12
1864
by: TB | last post by:
Hi All: I am trying to create a variation on the standard datagrid, whereby the datagrid is only shown after pressing some buttons. This reason for this is that I would like to use the same datagrid for several tables, and the idea is that the button events store the the SQL select statement and the SQL update statement in view state items, which can the be reused for all the datagrid events (paging and editing). However I seem to...
6
3345
by: Scott McDaniel | last post by:
I'm using Visual Studio 2005 with the .NET 2.0.50727 framework, and we're using the standard Datagrid control bound to a SQL Server. We have two groups of users - "full edit" users, and "view only" users. We would like to disable the EditCommandColumn of our Datagrid (named dgCertificates) for viewonly users. The intent is that viewonly would, obviously, only be able to view data and not maniupulate it in any way. I've tried the...
0
2912
by: cindy | last post by:
I have a dynamic datagrid. I have custom classes for the controls public class CreateEditItemTemplateDDL : ITemplate { DataTable dtBind; string strddlName; string strSelectedID; string strDataValueField; string strDataTextField; public CreateEditItemTemplateDDL(string DDLName,string DataValueField,string
1
2789
by: Sami Rehman | last post by:
Hi, I am creating some web user controls dynamically Using LoadControl("ABC.ascx") My user control contains 2 drop down list, 2nd one is loaded based on the selection in the 1st one. However whenever I make the selection in the 1st one, the control disappears after the post back. I tried setting the EnableViewState=true but even that did not help.. UCTemp ucTemp = (UCTemp)LoadControl("UCTemp.ascx");
0
9591
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
10225
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...
1
10001
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
9867
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...
1
7415
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6676
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3573
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.