IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

C# Discussion :

problème avec scrollbar du dataGridView [Débutant]


Sujet :

C#

  1. #1
    Nouveau membre du Club
    Homme Profil pro
    Inscrit en
    Juillet 2008
    Messages
    33
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations forums :
    Inscription : Juillet 2008
    Messages : 33
    Points : 31
    Points
    31
    Par défaut problème avec scrollbar du dataGridView
    Bonjour,
    j'ai un problème avec le scrollbar de tableau c'est que le tableau contient des données et le scrollbar ne va pas jusqu’à la fin du tableau

    et si j’essaie avec les flèches "bas" j'arrive à voir ces données :/ mais avant d'arriver à la fin le programme affiche une exception.

    merci d'avance.

    L'exception System.ArgumentOutOfRangeException n'a pas été gérée
    Message=La valeur '220' n'est pas valide pour 'Value'. 'Value' doit être compris entre 'minimum' et 'maximum'.
    Nom du paramètre*: Value
    Source=System.Windows.Forms
    ParamName=Value
    StackTrace:
    à System.Windows.Forms.ScrollBar.set_Value(Int32 value)
    à System.Windows.Forms.DataGridView.ScrollRows(Int32 rowCount, Int32 deltaY, ScrollEventType scrollEventType)
    à System.Windows.Forms.DataGridView.ScrollRowsByCount(Int32 rows, ScrollEventType scrollEventType)
    à System.Windows.Forms.DataGridView.VertScrollTimerHandler()
    à System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
    à System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
    à System.Threading.ExecutionContext.runTryCode(Object userData)
    à System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
    à System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    à System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
    à System.Windows.Forms.Control.InvokeMarshaledCallbacks()
    à System.Windows.Forms.Control.WndProc(Message& m)
    à System.Windows.Forms.DataGridView.WndProc(Message& m)
    à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
    à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    à System.Windows.Forms.Application.Run(Form mainForm)
    à Taxation.Program.Main() dans \\**********************************\Program.cs:ligne 18
    à System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
    à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
    à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
    à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    à System.Threading.ThreadHelper.ThreadStart()
    InnerException:

  2. #2
    Nouveau membre du Club
    Homme Profil pro
    Inscrit en
    Juillet 2008
    Messages
    33
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations forums :
    Inscription : Juillet 2008
    Messages : 33
    Points : 31
    Points
    31
    Par défaut
    j'ai résolu ce problème en ajoutant une instruction pour trier le tableau
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
     dataGridViewResultat.Sort(this.dataGridViewResultat.Columns[1], ListSortDirection.Ascending);

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [Débutant] Problème avec ScrollBar
    Par h4miel dans le forum Windows Forms
    Réponses: 0
    Dernier message: 30/07/2014, 11h50
  2. Problème avec scrollBar en android
    Par khaledfayala dans le forum Android
    Réponses: 3
    Dernier message: 24/02/2012, 15h41
  3. Problèmes avec ScrollBar
    Par peterpanda dans le forum Interfaces Graphiques en Java
    Réponses: 2
    Dernier message: 12/04/2011, 14h51
  4. Problème avec Scrollbar
    Par riquet90 dans le forum VB 6 et antérieur
    Réponses: 6
    Dernier message: 23/08/2010, 10h25
  5. problème avec scrollbar
    Par azerty09 dans le forum AWT/Swing
    Réponses: 6
    Dernier message: 17/02/2008, 20h01

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo