.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

ComboBox SelectedValue too slow

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :Windows Application
 

DataBound ComboBox bound to DataTable of 2 columns with 1000 items (ZIP codes) is too slow when current selection is changed via SelectedValue. It tooks even 300ms on my i3 4GB W7 64bit.
In case of form with 10 combos on detail UI becames unusable in master/detail scenario.

If I implemented some FindRow method and current item is selected via SelectedIndex it works fine (at least it tooks 10-times less time).

Every possible change events are blocked during call of SelectedValues.

Any ideas how to correct this issue?

Thanks in advance.

VS2010, .NET 40

 


Ondrej Spilka


View Complete Post


More Related Resource Links

Combobox SelectedValue with Converter and PropertyChangedCallback() is not working together?

  
Hi, I have a combobox, I want to have a PropertyChangedCallback and at the same time I want to bind selected value with IsEnable property of a Checkbox. Problem is when I add Converter Neither Converter gets called and nor the  PropertyChangedCallbac().   <ComboBox ItemsSource="{Binding Source={StaticResource EnumExportType}}" Name="CB_ExpType" SelectedValue="{Binding Path=ExpType, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged" /> Combobox is binded with static Enum resource EnumExportType. Selected value is Binded with a Dependency Property ExpType which is a Enum.   public ExportType ExpType { get { return (ExportType)GetValue(ExpTypeProperty); } set { SetValue(ExpTypeProperty, value); } } public static readonly DependencyProperty ExpTypeProperty = DependencyProperty.Register("ExpType", typeof(ExportType), typeof(ExportScreen), new FrameworkPropertyMetadata(ExportType.EntireProject, new PropertyChangedCallback(ExportTypeChanged))); this works fine On changing Item from combobox PropertyChangeCallback gets called. Now I want To bind the IsEnabled property of a Checkbox to the ExpType property and I use IValueConverter to convert the ExpType to the correct boolean value. <CheckBox Content="Test" Name="CHK_WithModels" IsEnabled="{Binding ElementName=CB_ExpTyp

Updating combobox itemsource from another combobox selection is slow

  

Hi everybody!

I'm developing a WPF application that needs a combobox updating another combobox items when selection changes.

I isolated the code and the problem is still there, when i change the first selection and then click the other it takes a lot of time (IMHO) 

 

namespace TestCombobox
{
 /// <summary>
 /// Interaction logic for MainWindow.xaml
 /// </summary>
 public partial class MainWindow : Window
 {
  private List<string> methodsList;
  private Dictionary<string, List<string>> dict;

