cancel
Showing results for 
Search instead for 
Did you mean: 

Two SAP Netweaver Table Controls on one IView

Former Member
0 Kudos

Has anyone had any problems with this? This goes back partially to my Master/Detail question...

I have an IView containing 2 Table Controls. One contains the contents of "SELECT * FROM Table1". The second contains the contents of "SELECT * FROM Table2 WHERE ID = @idFromTable1".

Here's some code that "links" these two tables together...

private void Page_Load(object sender, System.EventArgs e)
{
	sqlDataAdapter1.Fill(dataSet11);
	Table1.DataBind();
}
private void Table1_LeadSelect(object sender, SAP.Web.UI.Controls.Table.LeadSelectEventArgs e)
{
	int rowNum = e.Row;
	string JobID = dataSet11.Tables[0].Rows[rowNum]["JobID"].ToString();
	PopulateErrors(JobID);
}
private void PopulateErrors(string JobID)
{
	int id = int.Parse(JobID);
	sqlDataAdapter2.SelectCommand.Parameters["@JobID"].Value = id;
	sqlDataAdapter2.Fill(dataSet21);
	Table2.DataBind();
}

Pretty straightforward behavior here so far: I click on a record in the first table, the Lead_Select event fires and determines a value for me. This value is then used as a parameter for filtering the contents of Table2. So far so good?

The issue I have now is that while the navigation buttons on Table1 work (when there are more than N records where N is the value of VisibleRowCount), when I try to do the same for Table2, I get an Exception!

The exception is this:

Specified argument was out of the range of valid values. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.

Any ideas?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

The problem seems to stem from a different cause. Will post a different question for this issue.