473,729 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What does sender.Parent.P arent.Cells() reference? Frustrating...

Roy
Ok, this is incredibly annoying. Below I have an ImageButton and it's
ImageButton_Cli ck sub. See the 6 response.writes ? The output for them
is displayed below in asterisks. Question: What part of the
TemplateColumn below does sender.parent.p arent.Cells(9) reference???
IOW, what tag does it reference? The templatecolumn is the 9th field in
the datagrid yet no matter what I do, whatever
"sender.parent. parent.Cells(9) " is referencing, I do not have access
to. Help!

*System.Web.UI. WebControls.Tab leCell*
*blank, nothing displayed*
*System.Web.UI. WebControls.Dat aGridItem*
*blank, nothing displayed*
*System.Web.UI. WebControls.Tab leCell*
*blank, nothing displayed*
Public Sub ImageButton_Cli ck(sender As Object, e As
ImageClickEvent Args)
response.write( sender.parent)
response.write( sender.parent.i d)
response.write( sender.parent.p arent)
response.write( sender.parent.p arent.id)
response.write( sender.parent.p arent.Cells(9))
response.write( sender.parent.p arent.Cells(9). id) <<<<---REFERENCE?
End Sub

**********0th Column in datagrid*****
<asp:TemplateCo lumn><ItemTempl ate>
<asp:ImageButto n id="imagebutton 1" runat="server" AlternateText=" Click
to Expand Record"
ImageAlign="lef t" ImageUrl="arrow _right.gif"
OnClick="ImageB utton_Click"/>
</ItemTemplate></asp:TemplateCol umn>

*********9th column in datagrid******
<asp:TemplateCo lumn><ItemTempl ate>
<tr id="tr"><td colspan="9" id="td">
<UC_Grid:Nest ed id="FVDGrid" x=<%# container.datai tem("vown")%> y=<%#
container.datai tem("van_no")%> runat="server" />
</td></tr>
</ItemTemplate></asp:TemplateCol umn>

Nov 19 '05 #1
2 2193
It references the TableCell that will contain the controls for the
template.

Are you trying to locate a specific, named control like the nested
grid? If so, I believe FindControl a bit less painful.

See:
http://odetocode.com/Articles/116.aspx

--
Scott
http://www.OdeToCode.com/blogs/scott/

On 11 Feb 2005 11:24:18 -0800, "Roy" <ro**********@g mail.com> wrote:
Ok, this is incredibly annoying. Below I have an ImageButton and it's
ImageButton_Cl ick sub. See the 6 response.writes ? The output for them
is displayed below in asterisks. Question: What part of the
TemplateColu mn below does sender.parent.p arent.Cells(9) reference???
IOW, what tag does it reference? The templatecolumn is the 9th field in
the datagrid yet no matter what I do, whatever
"sender.parent .parent.Cells(9 )" is referencing, I do not have access
to. Help!

*System.Web.UI .WebControls.Ta bleCell*
*blank, nothing displayed*
*System.Web.UI .WebControls.Da taGridItem*
*blank, nothing displayed*
*System.Web.UI .WebControls.Ta bleCell*
*blank, nothing displayed*
Public Sub ImageButton_Cli ck(sender As Object, e As
ImageClickEven tArgs)
response.write (sender.parent)
response.write (sender.parent. id)
response.write (sender.parent. parent)
response.write (sender.parent. parent.id)
response.write (sender.parent. parent.Cells(9) )
response.write (sender.parent. parent.Cells(9) .id) <<<<---REFERENCE?
End Sub

**********0t h Column in datagrid*****
<asp:TemplateC olumn><ItemTemp late>
<asp:ImageButt on id="imagebutton 1" runat="server" AlternateText=" Click
to Expand Record"
ImageAlign="le ft" ImageUrl="arrow _right.gif"
OnClick="Image Button_Click"/>
</ItemTemplate></asp:TemplateCol umn>

*********9th column in datagrid******
<asp:TemplateC olumn><ItemTemp late>
<tr id="tr"><td colspan="9" id="td">
<UC_Grid:Neste d id="FVDGrid" x=<%# container.datai tem("vown")%> y=<%#
container.data item("van_no")% > runat="server" />
</td></tr>
</ItemTemplate></asp:TemplateCol umn>


Nov 19 '05 #2
Roy
Sorta... I'm trying to make the 9th column visible/invisible when
someone clicks the imagebutton. I've been trying to get FindControl to
work for a day (see link). It doesn't. I give up. I'm quitting
programming and becoming a sheepherder.
http://groups-beta.google.com/group/...ea1978756f3f6e

Nov 19 '05 #3

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

Similar topics

0
6811
by: Ravi Tallury | last post by:
Hi We are having issues with our application, certain portions of it stop responding while the rest of the application is fine. I am attaching the Java Core dump. If someone can let me know what the issue is. Thanks Ravi
2
4744
by: Jacek Dziedzic | last post by:
Hi! Say a have a class called black_box which, among other things, contains an array of cells like this: class black_box { private: // ... public: black_box_details_struct details;
3
11877
by: David N | last post by:
Hi All, I just wonder if in C#, I can develop a user defined control that can call its parent function which is not yet developed. For example, how do I make my user control call a to-be-developed-function cmdOkay_Click() function as described below. 1. Create an user control that contains an OK button as below Public Class MyButton:System.Windows.Form.UserControl
7
1852
by: David Laub | last post by:
I have stumbled across various Netscape issues, none of which appear to be solvable by tweaking the clientTarget or targetSchema properties. At this point, I'm not even interested in "solving" these problems - I'm more interested in isolating them, .i.e. finding a "complete" list of issues. Here's my list of serious issues found so far. By serious, I mean functionality that fails, as opposed to much less serious (albeit annoying) display...
19
2896
by: Charles Law | last post by:
Take a solution with a project hierarchy along the lines of an n-tier system, so that we have a data layer, business layer and presentation layer. The presentation layer is coupled to the business layer, and the business layer is coupled to the data layer. So far so good. Suppose the data layer raises an event, and it passes Me (the sender) as an object, and e (MyEventArgs, a descendent of EventArgs) to the layer above (the business...
8
2246
by: Connectcase | last post by:
Hi there, and greetings from the Netherlands. Trying to switch over from VB to VB.NET and struggling with something that seemed very simple: ============================ Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
1
1785
by: Pierre | last post by:
Hi everyone; I have a class with several members and I pin the first reference field in a function; public ref struct MyClass { String str1; List<MySubClass ^^subObjects; ....
1
2184
by: Iain | last post by:
I have the following .net page with a pushbutton in a datagrid. This pushbutton should delete the selected record. It works in the same manner in many other pages of the same format (I actually copied and pasted most of this code from another form). Can anyone enlighten me please as to why this happens randomly and how to evercome it as It is driving me nuts. Thanks in advance for any assistance offered
0
1934
by: pargat.singh | last post by:
Hi Everyone: I have a gridview control with AllowSorting="True" and work ok. But my page will be used by different user from different region so i need to change the HeaderText based on language like english or french etc.When i updat ethe header on GridView1_RowCreated sorting does not work anymore. Below are my code. Is this because of BoundField. Can someone please help me with this issue. Thanks in advance. <asp:GridView...
0
9426
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
9200
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
9142
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
8148
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6022
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
4525
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...
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2680
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2163
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.