Mr_Shaw
asked on
Click twice for dataload into listbox
I have a gridview which when I click the gridview edit button it loads some values into a listbox.
My problem is that I have to click the edit button twice for this to happen. Is there a reason for this.
I am using c# and asp.net
My problem is that I have to click the edit button twice for this to happen. Is there a reason for this.
I am using c# and asp.net
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Where have u written code to bind the grid? in Page load
ASKER
I have tried running my code both inside and outside of
if (Page.IsPostBack)
{
}
if (Page.IsPostBack)
{
}
ASKER
Everything seems to be acting on the previous click.
for example to value selected in the 1st click was one
the value selected in the 2nd click was two.
When I click for the second time the 1st clicks values is processed. ahhhhhhhh
for example to value selected in the 1st click was one
the value selected in the 2nd click was two.
When I click for the second time the 1st clicks values is processed. ahhhhhhhh
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
what do you mean by move the focus.... do you think you could give me an example?
When Edit button is clicked, Make the focus move to any other control like txtboxx1.focus()
ASKER
I'm really sorry to have to say this... but changing the focus does not help.
My code is always one click behind what I am actually doing,
Everything seems to be acting on the previous click.
for example to value selected in the 1st click was one
the value selected in the 2nd click was two.
When I click for the second time the 1st clicks values is processed. ahhhhhhhh
My code is always one click behind what I am actually doing,
Everything seems to be acting on the previous click.
for example to value selected in the 1st click was one
the value selected in the 2nd click was two.
When I click for the second time the 1st clicks values is processed. ahhhhhhhh
ASKER
thanks for the help....
It ended up being the way I ordered my code.
It ended up being the way I ordered my code.
ASKER
page_load and the code benhind the grid and two seperate sections