I'm using Update Progress and when I click in the DropDownList, the progress controls shows up till GridView is filled. So far good. Now, if I do another selection in the DropDownList the GridView stays on the screen as the progress control is beings shown.
How can I prevent the GridView being shown till a new binding taken place? Thank you.
You Don't Have to Rate Me. I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter :@avrail
010011000111010101110110001000000100110101111001001000000101000001100011
I have moved the location of the UpdatePanel around and that did not solve the problem. I think the location of the UpdateProgress is in the right place.
Is there any other way of "hiding" the gridview when a "selectedindexchanged" event happens?
when you build the application is there is any errors?
You Don't Have to Rate Me. I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter :@avrail
010011000111010101110110001000000100110101111001001000000101000001100011
could you show me the code for DropDownList1_SelectedIndexChanged
You Don't Have to Rate Me. I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter :@avrail
010011000111010101110110001000000100110101111001001000000101000001100011
There are no errors. The application shows the udateprogress every time I do a select from the drop down list. If there is already a gridview displayed (ie when I do select from dropdownlist 2nd or 3rd time) then both gridview and progress controls are dispalyed at same time while a new gridview is being loaded.
Code:
Code:
Protected Sub DropDownList3_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList3.SelectedIndexChanged
If DropDownList3.SelectedValue = " " Then
pnlModal_ModalPopupExtender.Show()
Exit Sub
End If
Get_Summary_Current_Active_Shift()
End Sub
Code:
Private Sub Get_Summary_Current_Active_Shift()
Form.Disabled = True
Try
Dim mySqlDataTable2 As New Data.DataTable
mySqlCommand.Connection = mySqlConnection
mySqlCommand.CommandTimeout = 180
mySqlConnection.Open()
If DropDownList3.SelectedValue = "*All" Or DropDownList3.SelectedValue = " " Then
mySqlCommand.Parameters.Add(New Data.SqlClient.SqlParameter("@PlantName", Data.SqlDbType.Char)).Value = "*All"
Else
mySqlCommand.Parameters.Add(New Data.SqlClient.SqlParameter("@PlantName", Data.SqlDbType.Char)).Value = DropDownList3.SelectedValue.Substring(0, DropDownList3.SelectedValue.IndexOf(" "))
End If
mySqlCommand.CommandType = Data.CommandType.StoredProcedure
mySqlCommand.CommandText = ("sp_ADS_get_summary_current_active_shift_by_plant")
mySqlCommand.Connection = mySqlConnection
mySqlDataAdapter.SelectCommand = mySqlCommand
mySqlDataAdapter.SelectCommand.CommandTimeout = 300
mySqlDataAdapter.Fill(mySqlDataTable2)
Session("mySqlDataTable2") = mySqlDataTable2
GridView2.DataSource = mySqlDataTable2
GridView2.DataBind()
GridView2.Visible = True
Button4.Visible = True
Panel4.Attributes.Add("ScrollBars", "Horizontal")
Panel4.Style.Add("overflow", "scroll")
Catch ex As Exception
Dim message As String
message = ex.ToString
Dim mystr As String
mystr = message
'ASPNET_MsgBox("An error has occurred connection to server: " + ex.ToString)
Finally
mySqlCommand.Parameters.Clear()
mySqlConnection.Close()
End Try
Form.Disabled = False
End Sub
Last edited by snufse; Sep 24th, 2010 at 01:02 PM.
ok,
now you need to add this line
System.Threading.Thread.Sleep(2000)
Code:
Protected Sub DropDownList3_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList3.SelectedIndexChanged
System.Threading.Thread.Sleep(2000)
If DropDownList3.SelectedValue = " " Then
pnlModal_ModalPopupExtender.Show()
Exit Sub
End If
Get_Summary_Current_Active_Shift()
End Sub
You Don't Have to Rate Me. I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter :@avrail
010011000111010101110110001000000100110101111001001000000101000001100011
When I do this same thing happens and it only increases response time.
I have attached a screen shot (in word). Look at the pane upper left and maybe you can see that "Loading data...." bleeds through the gridview from my 1st time I select.
You Don't Have to Rate Me. I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter :@avrail
010011000111010101110110001000000100110101111001001000000101000001100011
You Don't Have to Rate Me. I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter :@avrail
010011000111010101110110001000000100110101111001001000000101000001100011
So I did. At 1st time select I see the progress control like it should be. It disappears when the grid view is displayed. When I do another select I see part of the progress controls but mostly hidden behind the gridview already displayed (from my 1st select).
ok,
now your problem become the GridView Style, and i'm not pretty good in such a thing,
but i think we can make a simple work around.
inside the SelectedIndexChanged add this at the first line
Code:
GridView1.Viable = False
and at the end add this line
Code:
GridView1.Viable = True
and tell me if this made the trick
You Don't Have to Rate Me. I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter :@avrail
010011000111010101110110001000000100110101111001001000000101000001100011
You Don't Have to Rate Me. I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter :@avrail
010011000111010101110110001000000100110101111001001000000101000001100011
yes, because it looks like the problem in the layout only of the controls
You Don't Have to Rate Me. I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter :@avrail
010011000111010101110110001000000100110101111001001000000101000001100011