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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Weired Behaviour of Scrollbar .NET 4

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :WPF

I've created a DataGrid and supplied it with data. The problem is when I scroll over the table many times, the Scrollbar is expanding.

Could any one help in this?

Many Thanks

Eng. Belal

View Complete Post

More Related Resource Links

active directory exception unusual behaviour


i have a small problem
i want user names from active directory for an auto completer type of service
the method is always throwing an exception 
"searcher.FindAll()' threw an exception of type 'System.DirectoryServices.DirectoryServicesCOMException' System.DirectoryServices.SearchResultCollection 

the list.aspx bad behaviour


I have two tables : table1 (primary) and table2 with one to many relation .

table 1 has more than 130 000 records , table2 has near to 200 000 records .


when i am trying to list table2 , the table2/list.aspx will build filter depending on the relation.; this operation slows down the page (drop down list with 130 000 record)

 I disabled the filter by using the attribute AutoGenerateFilter = False .


now the problem is that table2/list.aspx?key=value will list all the recoreds in table 2 .


why is the page not using the query that is related to the parmeter passed to it ?


List.aspx (or list.aspx?key=value) will always get all the recorders from the table2  after disabling the key relation filter .

I want my table2/list.aspx?key=value  to query the table2 depending on the passed key which is the expected behaviour .

please advice .













ASP.NET DateTime Conversion strange behaviour



I am working on ASP.NET web application where we are using javascript calendar to accept the date in textboxes. The date format is dd/mm/yyyy. The application is running in US and UK environments.

I am facing issues in US environment while storing the dates so I have added 2 keys in config file viz culture which will be either en-US or en-GB depending on the deployment location and baseCulture which will always be en-GB.

In the code, I have added a condition which checks if culture and baseCulture values are not matching then do the conversion of date in US format.

But I have found that the code converts the date from dd/mm/yyyy to mm/dd/yyyy when the key is baseCulture (en-GB) and it throws FormatException when key is culture (en-US).

I am bit confused by this behaviour. Is this normal? Can any one please explain more about this? Note: I am working on a machine which has en-US as language and culture

<add key="culture" value="en-US" />
<add key="baseCulture" value="en-GB" />
// This line works and converts the date from 26/08/2010 to 08/26/2010
// Here the baseCulture is en-GB.
DateTime dt = DateTime.Parse(txtCurrentDate,baseCulture)

// This line throws FormatException. culture 

How to Prevent the expand/collapse behaviour of my Custom Activity?

  How can I prevent the expand feature of my custom activity with custom designer ? I have custom WF4 activities with Custom designers. These activities are not container activities. I just want to prevent the expand feature of the same; just like Assign activity. I set the Collapsible attribute of teh ActivityDesigner false; but still it is expanding to the next level. Thanks AmbilyIT Analyst

VERY strange behaviour of IE7 and 8!

Today is a day where nothing seems to work out as expected.I'm currently making the HTML and Javascript templates for our new Corporate Page.The thing works as expected in Firefox, Opera, Chrome and IE 6, but not in IE 7 and 8!The "thing" is a menu/submenu written by me in javascript.The way it looks in Firefox etc:The way it looks in IE 7 and 8:There is absolutely no explanation for the strange "rounded" edge on the right and the gradient going over it.The background is a semi-transparent optimized PNG without color profiles which shows up gray in IE 6 and transparent in the other browsers - as expected.On my other developer's computer, it shows up perfectly in both IE 7 and 8.What could possibly create this behaviour?----source:<div class="subMenusContainer"> <div class="subMenu" id="aboutUsMenu"> <a href="/Home/AboutAurora">About AURORA</a> <a href="/Home/AboutErichKrammer">Erich Krammer</a> <a href="/Home/AboutFoundation">AURORA Foundation</a> <a href="/Home/AboutPartners">Partners</a> <a href="/Home/AboutCareers">Careers</a> <a href="/Home/AboutContact">Contacts</a> </div> [snip] <div class="subMenu&q

Behaviour of WPF ComboBox with IsTextSearchEnabled=true and isEditable=true is not quite understanda

Hi, imagine you have a ComboBox with the following entries in the DropDown list: 1, 5, 10, 15 Now follow up this scenario: - open DropDown list - type 13 in the edit field -> 10 is selected in DropDown list - press "Enter" As result DropDown list is closed and 10 is placed in the edit field. How to override this behaviour so that 13 would be not overwritten after pressing "Enter"? Regards Efim

Create Behaviour Method not Invoked.

framework: .net 4.0 with VS2010 on Windows XP SP3  I am working on creating a WCF  Behaviour which will act as a authorization filter. When i debug the code the control never hits CreateBehavior method in BehaviorExtensionElement class. not sure on what i'm missing. Any help will be appreiciated.   Thyagaraju Govardhan      

Menu Control expansion weired issue.

Menu control expands on load (vertically, 100%) and then contracts to its horizontal position. The code I am using- ASPX page: <asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="False" IncludeStyleBlock="False" Orientation="Horizontal" DataSourceID="SiteMapDataSource1">                    <DynamicMenuStyle CssClass="DynamicMenu" /></asp:Menu>   CSS:  .DynamicMenu{ display: none;} This can be live at www.jaindata.com Can someone please help? Thanks, Swapneel Shah 

scrollbar is not showing for sharepoint list with group by view

Hi, have created a Share point 2007 list having a huge data. I have created a group by view by grouping the data with category. My requirement is to show the data as web part on a page. When i did so, while expanding the group inside the web part, the web part is expanding. I want to keep the height and width of the web part fixed so that the layout of the page will not be ugly looking. But though I am putting the option for fixed height and width in the web part setting but I am not able to see the scroll bars. Where as I can see the height and width are fixed but could see a few data instead of all the data with scroll bar.   Please advice me if there is any solution or workaround.Deeptyranjan

