|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Sorting a datagrigviewHi,
I sort my datagridview with : dgWrk.Sort(dgWrk.Columns(3),... and it works perfect. Now, I want it sorted on 2 columns. How did I do that ? I've try dgWrk.Sort(dgWrk.Columns(3)+dgWrk.Columns(4)+ ... but I have an error in the code editor. Thanks -- Ami Calmant Stéphane Stéphane Miqueu schrieb:
> Hi, Hi Stéphane,> > I sort my datagridview with : dgWrk.Sort(dgWrk.Columns(3),... > and it works perfect. Now, I want it sorted on 2 columns. How did I do > that ? I've try dgWrk.Sort(dgWrk.Columns(3)+dgWrk.Columns(4)+ ... > but I have an error in the code editor. > AFAIK, the '+' operator won't work here and the Sort(...) method can only get 1 column, no collection. Doesn't it work when you just call dgWrk.Sort(dgWrk.Columns(3)) dgWrk.Sort(dgWrk.Columns(2)) ? (Maybe you need a dgWrk.update() call between the .sort()) Norman Chong a présenté l'énoncé suivant :
> Hi Stéphane, Well done Norman, it was just under my nose. I was doing the sorting in > > AFAIK, the '+' operator won't work here and the Sort(...) method can > only get 1 column, no collection. Doesn't it work when you just call > dgWrk.Sort(dgWrk.Columns(3)) > dgWrk.Sort(dgWrk.Columns(2)) ? > > (Maybe you need a dgWrk.update() call between the .sort()) the wrong order : col3 then col4 whereas col4 THEN col3 is doing just fine. Thanks ! -- Ami Calmant Stéphane
LsaOpenPolicy : Attempted to read or write protected memory
Cant seem to filter Dataset table by a value Scope misunderstanding Database creation problems regex.replace and trim DataGridView Edit row marker set itemheight in listbox Getting XML Version difference between MyBase.Closing and MyBase.FormClosing Filling TreeView with Recursive Function ? |
|||||||||||||||||||||||