|
u can try
string[] str = new string[Dset.Tables[0].Columns.Count-1];
for(int i=0;i<=str.Length;i++)
{
str[i] = objDataRow[i].ToString();
}
for(int i=0; i < ds.Tables[0].Rows.Count ; i++)
{
ListViewItem listItem = new ListViewItem(str);
listView1.Items.Add(listItem);
}
rahul
|
|
|
|
|
thanks for you time
Tamimi - Code
|
|
|
|
|
That is not possible. The class has no method to convert the values to strings and put in an array. You have to use a loop.
---
b { font-weight: normal; }
|
|
|
|
|
i thought its possible !! because you can convert it
to array of objects (datarow.itemarray)..
anyway i did it with a loop
thanks for the note
Tamimi - Code
|
|
|
|
|
Tamimi - Code wrote: i thought its possible !! because you can convert it
to array of objects (datarow.itemarray)..
That is different, as getting the data as an array of objects doesn't change the data type of the items, it just puts the items in a different data structure. To get an array of strings you have to convert each value to a string.
---
b { font-weight: normal; }
|
|
|
|
|
Hi All ,
I have a registration form in which i need to check whether the email provided by the user exist in the db. I have couple of code for doing this using AJAX, but the code is not working in Netscape and other non IE browsers.
Please help.
Thanks,
Joe.
Quotes are nothing but inspiration for the uninspired. - Richard Kemph
|
|
|
|
|
|
hi all,
i have a string
s="05/12-17:25:05-#3 05/12-17:24:56-#3 05/12-17:24:44-#0 05/12-17:24:32-#3";
like this
and have some code like this in a for loop :
string[] dateopened = new string[80];
string[] houropened = new string[80];
string[] whoopened = new string[80];
char[] splitter = { '-',' ' };
char[] myChar ={ ' ' };
while(s.Length>0)
dateopened = s.Split(splitter);
Console.WriteLine(Convert.ToString(dateopened[i]));
houropened = s.Split(splitter);
Console.WriteLine(Convert.ToString(houropened[i]));
whoopened = s.Split(splitter);
Console.WriteLine(Convert.ToString(whoopened[i]));
s = s.Remove(0, 17); //after adding these two lines my codes work.
s = s.Trim();
}
when i run my program i get the output like that :
05/12
05/12
05/12
17:25:05
17:25:05
17:25:05
#3
#3
#3
05/12
05/12
05/12
17:24:56
17:24:56
17:24:56
#3
#3
#3 ...
why am i getting each value 3 times ?
where am i doing wrong ?
what should i do to have each value only ones ?
thanks in advance,
bye.
-- modified at 9:35 Wednesday 14th June, 2006
|
|
|
|
|
can u mention what char u r using to split
i.e value of splitter.
try to use
dateopened = s.Split(splitter);
Console.WriteLine(Convert.ToString(dateopened[0]));
houropened = s.Split(splitter);
Console.WriteLine(Convert.ToString(houropened[1]));
whoopened = s.Split(splitter);
Console.WriteLine(Convert.ToString(whoopened[2]));
rahul
-- modified at 4:59 Wednesday 14th June, 2006
|
|
|
|
|
It is difficult to know for sure what your problem is, as you did not include all your code. For instance, what is the value of splitter, and what does your loop look like?
Try stepping through your code and examining the value of dateopened, houropened, and whoopened. I think you will find that they all contain the same thing, an array with all the dates, all the hours, and all the whoopened.
You might try modifying it like this:
stringarray = s.Split(splitter);<br />
Console.WriteLine(Convert.ToString(stringarray[i*3]));<br />
Console.WriteLine(Convert.ToString(stringarray[i*3 +1]));<br />
Console.WriteLine(Convert.ToString(stringarray[i*3 +2]));
This is assuming that the first iteration of the loop, i is zero.
I hope this helps.
Roy.
|
|
|
|
|
I need to draw vector images in my form, so the user can modify, resize, move the points.
Can i do it?
|
|
|
|
|
Hi to all, my query is
That what is spyware signature and how can be genrated show any method and example of spyware signature.Anyone know about this query Please help.
|
|
|
|
|
|
|
Hi ebody,
I need to populate my listview with a XML file as my datasourse. I want to populate two columns from the xml file. Plz guide me.
This below xml is my xml datasource. I need to populate SearchName and ID elements from this xml to my listview.
Thanks in advance.Plzzz urgent help.. (I am using c# windows application.)
<repositorysearch>
- <fields>
<id>1
< SearchName >search name 1< /SearchName >
<documentname>document name 1
<documentdescription>description 1
<documenttype>Adobe Acrobat
- <fields>
<id>2
<searchname>search name 2
<documentname>document name 2
<documentdescription>description 2
<documenttype>Microsoft Word
-- modified at 3:50 Wednesday 14th June, 2006
|
|
|
|
|
u can fill dataset from ur xml file by using dataset's readxml method.
then u can populate listview from this dataset by adding items in listview.
rahul
|
|
|
|
|
try this:
DataSet ds = new DataSet();
ds.ReadXml("Users.xml");
for(int i=0; i
|
|
|
|
|
Hi .. all
i wanna display a image in my page ....
im getting it as a byte array from db. the problem is i should not store it any where(neither in the client nor in the server side).
i wanna give this image as the source for a server side image tag.
<br />
byte[] Img =job.getLogo(Id);<br />
location = Server.MapPath("/job/temp/"+company + ".jpg");<br />
FileStream fs=new FileStream( location, FileMode.OpenOrCreate,FileAccess.Write);<br />
byte[] buffer = Img;<br />
BinaryWriter fileWriter = new BinaryWriter(fs);<br />
fileWriter.Write(Img);<br />
fs.Close();<br />
Logo.Src =System.Configuration.ConfigurationSettings.AppSettings["tempFolder"]+("/temp/"+company+".jpg");<br />
any ideas???
thanx in advance..
sathy
|
|
|
|
|
Hi.
I need to find someway or somekind of installer that will be able to install the following.
The dot net framework
The MSDE i use for the database, and the ini file after extraction must be written with the correct values.
My app, the setup files, as it has already been compiled into installation files.
I tried to include the msde and that into the installer of my app but the problem being that you can't install to different installations at the same time.
Or is the only way to do it by installing them all seperately, with that saying that the users are going to run away
Thanx in advance
He who laughs last is a bit on the slow side
|
|
|
|
|
Try innosetup it's free.
Just include other packages in the installer itself.
You can also try nullsofts installer.
I did this with my own java programs and included the JRE in the install program with options to allow the user to install or bypass.
|
|
|
|
|
Will check it out. thanx
If looked at a couple other but doesn't seem that they can fire another setup.exe
He who laughs last is a bit on the slow side
|
|
|
|
|
Mr. VB.NET wrote: I did this with my own java programs and included the JRE in the install program with options to allow the user to install or bypass.
In vb i'm totally lost. I got the innosetup to unpack my setup files, but how do I trigger them, and like you said to allow or bypass certain steps
Thanx in advance
He who laughs last is a bit on the slow side
|
|
|
|
|
Use NULLSOFTs NSIS
It will take you about three days to learn it, they have tons of examples.
|
|
|
|
|
I got that one and then the innosetup aswell.
Looks like time to start learning scripting, which one of the two would you say will be the easier one to learn the quickest?
He who laughs last is a bit on the slow side
|
|
|
|
|