Changing Mouse Cursor into Crossed Circle in ListBox-ScrollBar/ScrollViewer(on Drag and Drop).

Hi All,   I have a ListBox with 10 items, the automatic Scrollbar/ScrollViewer is appearing. If i'm dragging an item from the listbox and moving the mouse cursor on top scrollbar/scrollviewer the cusor have to change into CROSSED CIRCLE(means its not a location to drop). Can any one help to do the same, or please let me know if more info needed.   Thanks, Karthikeyan Manickam.

Parent-Child, Unbalanced Hierarchy and unexpected Root behaviour

I have a chart accounts that contains an account key and parent account key (like the AW Enterprise sample). Each account ultimately has either Assets or Liabilities as parent. However, There also some accounts appear in the root because they have less levels then the other accounts. to put in other words: the acounts with exactly four levels, ultimately show up with either assets or liabilities in the root but the members with less then four levels, also appear in the root instead of under Assets or Liabilities. Where am I going wrong? The dimension settings appear to be exactly the same as the AdventureWorks-sample.

BUG: Exceptions propagation behaviour is different if the application is run inside visual studio.

I'm going crazy. I have a simple application: one form, one module. The project is configured to start from sub main. The module contains: Module Module1 Public Sub main() Try Application.Run(New Form1) Catch ex As Exception MessageBox.Show(ex.Message, "Fatal Error") End Try End Sub End Module Form1 contains one button and one event: Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Throw New Exception("operation aborted") End Sub End Class I run the application inside visual studio... A new instance of Form1 is shown. I click the button. The exception is propagated to the sub main and the messagebox is shown. RIGHT!... I close visual studio (without recompiling anything) and I run the SAME .exe that was generated before... A new instance of Form1 is shown. I click the button. The exception IS NOT propagated to the main sub and a dialog appears: System.Exception: operation aborted in textexception.Form1.Button1_Click(Object sender, EventArgs e) in C:\Documents and Settings\Lino Barreca\Documenti\Visual Studio 2008\Projects\textexception\textexception\Form1.vb:riga 4 in System.Windows.Forms.Control.OnClick(EventArgs e) in System.Windows.Forms.Button.OnClick(EventArgs e) in System.Windows.Forms.ButtonBase.OnKeyUp(KeyEventArgs kevent)

class names and namespace behaviour

This is something that I'm not sure if it's a problem or something I have configured wrong. Just thinking on it is making my head hurt!! So here goes. What I'm doing...   1. create a blank VS2010 web project called "MySite" targeted at 4.0 2. create a new class object, calling it "class1.vb" (cause it's so unique!!) 3. change default code to read as such...Namespace MySite Public Class Functions Public Shared Function WhatIsTodaysDate() As String Return Date.Now.ToLongDateString End Function End Class End Namespace 4. create a new webform and drop a label control on it. In the page_load event, I want to set the label to equal the value of Function WhatIsTodaysDate. Simple enough, but now comes the part that escapse me. I can do this...Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Label1.Text = MySite.Functions.WhatIsTodaysDate() End Sub but if I want to shorten my code, and call the function using an "Imports" tag i have to do this...Imports MySite.MySite.Functions Public Class WebForm1 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Label1.Text = WhatIsTodaysDate() End Sub End Class Why is VS asking me to call the namespa

Positioning scrollbar

Hi..I have a listview with multiple records inside a div whose overflow property has been set to enable scrollbars.  Now I have another search panel in which If i click on a particular item the corresponding item in the listview gets selected. But the problem is that the item gets selected but the user cannot view it if its way down on the list. I also want the scrollbar to move in order to let the user show the selected item. Any help would be appreciated.Thanks.

Scrollbar disappear when adding an attached file in MOSS 2010

Hi, When adding a new element in my SharePoint list, the vertical scrollbar is OK. But when I click on the attached file button to upload a file and back to the list form, the scrollbar disappears !! It's impossible to access the "save" button at the back of the form. Any issue to that problem ? Best Regards, François

Scrollbar disappear when adding an attached file in MOSS 2010

Hi, When adding a new element in my SharePoint list, the vertical scrollbar is OK. But when I click on the attached file button to upload a file and back to the list form, the scrollbar disappears !! It's impossible to access the "save" button at the back of the form. Any issue to that problem ? Best Regards, François

Unexpected focus behaviour when disabling controls

I'm working with WindowsForms using C#, but I think the described control behaviour is language independent... I have a form containing 3 comboboxes A, B and C, which have the taborder A.TabIndex=0, B.TabIndex=1 and C.TabIndex=2. Combobox B is enabled/disabled depending on the content of A.Text in A's Validating event (A.Text = "dis" disables combobox B, A.Text="other" enables combobox B): private void A_Validating(object sender, CancelEventArgs e) {     if (A.Text == "dis") {         B.Enabled = false;     }     else {         B.Enabled = true;     } } The behaviour following then is very strange (executed exactly in the given order): 1.) I'm entering "dis" in combobox A. When pressing the tab key, the Validating event disables combobox B. Expected behaviour:  Focus is moved to combobox C Actual behaviour: Focus stays on combobox A 2.) I'm then entering "other" in combobox A and pressing the tab key. Expected behaviour:  Validating event is called and enables combobox B. Focus should then be on B. Actual behaviour: Validating event is NOT called, therefore B is still disabled. Focus is now on C. 3.) I'm setting the focus on combobox A (using tab key or mouse) and
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