Click here to Skip to main content
15,906,335 members
Home / Discussions / C#
   

C#

 
GeneralRe: .NET Remoting Reference Pin
Alex Korchemniy15-Oct-04 10:10
Alex Korchemniy15-Oct-04 10:10 
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 
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 
Thanks Heath,

I am not sure if the data are being gathered on another thread, so I altered my code to use a delegat data formater and used the listview's Invoke method. So the code looks like this:
		<br />
protected void LoadLogList()<br />
{<br />
...<br />
SqlCommand		m_sqlCmd = new SqlCommand( "DF_Get_DayLog_List",<br />
MainForm.Instance.FDSConnection.DBConnection.Connection );<br />
<br />
m_sqlCmd.CommandType = CommandType.StoredProcedure;<br />
m_sqlCmd.Parameters.Add("@DF_TrafficID", iTrafID );<br />
<br />
SqlDataReader reader = m_sqlCmd.ExecuteReader();<br />
<br />
myMethodDelegate myD1 = new myMethodDelegate( this.LoadLogItem );<br />
object[] param = {reader};<br />
<br />
while( reader.Read() )<br />
{<br />
	lvwLogDays.Invoke(myD1, param);<br />
}<br />
<br />
reader.Close();<br />
	<br />
}<br />
<br />
public void LoadLogItem(SqlDataReader reader)<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 />
<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 />


I experienced no speed change. Am I being unreasonable to expect 500 lines to be loading into the list view in much less than Sleepy | :zzz: 10 seconds (on a 2.x GHz P4 machine, lots of RAM - nothing else - much - going on)?
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 

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.