  public MainWindow()
  {
   InitializeComponent();

   dict = new Dictionary<string, List<string>>();

   for(

Setting SelectedValue for ComboBox

  
When you add combobox items inside xaml then SelectedValue of the Combo Box didn't work.

Response.Redirect slow

  

I'm in the middle of migrating servers and on the new server Response.Redirect is extremely slow. It takes around 20 seconds for the browser to get the redirect. This is something that was quick on the existing server. It's an ASP.NET 2.0 application, both servers are running IIS6.

Additionally, if I "manually" do the redirect, it's fast. For example:

Existing way:


Response.Redirect(url);

takes around 20 seconds on the new server


New way:

Response.Status = "302 Moved Temporarily";
Response.AddHeader("Location", url);
Response.End();

is fast on the new server.


Any ideas why Response.Redirect would be so slow on the new server?


VS 2010 Pro is slow

  

Hi

I was wondering if anybody else is finding VS 2010 extremely slow loading a solution - and it pretty much renders the rest of the machine useless until loaded. Everything is slowed to a halt.

I upgraded from VS 2005 - now I think I made a terrible mistake. I cannot afford to try and load 2 solutions simultaneously.

The machine is a Core2 Duo E8400, 3GB of RAM, WinXP SP3. Max I can go to is 4GB. Would upgrading to a 64-bit OS really be worth it (actually only to get 8GB of RAM)?

I'm hoping someone else has found a solution to this particular problem.

Thanks

Johan


How to display related tables in one crystal report and how to link this report with combobox?

  

Hi! I want to display a crystal report in my vb.net application. Suppose I have tables named student details, student marks, student address, etc... Now if I want to display all these details (fields of all tables) in one crystal report (with page breaks if necessary) then how will I achieve it. I will be providing a combo box in my application that contains list of student names. How can I link this combo box with the cystal report to dynamically display report for different student on selected index change of combo box? Help me friends. An example would be appreciable.


C++ at Work: Addin a Combobox Cancel Feature

  

This month Paul DiLascia codes some Microsoft Office-style dialog box features.

Paul DiLascia

MSDN Magazine August 2006


ActiveX and Visual Basic: Enhance the Display of Long Text Strings in a Combobox or Listbox

  

The combobox and listbox controls in Visual Basic have no built-in support for displaying text strings that are too long to fit in the visible area of either control. This article describes several techniques to improve the readability of long strings in each control. The first technique uses tooltips to display a combobox or listbox item. The other techniques, which use various Windows APIs, include adding a horizontal scrollbar for a listbox and determining the necessary width of the longest string given the font attributes of the text. The required steps are described for both comboboxes and listboxes.

John Calvert

MSDN Magazine December 2000


Live website slow - very urgent

  

Hi All, 

Finally i came to know because of firebug that  ScriptResource.axd's (multiple) are making my files slow on first click

How do i merge them into 1 ??

 

 

1. ScriptResource.axd is making my page slow in first click.

On second click onwards its fine as i have added handler from http://madskristensen.net/post/Compress-WebResourceaxd-in-ASPNET.aspx   It helps performance but from second click onwards.I am testing it with FireBug.

2. I have also seen and treid http://www.codeproject.com/KB/aspnet/AspNetOptimizer.aspx  but not able to make out how to implement in my application.

3. I also tried http://madskristensen.net/post/Optimize-WebResourceaxd-and-ScriptResourceaxd.aspx but it has error, I tried making chnage as per the discussion in url but it is sill giving error.

4. I have also made scriptmanager as release mode

Please help its urgent

 


Slow page load during a list query one time during the day

  

We have a monitoring tool set to check to see if the home pages for our 3 web apps load in under 60 seconds every 10 minutes.  All 3 web apps load in under 3 seconds on every 10 minute check except for one exception.  One check every day one of the web app's home page takes longer than 60 seconds to load.  This happens at 11:45PM when there is very little user usage on the environment.  The characteristics of this page are as follows: The only thing on the page is a list view web part which was added by the browser.  The page has not been customized with SPD or code at all.  The list that it pulls is a simple links list that has 281 items on it.  The view pulls all 281 items and displays them in sets of 100.  I cannot find any associated event in the server events and/or SharePoint ULS logs nor are there any daily sharepoint timer jobs running at that time.  Our full index happens at midnight with incremental happening hourly.  Our enviroment is 2 WFEs, 1 App/indexer and we have a separate SQL cluster backend.  

Could someone lead me possibly in the direction I should take next in my troubleshooting?   


Binding value to combobox or dropdown

  

How can we bind a value to a combobox or dropdown? What is the property for binding a value? 

Thanks.


Weird "string;#" in combobox

  

Ok, while I am digging and digging myself into the world that's called Sharepoint I come to the next challenge.

 

I have two lists Projects List and Project Issues. They both have an id field (which is not the ID field of the record) and a title. I created two calculated fields for both of the tables which combines the title and the number for displaying in other pages.

 

example:

Projects List:

ProjectID: 2008-001

Project Name: First Project in 2008

Display Name (which is the calculated field): 2008-001 First Project in 2008

 

The calculated field formula is: =[ProjectID]&" "&[Project Name]

The field returns a string.

 

I also have a Worksheet list where my workers have to fill in their working hours. In this list I have two lookup fields. O

Combobox and Enter key

  

I have added a combobox to my page. Listview is updated based on selection from combobox. It is working great except it does not fire when Enter is pressed. User has to click on option from dropdown or has to press tab key to have Listview to populate. I want the user to be able type use arrow key to select option and then press the enter key for event to fire.

Using .net 3.5 and c#

 


Open With Windows Explorer very slow

  

I am trying to troubleshoot an issue where some users of our SharePoint environment have problems using the open with windows explorer option in a document library.

 

For some users this works fine...  the explorer opens quickly and they can manage the documents.

 

For other users it takes up to 5 minutes before the explorer view opens.  During this time the browser becomes completly unresponsive.

 

As part of the troubleshooting process I tried taking the UNC path that is shown in the explorer view and tried using the Start -> Run and then entering in the path.   This seems to cause the complete desktop to freeze until the explorer window displays.

 

This is occuring on Windows XP SP Pro SP2 with both IE6 and IE7.   The desktops are on the same domain as the SharePoint servers.

 

Any thoughts on next steps?


ComboBox text/value selection?

  

When we select a value from combobox list, we can get it by combobox.selectedvalue.text, however when we enter a new value in combobox, we can get it by combobox.text when submitting a form.  During submission, how will we handle this situation? Either there is a single way of getting value in both situations or we'll have to tackle both situations separately?

Please help me tackling this situation. Thanks


How to bind to DisplayMemberPath in a customercontrol that derived from ComboBox?

  
Hello, All: I need a customer control which derives from ComboBox. In its resource file I have the style:   <Style TargetType="{x:Type local:MyComboBox}">             <Setter Property="SnapsToDevicePixels" Value="True"></Setter>             <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>             <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>             <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>         <Setter Property="ItemTemplate">                 <Setter.Value>                     <HierarchicalDataTemplate>                     <CheckBox Content="{Binding Path=DisplayMemberPath,Mode=TwoWay,RelativeSource={RelativeSource

combobox with first row blank

  
Hi  I have combobox whith data biding to another combo box but i have a problem,when I open UI windows already initially  i see value inside combo box but i need in at the start to display blank combo box only after choosing value i need to display it/ thank
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend