|
Thanks
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Sir,
Like in Listview ,if i have to add items in listview control.
Then i do the following
dim items as new listviewitem
items.subitems.add("")
Is there exist any option in the datagrid that helps in adding new rows Thanks and Regards
pankaj
|
|
|
|
|
I believe so, but it kind of wastes what the datagrid is most good at, displaying data from a source.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Actually i have coded this whole thing in console and displaying the output as a table format in HTML.my output is something like this in HTML page:
Deleted Items
From: Subject: Received: Size: No.of Attachment(s):
bhavna final 1/12/2007 2:34:14 PM 4949 0
Inbox
From: Subject: Received: Size: No.of Attachment(s):
bhavna attachement test 1/22/2007 12:52:32 PM 6449 1
Now i want that if suppose i m having hundreds of records in my inbox then i have to allow paging like 10 or 20 records at a time.So is the datagrid is the right option for tht or i hv to go with the frames of the HTML?
|
|
|
|
|
Datagrid is the correct option and your thinking is correct, that you should use datagrid.
Do NOT use frames for this type of thing....though how exactly you plan to use them escapes me...
Anyways, the route that Christian suggested is the way to go.....were you successful in that?
This is how the generic list class is constructed in VB.Net
Dim items As System.Collections.Generic.List(Of String)
Hope this helps.
Another option to look at is using the ObjectDataSource by creating maybe an object of Message class...
Shreekar
|
|
|
|
|
Actually i have coded this whole thing in console and displaying the output as a table format in HTML.my output is something like this in HTML page:
Deleted Items
From: Subject: Received: Size: No.of Attachment(s):
bhavna final 1/12/2007 2:34:14 PM 4949 0
Inbox
From: Subject: Received: Size: No.of Attachment(s):
bhavna atmttest 1/22/2007 12:52:32 PM 6449 1
Now i want that if suppose i m having hundreds of records in my inbox then i have to allow paging like 10 or 20 records at a time.So is the datagrid is the right option for tht or i hv to go with the frames of the HTML?
The VB.NET code for displaying folderin an HTML table is:
'Looping all the subfolders
For j = 1 To 2
sfolder = oFol.Item(j)
s.WriteLine(sfolder.Name)
'Looping the Mailitems of the Subfolders with the sender's name, Subject,Recevied Time,Size of the mail
Dim i As Integer
For i = oItems.Count To 1 Step -1
s.WriteLine(oMail.Subject)
Next
Next
this "s" is the stream for displaying data in HTML page.from outer for loop I am displaying the folder names and from inner loop I am displaying the contents of that folders .
Now I want to do paging since in case of hundreds and thousands of msgs in my inbox.
So I think datagrid is the best option for tht
but I am getting how to populate the datagrid according to this and do paging in tht.
|
|
|
|
|
what am saying is that my local languages is not English. It is called Amharic it is in Ethiopia. I just wanted to develop simple word processing using this language. I started creating menu. But I couldn't. It is displayed as junk. If you can give some clue , please. And also any useful idea and/or sample project on how to create simple word processing using visual basic 6. Thanks in advance.
It is me.
It is me.
|
|
|
|
|
You probably need to post some code, sounds like a Unicode issue. I can't help more, I never use VB6.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi,
im working on a lucky draw game which will generate a random name and details, such as email, telephone number and IDnumber, from the database.the result can't be repeated.but i dont know how to go abt it..can anyone pls teach? thanks.
|
|
|
|
|
The Random class will give you a random number. If you have a database, you can generate numbers to be the Ids of values in there. Or, just build arrays to look into.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
i have a database.but i dont know how to generate the random numbers...can you pls tell me the steps on achieving it?
|
|
|
|
|
I did - the Random class. As in
Dim r as Random = new Random()
dim i as int = r.Next(100)
that will generate a number between 0 and 100. I recommend making the random class a member, if you keep creating new ones, it's less random.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
i have a database of data that i wish to randomly pick out a number and extract all the data belonging to it.i dont know how to start coding it, can you tell me the steps on how to do it?
|
|
|
|
|
The SQL to get the highest possible ID is select max(ID) from dataTable, where id is the id column and dataTable is the table name. Then use that value in the Next method of the Random class, to get an Id for a select statement.
If you're saying that you have no idea how to access your database, then the web is full of articles on how that's done.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
the main thing is i dont know how to code the random class to randomly select the data frm the database and the logic to generate it using arraylist in a loop, etc.
i do know how to use SQL statements to access e database.yea.
pls help...
|
|
|
|
|
The answer to that has not changed since I told you, 23 hours and 28 minutes ago. Check my response above.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hello everybody,
I've created setup of my vb.net application using installshield 12.
This setup when installed on my development machine works fine.
But when i install this thing on another machine which has only .Net framework and MS-office, and try to run my exe it gives me error which says:
No accessible overloaded 'SqlCommand.Transaction' is most specific for these arguments: <br />
Public Sub set_Transaction(value As System.Data.SqlClient.SqlTransaction)<br />
Public Sub set_Transaction(value As System.Data.Common.DbTransaction)
Can naybody help me out and tell me what this error is about?
Thanks in advance............
|
|
|
|
|
What database are you using, Access ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
No ! i am using SQL server 2000. This works fine on my developemtn machine.
But when i create a setup using installshield 12 and install it on test machine it gives the said error.
|
|
|
|
|
Nilesh Hapse wrote: i am using SQL server 2000.
OK, but you didn't say SQL Server is installed on the target machine. so, how can it work ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
on the test machine SQL client is installed.
SQL server is installed on another machine. I am getting the server details thru a file.
From those details i am formatting the connection string and connecting to the database.
|
|
|
|
|
It's the exact same project ? It looks to me like you need to be more specific about which item you're trying to pass through.
Why did yo usay you had Office installed, when you're using SS ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Sir/madam,
There is a listview in my form. I added the checkbob option into it.Now the problem is , I don't know the event , Which should activate when i check/uncheck the checkbox into the listview.
Please help.
Thanks and regards
Pankaj
-- modified at 2:41 Monday 22nd January, 2007
|
|
|
|
|
Hi
I have a datetime picker and a textbox on my form.... Which ever date i select from the datetime picker,i want the date tobe incremented by one year on the next textbox.
For e.g: If the date selected in the dateTime picker is '10/11/2006' then in the other textbox i want the date to be '10/11/2007'.
How to go abt in doing this?
Thanks
Riz
|
|
|
|
|
Private Sub DateTimePicker1_ValueChanged _<br />
(ByVal sender As System.Object, ByVal e As System.EventArgs) _<br />
Handles DateTimePicker1.ValueChanged<br />
TextBox1.Text = DateTimePicker1.Value.AddYears(1).ToShortDateString<br />
End Sub
|
|
|
|