Click here to Skip to main content
15,911,891 members
Home / Discussions / C#
   

C#

 
GeneralExport to excel data from ultrawebgrid rows Pin
sunilmskr6-Jun-05 17:52
sunilmskr6-Jun-05 17:52 
QuestionCreating index lists? Pin
MrCase6-Jun-05 15:13
MrCase6-Jun-05 15:13 
AnswerRe: Creating index lists? Pin
MoustafaS6-Jun-05 15:39
MoustafaS6-Jun-05 15:39 
AnswerRe: Creating index lists? Pin
Christian Graus6-Jun-05 15:46
protectorChristian Graus6-Jun-05 15:46 
GeneralExport SMTP server from outlook Pin
Christian Graus6-Jun-05 14:50
protectorChristian Graus6-Jun-05 14:50 
GeneralRe: Export SMTP server from outlook Pin
Alex Korchemniy7-Jun-05 14:33
Alex Korchemniy7-Jun-05 14:33 
GeneralRe: Export SMTP server from outlook Pin
Christian Graus7-Jun-05 14:41
protectorChristian Graus7-Jun-05 14:41 
GeneralWord 2003 interop dll Pin
blondy6-Jun-05 14:05
blondy6-Jun-05 14:05 
GeneralRe: Word 2003 interop dll Pin
Anonymous6-Jun-05 15:54
Anonymous6-Jun-05 15:54 
GeneralRe: Word 2003 interop dll Pin
Alex Korchemniy7-Jun-05 14:36
Alex Korchemniy7-Jun-05 14:36 
GeneralSending Data through USB Pin
BrianCR896-Jun-05 13:42
BrianCR896-Jun-05 13:42 
GeneralRe: Sending Data through USB Pin
Alex Korchemniy7-Jun-05 14:38
Alex Korchemniy7-Jun-05 14:38 
GeneralRe: Sending Data through USB Pin
Alex Korchemniy7-Jun-05 14:41
Alex Korchemniy7-Jun-05 14:41 
GeneralRe: Sending Data through USB Pin
BrianCR898-Jun-05 7:28
BrianCR898-Jun-05 7:28 
GeneralThreads that doesn't start Pin
Alex Cutovoi6-Jun-05 13:17
Alex Cutovoi6-Jun-05 13:17 
GeneralRe: Threads that doesn't start Pin
S. Senthil Kumar6-Jun-05 20:54
S. Senthil Kumar6-Jun-05 20:54 
GeneralListview in child window is not updating data Pin
greg_quinn6-Jun-05 9:58
greg_quinn6-Jun-05 9:58 
I'm having this strange problem where I have updated data in one MDI child window, and want to refresh the data in another MDI child window.

I have a function called populateExhibitions which fills a listview with data from my db. This works fine first time round. But when I called populateExhibitions from another MDI child window,

i.e

<br />
frmExhibitions fExhibitions = new frmExhibitions();<br />
fExhibitions.populateExhibitions();<br />


it then calls my populateExhibitions function again, but it never updates the data in the list view. Even though the data coming from the database is indeed updated! (The datareader object proves this to me!)

<br />
public void populateListViewExhibitions(DataListView.DataListView dataListView)<br />
		{<br />
			dataListView.Items.Clear();<br />
                        OdbcConnection objConnection = new OdbcConnection(getConnString());<br />
			string sql = "Select id, name from exhibitions order by name";<br />
			<br />
			objConnection.Open();<br />
			OdbcCommand objCommand = new OdbcCommand(sql, objConnection);<br />
			OdbcDataAdapter objDataAdapter = new OdbcDataAdapter(objCommand);<br />
			DataTable dtListView = new DataTable();<br />
		<br />
			objDataAdapter.Fill(dtListView);<br />
			dataListView.AutoDiscover = false;<br />
			dataListView.Columns.Add("ID", "ExhibitionID", 200);<br />
			dataListView.Columns.Add("Name", "name", 200);<br />
			dataListView.DataSource = dtListView;<br />
			<br />
			objConnection.Close();<br />
<br />
			// looping through a datareader shows the new data is coming from the db<br />
                        objConnection.Open();<br />
			OdbcDataReader objDataReader;<br />
			objDataReader = objCommand.ExecuteReader();<br />
            <br />
			<br />
                        while(objDataReader.Read())<br />
			{<br />
				MessageBox.Show("Name = " + objDataReader["Name"].ToString());<br />
<br />
<br />
			}<br />
<br />
			objDataReader.Close();<br />
			objConnection.Close();		<br />
		}<br />


What am I missing here?
GeneralRe: Listview in child window is not updating data Pin
Luis Alonso Ramos6-Jun-05 13:11
Luis Alonso Ramos6-Jun-05 13:11 
GeneralExporting contact info in outlook with C# Pin
rrd9c6-Jun-05 9:27
rrd9c6-Jun-05 9:27 
QuestionHow to call function in another MDI child window Pin
greg_quinn6-Jun-05 9:05
greg_quinn6-Jun-05 9:05 
AnswerRe: How to call function in another MDI child window Pin
S. Senthil Kumar6-Jun-05 20:57
S. Senthil Kumar6-Jun-05 20:57 
GeneralIs it possible to get my webpage url Pin
god4k6-Jun-05 8:49
god4k6-Jun-05 8:49 
GeneralRe: Is it possible to get my webpage url Pin
Colin Angus Mackay6-Jun-05 10:11
Colin Angus Mackay6-Jun-05 10:11 
QuestionElegant Client/Server? Pin
methodincharge6-Jun-05 7:51
methodincharge6-Jun-05 7:51 
AnswerRe: Elegant Client/Server? Pin
Christian Graus6-Jun-05 12:52
protectorChristian Graus6-Jun-05 12:52 

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.