B
Blasting Cap
I had a page that was working in Framework 1.1, that functions
differently/incorrectly in framework 2.0.
What happens is that in the old system I had some drill-down
functionality that would display 4 lines that had the first cell as a
hyperlink, and when you selected that item, it would collapse the 4
items to 1 item, and then display the items underneath that one item,
sub categories of Item 1.
I've compared the code between the two, and it is identical.
Here's what happens:
if they select an item and keep drilling down, it performs as described
above, until you get to the final drill-down where there are no more
selections.
The same code in Framework 2.0 functions wrong. The code - and it
happens only on 1 datagrid -
it makes a pass thru the data and returns the correct data, but for some
inexplicable reason, it then does this same code AGAIN.
Sub DataGrid5_Select(ByVal Sender As Object, ByVal E As EventArgs)
Handles DataGrid5.SelectedIndexChanged
MyPage.Text = ""
Item = ""
cmbPO.Visible = False
txtPO.Visible = False
btnSubmit.Visible = False
Button1.Visible = False
lblPO.Visible = False
DGPOClass.Visible = False
SoldTo = ""
ShipTo = ""
DC = ""
txtDGCustomer.Text = ""
DGCustomer.SelectedIndex = -1
DGPOList.Visible = False
DGPOClass.SelectedIndex = -1
If txtDG5.Text = "" Then
txtDG5.Text =
CStr(DataGrid5.DataKeys(DataGrid5.SelectedIndex)).Replace("'", "''")
Customer()
DGPOList.Visible = True
DGPOClass.Visible = True
DGCustomer.Visible = True
Else
DGPOList.Visible = False
DGPOClass.Visible = False
DGBOL.Visible = False
txtDG5.Text = ""
txtDG6.Text = ""
DGCustomer.Visible = False
End If
orderval = 0
shipval = 0
SKU()
End Sub
What happens in the SKU() subroutine is that it re-reads the data and
then re-binds the last sku to datagrid5.
It's supposed to return data like this:
First datagrid
Item1
Item2
Item3
Item4
you select Item2 from above, the screen then has:
Item2
Item2.1
Item2.2
Item2.3
you select item2.1 from above and you get:
Item2
Item2.1
Item2.1.1
Item2.1.2
You select Item2.1.2 and you get
Item2
Item2.1
Item2.1.2
Customerdata (no more drill thru)
What it's doing though is everything except the last step. However,
stepping thru the code, I find that it's returning the right data, it's
just this "extra" call to datagrid5_select that I can't figure out where
it's coming from. As I said, the code for the datagrid & the sub itself
are identical.
Any ideas?
BC
differently/incorrectly in framework 2.0.
What happens is that in the old system I had some drill-down
functionality that would display 4 lines that had the first cell as a
hyperlink, and when you selected that item, it would collapse the 4
items to 1 item, and then display the items underneath that one item,
sub categories of Item 1.
I've compared the code between the two, and it is identical.
Here's what happens:
if they select an item and keep drilling down, it performs as described
above, until you get to the final drill-down where there are no more
selections.
The same code in Framework 2.0 functions wrong. The code - and it
happens only on 1 datagrid -
it makes a pass thru the data and returns the correct data, but for some
inexplicable reason, it then does this same code AGAIN.
Sub DataGrid5_Select(ByVal Sender As Object, ByVal E As EventArgs)
Handles DataGrid5.SelectedIndexChanged
MyPage.Text = ""
Item = ""
cmbPO.Visible = False
txtPO.Visible = False
btnSubmit.Visible = False
Button1.Visible = False
lblPO.Visible = False
DGPOClass.Visible = False
SoldTo = ""
ShipTo = ""
DC = ""
txtDGCustomer.Text = ""
DGCustomer.SelectedIndex = -1
DGPOList.Visible = False
DGPOClass.SelectedIndex = -1
If txtDG5.Text = "" Then
txtDG5.Text =
CStr(DataGrid5.DataKeys(DataGrid5.SelectedIndex)).Replace("'", "''")
Customer()
DGPOList.Visible = True
DGPOClass.Visible = True
DGCustomer.Visible = True
Else
DGPOList.Visible = False
DGPOClass.Visible = False
DGBOL.Visible = False
txtDG5.Text = ""
txtDG6.Text = ""
DGCustomer.Visible = False
End If
orderval = 0
shipval = 0
SKU()
End Sub
What happens in the SKU() subroutine is that it re-reads the data and
then re-binds the last sku to datagrid5.
It's supposed to return data like this:
First datagrid
Item1
Item2
Item3
Item4
you select Item2 from above, the screen then has:
Item2
Item2.1
Item2.2
Item2.3
you select item2.1 from above and you get:
Item2
Item2.1
Item2.1.1
Item2.1.2
You select Item2.1.2 and you get
Item2
Item2.1
Item2.1.2
Customerdata (no more drill thru)
What it's doing though is everything except the last step. However,
stepping thru the code, I find that it's returning the right data, it's
just this "extra" call to datagrid5_select that I can't figure out where
it's coming from. As I said, the code for the datagrid & the sub itself
are identical.
Any ideas?
BC