473,770 Members | 6,105 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

User Control Data binding

Hello,
I created two user control,
the first manage an object of mine,
the second is a DataList in which each Item is the first
control...when I click the 'save' button in the first control,
the object is saved with new values, but in the list is displayed the
old value (until I postBack again)

Can someone tell me the right way to manage updates of nested user controls?
Thanks
M.
Oct 24 '06 #1
1 1505

Try this

In inserted event of DataSource of first control, you can call

1. Me.SecondContro l.FindControl(" DataList").Data bind

Shahzad Godil
Karachi-Pakistan
MSN Messenger : sh*********@hot mail.com
"Maury" <ma************ *********@gmail .comwrote in message
news:1N******** ************@tw ister1.libero.i t...
Hello,
I created two user control,
the first manage an object of mine,
the second is a DataList in which each Item is the first
control...when I click the 'save' button in the first control,
the object is saved with new values, but in the list is displayed the
old value (until I postBack again)

Can someone tell me the right way to manage updates of nested user
controls?
Thanks
M.

Oct 24 '06 #2

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

Similar topics

0
1218
by: Simon Barbour | last post by:
Hi all, Tearing my hair out on this one so hopefully somebody can help. I have written a custom control to represent a button on a touchscreen EPoS (electronic point of sale) peice of hardware. As part of my control I have a property declared like so: private byte posForeColor; /// <summary>
0
1936
by: Zi | last post by:
I have a user control within a data grid. I am binding the user control to one of the values from the data grid. The data grid implements paging. It is all working ok for the first page but once i page to the second page of the datagrid, the user contorl stops working correctly (displaying the correct data). I have attached the code that is envolved. Thanks a lot
0
1274
by: MeiMei | last post by:
Hi, I have designed a user control which exposes properties for data binding in the containing web page, and I want to use the Repeater web control in the containing web page to display all the data in the format of the user control mentioned above because the data might need many of the user control I designed to show to user. How can I do that?
1
7587
by: Shourie | last post by:
I've noticed that none of the child controls events are firing for the first time from the dynamic user control. Here is the event cycle. 1) MainPage_load 2) User control1_Load user clicks a dropdown in UC1 _________________________ 1) MainPage_Load 2) User Control_1 Load
3
1389
by: Sam Kuehn | last post by:
I have been stuck on this for some time and am desperate for a solution. I run into this all of the time! I will give a over simplified example to illustrate the problem. Say you have 2 user controls on a web form. One for inputing data (like a line item to an order) and one to display the detail data (a data grid with all line items the order). So, you input data into the input form, then click the add button. The from in posted back. ...
0
1197
by: AMDRIT | last post by:
Hello everyone, VB2003-Winforms I have a class object (testclass), that I would like to bind parts of to two custom controls (control1 and control2). The testclass is stored in a hash table for the life of the client session. Upon first run (Creation of testclass), the bindings work fine and everyone is happy. However, if I were to open the testclass again, and bind to my controls again, the underlying controls (i.e. textboxes)...
11
11577
by: John J. Hughes II | last post by:
I have a DataGridView displaying data from a DataSet. To the right of that I have a custom user control which displays one of the data set fields. The custom user control is bound to the data set object and displays the data correctly when I move from row to row. The problem I am having is the data set always reads the data back and considers it change even when it's not. I am looking for how to change the following code so the...
0
2417
by: John Smith | last post by:
ASP.Net 2.0 / C# / IIS 6 I have 2 pages. The master page consists of a tabbed menu created using the Menu and MultiView controls. Something like this: http://fredrik.nsquared2.com/viewpost.aspx?PostID=344&showfeedback=true The second page is a user control that contains a GridView control linked to a database table. What's supposed to happen is that the user clicks on a menu choice and an appropriate user control will load. For...
2
1537
by: John Sheppard | last post by:
Hello there, I have a dataset on a form...I shall call the host form. I also have a user control with a whole bunch of textboxes and gridviewcontrols on it. I shall call this the leech form. I want the controls on the leech form to get bound to a dataset and/or binding sources that reside on the host form. At the moment I just pass in the dataset by reference to the user control
0
1061
by: lmeyers | last post by:
On parent page user selects template from drop list. Based upon selected template multiple user controls are dynamically populated beneath. Each user control will contain different data elements. The data from each of the user controls is to be saved within row of sql table ((i.e. ID int, TemplateID int, UserData nText). Because data for each control is variable, I expect that I will need to concatenate serialized data from each user control and...
0
9592
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
9425
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
10231
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
10059
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
10005
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
9871
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
5452
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3972
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
3
2817
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.