|
how i will generate auto number from particular number like 108 to 200 using xsl?
veerabagu
|
|
|
|
|
You want to specify two numbers and get back a sequence, using XSL ? Why ? We have an XML/XSL forum, BTW.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I have two for loops from which I am displaying the folder items in a table.
i.e. 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.
|
|
|
|
|
your datagrid can be told to handle paging for you. If you build an array or list of the items you want to display, you can use that as a datasource.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
The VB.NET code for displaying folder in 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
How can I make an array or list of the items and display it to datagrid and allow paging.
|
|
|
|
|
Create a list first, then instead of calling writeline, add the items to your list. Of course, this will give you a list, not a tree.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
That's the problem that i am not getting how to make an array or list from these for loops and populate the items into the datagrid to do further formatting like paging and all!
I want the exact look like a mailbox i.e. when we click on the folder name then the respective folder contents should be displayed in the datagrid with paging.
|
|
|
|
|
bhavna816 wrote: I want the exact look like a mailbox
OK, then you really want to use a repeater or a grid control, not a dataview, because you want to expand and contract groups.
At the most basic level
Dim items as List<string> = new List<string> ' who knows what brackets VB uses ?
'Looping all the subfolders
For j = 1 To 2
sfolder = oFol.Item(j)
items.Add(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
items.Add(oMail.Subject)
Next
Next
myDataGrid.DataSource = items
myDataGrid.DataBind()
This will just give you a list. You'd need to create a list of a struct or something to store more info, like waht is a folder. Then you've have to write the code to render it accordingly.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Christian Graus wrote: Dim items as List<string> = new List<string> ' who knows what brackets VB uses ?
Did you mean this:
Dim items As System.Collections.Generic.List(Of String)
Shreekar
|
|
|
|
|
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
|
|
|
|