Click here to Skip to main content
14,268,298 members
   

C#

 
Questionpanel to image Pin
haseeb_saeed14-Apr-07 1:15
memberhaseeb_saeed14-Apr-07 1:15 
AnswerRe: panel to image Pin
Luc Pattyn14-Apr-07 1:32
professionalLuc Pattyn14-Apr-07 1:32 
GeneralRe: panel to image Pin
haseeb_saeed14-Apr-07 23:13
memberhaseeb_saeed14-Apr-07 23:13 
GeneralRe: panel to image Pin
Luc Pattyn15-Apr-07 0:09
professionalLuc Pattyn15-Apr-07 0:09 
Questionxpath not working [modified] Pin
praveenkumar palla14-Apr-07 1:01
memberpraveenkumar palla14-Apr-07 1:01 
Questionxpath not working Pin
praveenkumar palla14-Apr-07 1:01
memberpraveenkumar palla14-Apr-07 1:01 
AnswerRe: xpath not working Pin
Christian Graus14-Apr-07 1:09
protectorChristian Graus14-Apr-07 1:09 
QuestionProblem with refill of listview after removal in database Pin
henur13-Apr-07 23:48
memberhenur13-Apr-07 23:48 
Hi
I have a listview with items. I select, for instance 2 items for removal. I run my code to remove in database, wich work just correct.

Then i run my method for fill, in a class, to refill the listview from database.

In the case where i selected 2 items only 1 disappered from the listview, the other is still showing. If i select 1 item, that one is still showing after the fill.

I do not understand what happens. I rather new in C# but i have done the same in VB.NET and FoxPro 9.0 and i have no problems.

Here is the code. Anybody that can tip me about whats wrong ?

if (result == DialogResult.OK)
{
clsReadKatalog clsReadKatalog;
clsReadKatalog = new clsReadKatalog();
foreach (int idx in this.Katalog.SelectedIndices)
{
String xid = this.Katalog.Items[idx].SubItems[5].Text;
int tabortid = this.Katalog.Items[idx].Index;
clsReadKatalog.TaBortPost(xid); // DELETE FROM DATABASE
}
String urval = null;
urval = "SELECT * FROM pwd WHERE ownid="
+ "'" + this.GlobalAnvändare + "'"
+ " AND posttyp='1'";
OdbcDataReader Reader = clsReadKatalog.LäsKatalog(urval);
if (Reader.HasRows)
{
clsReadKatalog.FyllKatalog(Reader, this.Katalog); // REFILL FROM DATABASE
}

Here is the code for fill listview: This is the same method i run the first time, to fill the listview, before i make my selection for remove, and then it pick right from database.

public void FyllKatalog(OdbcDataReader Reader,ListView Lista)
{
Lista.Items.Clear();
int x=0;
while (Reader.Read())
{
Lista.Items.Add(Convert.ToString(Reader["beskr"]));
Lista.Items[x].SubItems.Add(Convert.ToString(Reader["anv"]));
Lista.Items[x].SubItems.Add(Convert.ToString(Reader["pwd"]));
Lista.Items[x].SubItems.Add(Convert.ToString(Reader["privatekey"]));
Lista.Items[x].SubItems.Add(Convert.ToString(Reader["vektor"]));
Lista.Items[x].SubItems.Add(Convert.ToString(Reader["id"]));
x += 1;
}
Reader.Close();
}

With Kind Regards

Heino

Heino Nurmik
AnswerRe: Problem with refill of listview after removal in database Pin
Christian Graus14-Apr-07 0:12
protectorChristian Graus14-Apr-07 0:12 
GeneralRe: Problem with refill of listview after removal in database Pin
henur14-Apr-07 3:32
memberhenur14-Apr-07 3:32 
GeneralRe: Problem with refill of listview after removal in database Pin
Christian Graus14-Apr-07 13:37
protectorChristian Graus14-Apr-07 13:37 
GeneralRe: Problem with refill of listview after removal in database Pin
henur15-Apr-07 20:14
memberhenur15-Apr-07 20:14 
Questionis any query (in sql server) that i can export data ? Pin
B.A13-Apr-07 23:26
memberB.A13-Apr-07 23:26 
AnswerRe: is any query (in sql server) that i can export data ? Pin
Colin Angus Mackay13-Apr-07 23:57
memberColin Angus Mackay13-Apr-07 23:57 
QuestionSerialization problem Pin
NaNg1524113-Apr-07 23:19
memberNaNg1524113-Apr-07 23:19 
AnswerRe: Serialization problem Pin
Christian Graus14-Apr-07 0:17
protectorChristian Graus14-Apr-07 0:17 
GeneralRe: Serialization problem Pin
NaNg1524114-Apr-07 1:09
memberNaNg1524114-Apr-07 1:09 
GeneralRe: Serialization problem Pin
NaNg1524114-Apr-07 1:48
memberNaNg1524114-Apr-07 1:48 
QuestionHow to check whether my application running under ClickOnce Pin
pashitech13-Apr-07 22:43
memberpashitech13-Apr-07 22:43 
Questionnetwork stream to byte[] Pin
marwan_siala13-Apr-07 22:41
membermarwan_siala13-Apr-07 22:41 
AnswerRe: network stream to byte[] Pin
Christian Graus13-Apr-07 22:42
protectorChristian Graus13-Apr-07 22:42 
GeneralRe: network stream to byte[] Pin
marwan_siala13-Apr-07 22:51
membermarwan_siala13-Apr-07 22:51 
GeneralRe: network stream to byte[] Pin
Christian Graus14-Apr-07 0:05
protectorChristian Graus14-Apr-07 0:05 
GeneralRe: network stream to byte[] Pin
marwan_siala14-Apr-07 0:27
membermarwan_siala14-Apr-07 0:27 
QuestionEncoding error.. help guys:( Pin
Muammar©13-Apr-07 22:27
member Muammar©13-Apr-07 22:27 

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.