Click here to Skip to main content
15,902,112 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Hi,

In my application i have Search button for Search Order. When i enter the Order no and order type and click submit button then it shows the documents for that order no.But,The Problem with the application is when i click the Search button simultaneously it replicates the data.I want to avoid the replication of the data on multiple button click.

Thanks,
Umesh Tayade

<Button Content="Search"  Margin="5,0,0,0" Height="21" Width="100" Grid.Row="0" Grid.Column="9" HorizontalAlignment="Left" VerticalAlignment="Center" Style="{StaticResource grayButton}" x:Name="btnSearch" Click="btnSearch_Click"/> 


private void btnSearch_Click(object sender, RoutedEventArgs e)
{
   if (IsValid() && isLineValid)
   {
      if (null != multiDocViewModelConnector.ViewState && multiDocViewModelConnector.ViewState.FilterDescripter != null)
                    multiDocViewModelConnector.ViewState.FilterDescripter.Clear();
      __searchCriteria();
   }
  }
Posted
Updated 24-Jun-11 1:28am
v2

1 solution

0) The code you've shown does absolutely NOTHING to allow us to help you with your problem.

1) What do you mean by "replicates the data"?

2) What does __searhCriteria() do?

3) Have you considered running the app under the debugger to see WHY the behavior you're seeing is happening?

4) It might be that you need to ALWAYS clear the FilterDescriptor list when the user clicks the button. Of course this is just a guess.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900