473,383 Members | 1,963 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

getting data binding parameters from another WebControl

I have two SqlDataSources that use two different stored procedures that
take parameters to populate two controls, one dependant on an element
of the other.

The first data source, PreBuyDataSource is bound to PreBuyDetailsView
control and its parameters come from the session or request. The
stored procedure will always only find one row, and I found the
DetailsView control to be convenient.

The second data source, BudgetDataSource is bound to BudgetDetailsView
control and one of the parameters is an element in the data present in
the PreBuyDetailsView. Likewise, the stroed procedure will always only
find one row, and I found the DetailsView control to be convenient.

Specifically, the element that BudgetDataSource depends on is

PreBuyDetailsView.DataItem.Item("PRBCODE")

....or in English, the column named PRBCODE (column index 3) that gets
returned from the stored procedure.

When I click on the SelectQuery to bring up the dialog for
BudgetDataSource's stored procedure, I have my parameters, one of which
needs to come from PRBCODE. I set my Parameter Source to "control." I
set my control ID to PreBuyDetailsView. Under the advanced properties,
the property name defaults to SelectedValue, which appears blank to me.
I tried to set it to DataItem.Item("PRBCODE"), but when I do that I
get an error: 'System.Data.DataRowView' does not contain a property
with the name 'Item'.

System.Data.DataRowView DOES contain a public property named Item since
I can access it directly for instance by setting a labels text value to
PreBuyDetailsView.DataItem.Item("PRBCODE"). However, my grasp of when
and where the databinding takes place for multiple controls is
admittedly weak.

I cannot figure out how to get the data binding on my BudgetDetailsView
to use that value from PreBuyDetailsView. I am new to ASP.NET and hope
I am either going about this in entirely the wrong way, or missing some
key bit of insight. Either way, can anyone tell me how I can set that
value as a parameter for my second data source?

Dec 5 '06 #1
0 1377

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

Similar topics

16
by: D Witherspoon | last post by:
I am developing a Windows Forms application in VB.NET that will use .NET remoting to access the data tier classes. A very simple way I have come up with is by creating typed (.xsd) datasets. For...
13
by: dawatson833 | last post by:
I have several stored procedures with parameters that are defined with user defined data types. The time it takes to run the procedures can take 10 - 50 seconds depending on the procedure. If I...
3
by: Joe Bloggs | last post by:
Does anyone know if its possible to pass parameters or the values of Request.QueryString from a web page to a custom control class? I'm using a C# Web Application. For Example I have Web Page1...
5
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1);...
0
by: NicK chlam via DotNetMonster.com | last post by:
this is the error i get System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. at System.Data.Common.DbDataAdapter.Update(DataRow dataRows, DataTableMapping tableMapping) at...
5
by: Laura K | last post by:
I am having difficulty binding data to my datalist. The data list does not show. I have gone round and round for two days. I could really use some help looking through this code and seeing where...
0
by: mancha28 | last post by:
Hi, I have create Word object by late binding to open a Word document and save it under another name. This new saved document should be saved as mht-file. Following code I impelemented: ...
0
by: Steven Bolard | last post by:
Hello, I am trying to port my .net 1.1 application to 2.0. I am using vs2005. I am trying to get my webservices to run and although i can compile them and and get wsdl and service descriptions...
2
by: preeti13 | last post by:
Hi guys i am here with my another probelm please help me.trying insert the value into the data base but getting the null value error .I am getting thsi error Cannot insert the value NULL into...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.