I have two Nested repeating Datalists with different data sources.
Currently the second Datalist is set to visible=false
I have an oncommand button on the first, that when selected I would
like to make it's sub datalist visible.
I'm a bit confused about how to refrence the instance of the second
datalist.
Below is the command from the first .
The Master Datalist is called datalista, the Sub is called Datalist1.
Sub View(ByVal sender As Object, ByVal e As
System.Web.UI.W ebControls.Comm andEventArgs)
CType(Datalist1 .FindControl("D atalist1")), DataList).Visib le =
True
End Sub
The above code is giving an error that I'm "not set to an instance of
an object"
e.CommandArgume nt conntains a value which could be used to identify
items inside Datalist1, I'm just wondering, how do I identify the
control itself it it no databound identifiers? and can I even have
specific instances as visible = true ??? 2 2059
try this
datalist2=new datatlist(e.com mand)
datatlist2.visi ble=true;
"jobs" wrote:
I have two Nested repeating Datalists with different data sources.
Currently the second Datalist is set to visible=false
I have an oncommand button on the first, that when selected I would
like to make it's sub datalist visible.
I'm a bit confused about how to refrence the instance of the second
datalist.
Below is the command from the first .
The Master Datalist is called datalista, the Sub is called Datalist1.
Sub View(ByVal sender As Object, ByVal e As
System.Web.UI.W ebControls.Comm andEventArgs)
CType(Datalist1 .FindControl("D atalist1")), DataList).Visib le =
True
End Sub
The above code is giving an error that I'm "not set to an instance of
an object"
e.CommandArgume nt conntains a value which could be used to identify
items inside Datalist1, I'm just wondering, how do I identify the
control itself it it no databound identifiers? and can I even have
specific instances as visible = true ???
I have only tried it with GridViews and DataGrids -- but, you must find and
define it first - then, set it's properties. I haven't tried this, but it
should at least get you going the correct direction.
It should be more like:
Dim sList as DataList
sList = CType(MainDL.Fi ndControl("Data list1")), DataList)
sList.Visible = True
The other thing to look at is 'where' you're trying this - -
are you saying you have a button, that will be clicked to make the one in
that row visible?
David Wier
MVP/ASPInsider http://aspnet101.com http://aspexpress.com
"jobs" <jo**@webdos.co mwrote in message
news:11******** **************@ e3g2000cwe.goog legroups.com...
I have two Nested repeating Datalists with different data sources.
Currently the second Datalist is set to visible=false
I have an oncommand button on the first, that when selected I would
like to make it's sub datalist visible.
I'm a bit confused about how to refrence the instance of the second
datalist.
Below is the command from the first .
The Master Datalist is called datalista, the Sub is called Datalist1.
Sub View(ByVal sender As Object, ByVal e As
System.Web.UI.W ebControls.Comm andEventArgs)
CType(Datalist1 .FindControl("D atalist1")), DataList).Visib le =
True
End Sub
The above code is giving an error that I'm "not set to an instance of
an object"
e.CommandArgume nt conntains a value which could be used to identify
items inside Datalist1, I'm just wondering, how do I identify the
control itself it it no databound identifiers? and can I even have
specific instances as visible = true ??? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: R Reyes |
last post by:
Hi. I'm trying to make some event handlers for buttons that are nested
within datalists, however I keep getting errors trying to access them and a
blank page shows w/o any real error message. How can I access these nested
controls correctly?
For some reason I always have to use a foreach loop to search for a control
within a control. Using FindControl() from the top level does not work and
returns a "reference not set to an instance...
|
by: V. Jenks |
last post by:
What seems like a simple thing is apparently not so
straightforward?
I have a datalist.
Inside of that datalist is an <itemtemplate> secion which
contains other server controls such as a label, a
radiobuttonlist, etc.
I'm driving myself insane trying to figure out how to get
|
by: Greg Fischer |
last post by:
I need to access the properties of a control that is nested in 2 datalists.
How do you use findcontrol method to do that?
what I have is like this:
<asp:datalist id="dlist" runat="server">
<edititemtemplate>
<asp:datalist id="dlistdet" runat="server">
<asp:dropdownlist id="ddlTypes" runat="server"></dropdownlist>
</asp:datalist>
|
by: Marty U. |
last post by:
I have two datalists nested. On the ItemDataBound Event of the first
datalist I databind the second with specific info. A couple questions:
1) How can I utilize the OnItemCommand of the nested datalist(inner) to
retrieve the DataKey value when a user clicks a link button?
2) Is there anything I should be concerned with about ViewState? This is
a reporting tool and no input is accepted.
I have found a couple examples but none pointing...
|
by: D. Shane Fowlkes |
last post by:
Hey guys....I tried Googling and search these forums before posting but
couldn't find really what I was looking for. I'm looking for a very simple
example or tutorial on how to nest Repeaters in VB.NET. It seems everything
that I'm finding is in Csharp or is just incredibly complicated using VB by
decalring a dozen classes and such (too complex for my simple brain).
I already have my two queries written and the HTML structure written...
| |
by: scottls |
last post by:
Hi All,
Thanks for reading my post. I have been working on getting nested
datalists working properly wihtin my framework for many days and I
think I'm almost there. See if you could help me get over the hump
here.
Some of our products come in different sizes - i.e. what I call
"units". Some products don't. I successfully created the first
datalist (called productList) to show our products with their general
|
by: Ole V.-M. |
last post by:
Greetings,
i have a UserControl, that contains a DataList. That DataList contains
as items other DataLists.
example:
DataList A Row 1
Nested DataList 1
Row 1
|
by: sharonrao123 |
last post by:
hello all,
I have a parent gridview company and in this one a nested gridview people, Is it possible to allow the user to select one row or multiple rows from the people gridview using a check box and also get the datakey (in my case personid) of the the rows selected. Please point me in the right direction. This is what i have so far but i have problem accessing the child gridview in the button click event
Cheers, Shilpa.
<asp:GridView...
|
by: John Kotuby |
last post by:
Hi all,
After more than a year programming with ASP.NET 2.0 and VB I am still
finding it difficult to leave some habits from classic ASP behind. this is
particularly true with cross-page posting. My site uses Master pages and
user controls. On an Advanced Search page I have numerous entry boxes and
listboxes (keywords, categories, etc.) which are primarily standard HTML. I
post this page to a different page which lists results and...
|
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...
|
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,...
| |
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...
|
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...
|
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...
|
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();...
|
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...
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |