Click here to Skip to main content
15,896,359 members
Home / Discussions / C#
   

C#

 
GeneralRe: .NET Remoting Reference Pin
Wender Oliveira15-Oct-04 10:15
Wender Oliveira15-Oct-04 10:15 
GeneralRe: .NET Remoting Reference Pin
Alex Korchemniy15-Oct-04 10:20
Alex Korchemniy15-Oct-04 10:20 
GeneralRe: .NET Remoting Reference Pin
Wender Oliveira15-Oct-04 10:24
Wender Oliveira15-Oct-04 10:24 
GeneralRe: .NET Remoting Reference Pin
Alex Korchemniy15-Oct-04 10:29
Alex Korchemniy15-Oct-04 10:29 
GeneralChange the caret color in a textbox Pin
ee9903515-Oct-04 7:30
ee9903515-Oct-04 7:30 
GeneralRe: Change the caret color in a textbox Pin
Alex Korchemniy15-Oct-04 9:47
Alex Korchemniy15-Oct-04 9:47 
GeneralRe: Change the caret color in a textbox Pin
Carl Mercier15-Oct-04 17:13
Carl Mercier15-Oct-04 17:13 
Generalslow listview refresh Pin
DF_Bandit15-Oct-04 6:49
DF_Bandit15-Oct-04 6:49 
I have a listview in detail mode which I use to display a subset of records from an SQL table. If the user changes the subset parameter I refresh the list with another set of lines.
My problem is that while the original population of the list is very fast (it is done in the dialog's constructor), the refreshes are quite slow - about 10 seconds for a 500 line data set.
I know the problem lies with the listview since if I comment out the listview code, the method executesd quite fast. I have tried:
begin/end update
setting enable=false and then true
setting visible=false and then true
None seem to have more than a small effect (about 10% difference).

Any suggestions?

the method's code:

...<br />
sqlCmd.CommandType = CommandType.StoredProcedure;<br />
SqlDataReader reader = sqlCmd.ExecuteReader();<br />
<br />
lvwLogDays.Items.Clear();<br />
      <br />
while( reader.Read() )<br />
{<br />
	DateTime Date = reader.GetDateTime( reader.GetOrdinal( "LogDate" ) );<br />
	string strTemp = Date.ToString( "MM/dd/yyyy" );<br />
	OpenDayLogData	DayLogData = new OpenDayLogData();<br />
<br />
	ListViewItem item = lvwLogDays.Items.Add( strTemp );<br />
        strTemp = reader["CallLetters"].ToString().Trim();<br />
        item.SubItems.Add( strTemp );<br />
<br />
	strTemp = reader["LogStatus"].ToString().Trim();<br />
        item.SubItems.Add( strTemp );<br />
<br />
	DayLogData.LogID = Convert.ToInt32(reader["DF_LogID"].ToString(), 10);<br />
	DayLogData.LogDayID = Convert.ToInt32(reader["DF_LogDayID"].ToString(), 10);<br />
        item.Tag = DayLogData;<br />
}<br />
...

GeneralRe: slow listview refresh Pin
Heath Stewart15-Oct-04 7:00
protectorHeath Stewart15-Oct-04 7:00 
GeneralRe: slow listview refresh Pin
DF_Bandit15-Oct-04 7:10
DF_Bandit15-Oct-04 7:10 
GeneralRe: slow listview refresh Pin
Heath Stewart15-Oct-04 8:44
protectorHeath Stewart15-Oct-04 8:44 
GeneralRe: slow listview refresh Pin
DF_Bandit15-Oct-04 9:39
DF_Bandit15-Oct-04 9:39 
GeneralRe: slow listview refresh Pin
Heath Stewart15-Oct-04 15:42
protectorHeath Stewart15-Oct-04 15:42 
GeneralRe: slow listview refresh Pin
afinnell18-Oct-04 6:17
afinnell18-Oct-04 6:17 
GeneralRe: slow listview refresh Pin
Heath Stewart18-Oct-04 6:46
protectorHeath Stewart18-Oct-04 6:46 
GeneralRe: slow listview refresh Pin
afinnell18-Oct-04 7:50
afinnell18-Oct-04 7:50 
GeneralRe: slow listview refresh Pin
Heath Stewart18-Oct-04 10:06
protectorHeath Stewart18-Oct-04 10:06 
GeneralRe: slow listview refresh Pin
afinnell18-Oct-04 11:11
afinnell18-Oct-04 11:11 
GeneralRe: slow listview refresh Pin
Heath Stewart18-Oct-04 11:41
protectorHeath Stewart18-Oct-04 11:41 
GeneralRe: slow listview refresh Pin
afinnell18-Oct-04 12:03
afinnell18-Oct-04 12:03 
GeneralRe: slow listview refresh Pin
DF_Bandit18-Oct-04 8:16
DF_Bandit18-Oct-04 8:16 
GeneralSplitter &amp; multiple panels Pin
DennisMetz15-Oct-04 6:47
DennisMetz15-Oct-04 6:47 
GeneralRe: Splitter &amp; multiple panels Pin
Stanciu Vlad15-Oct-04 7:42
Stanciu Vlad15-Oct-04 7:42 
GeneralRe: Splitter &amp; multiple panels Pin
DennisMetz15-Oct-04 8:14
DennisMetz15-Oct-04 8:14 
GeneralRe: Splitter &amp; multiple panels Pin
Heath Stewart15-Oct-04 9:02
protectorHeath Stewart15-Oct-04 9:02 

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.