Click here to Skip to main content
15,915,702 members
Home / Discussions / C#
   

C#

 
QuestionDataGridView scrolling problem - details [modified] Pin
florinp320-Jun-06 21:27
florinp320-Jun-06 21:27 
Well, it's not the number of rows that seems to be the problem, but the scrollbar - whenever a scrollbar has to be displayed the control freezes. I've also set scrollbars to "None" and everything works OK (except of course I have to use the keyboard to see everything), but this isn't the fix I need.
Anyway, below is the code I'm using... maybe is something wrong there ( my experience is quite limited):

DataTable temp=new DataTable();
DataRow newRow;
DataColumn newCol;
ds1.Tables.Clear();
ds1.Tables.Add(temp);
i = 0; j = 0; prima = true;
newRow = temp.NewRow(); newRow.BeginEdit();
for (i = 0; i < fp.lista_selectie.Count; i++) //fp is the parent form
{
if (fp.lista_selectie[i] != "##rr##") //##rr## is what I'm putting beetwen rows
if (prima) //used to add columns when adding the first row
{
newCol = new DataColumn(i.ToString());
temp.Columns.Add(newCol);
newRow[j++] = fp.lista_selectie[i].ToString();
}
else
newRow[j++] = fp.lista_selectie[i].ToString();
else
{
newRow.EndEdit();
temp.Rows.Add(newRow);
newRow = temp.NewRow();
newRow.BeginEdit();
j = 0; prima = false;
}
}
dGV1.DataSource = temp;

I'm using VS2005.
Any ideeas? Or going back to Listview?

-- modified at 7:21 Wednesday 21st June, 2006
Questioncheck if a class is inherited from another class Pin
hpetriffer16-Jun-06 1:38
hpetriffer16-Jun-06 1:38 
AnswerRe: check if a class is inherited from another class Pin
Daniel Persson16-Jun-06 2:00
Daniel Persson16-Jun-06 2:00 
GeneralRe: check if a class is inherited from another class Pin
hpetriffer16-Jun-06 2:28
hpetriffer16-Jun-06 2:28 
AnswerRe: check if a class is inherited from another class Pin
Guffa16-Jun-06 2:39
Guffa16-Jun-06 2:39 
GeneralRe: check if a class is inherited from another class Pin
hpetriffer18-Jun-06 21:51
hpetriffer18-Jun-06 21:51 
QuestionDirectX video Application Pin
ranandbe16-Jun-06 0:50
ranandbe16-Jun-06 0:50 
QuestionAny way to ensure a selected Datagrid row is visble? Pin
rwestgraham16-Jun-06 0:29
rwestgraham16-Jun-06 0:29 
QuestionRemoving special character from string Pin
yogesh m16-Jun-06 0:19
yogesh m16-Jun-06 0:19 
AnswerRe: Removing special character from string Pin
CWIZO16-Jun-06 1:02
CWIZO16-Jun-06 1:02 
QuestionAbout Mdi Container Pin
relsirc16-Jun-06 0:12
relsirc16-Jun-06 0:12 
AnswerRe: About Mdi Container Pin
rah_sin16-Jun-06 0:25
professionalrah_sin16-Jun-06 0:25 
AnswerRe: About Mdi Container Pin
wasife16-Jun-06 6:00
wasife16-Jun-06 6:00 
QuestionClass to Dataset [modified] Pin
M. Cahid AYDIN15-Jun-06 23:20
M. Cahid AYDIN15-Jun-06 23:20 
AnswerRe: Class to Dataset Pin
Josh Smith16-Jun-06 3:46
Josh Smith16-Jun-06 3:46 
GeneralRe: Class to Dataset Pin
M. Cahid AYDIN16-Jun-06 21:37
M. Cahid AYDIN16-Jun-06 21:37 
QuestionCubase-like score component Pin
Daniel Persson15-Jun-06 23:04
Daniel Persson15-Jun-06 23:04 
AnswerRe: Cubase-like score component Pin
rah_sin15-Jun-06 23:10
professionalrah_sin15-Jun-06 23:10 
AnswerRe: Cubase-like score component Pin
Christian Graus15-Jun-06 23:14
protectorChristian Graus15-Jun-06 23:14 
AnswerRe: Cubase-like score component Pin
Daniel Persson15-Jun-06 23:22
Daniel Persson15-Jun-06 23:22 
QuestionScreenToClient C#... Pin
anderslundsgard15-Jun-06 22:43
anderslundsgard15-Jun-06 22:43 
AnswerRe: ScreenToClient C#... [modified] Pin
Corinna John15-Jun-06 22:58
Corinna John15-Jun-06 22:58 
GeneralRe: ScreenToClient C#... Pin
anderslundsgard16-Jun-06 2:02
anderslundsgard16-Jun-06 2:02 
Question.Net Pin
surshbabuk15-Jun-06 21:33
surshbabuk15-Jun-06 21:33 
AnswerRe: .Net Pin
surshbabuk15-Jun-06 21:34
surshbabuk15-Jun-06 21:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.