|
Use a ListView.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Is it that easy?
Shame on me!!
I wil try it.
Thanks
|
|
|
|
|
But how will i bind the listview to the database table?
There is no datasource property.
|
|
|
|
|
ListView doesn't have any datasource property...u have to add Items and Subitems to display ur data....
Tirtha
Miles to go before I sleep
|
|
|
|
|
If you need an object exposing the DataSource property then use the DataGrid .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
if u have a dataset(say myDataset) populated with your records then try this....(code is in vb.net)
Dim lvItem As ListViewItem<br />
For i As Integer = 0 To myDataset.Tables(0).Rows.Count - 1<br />
lvItem = New ListViewItem(myDataset.Tables(0).Rows(i).Item(0))<br />
For j As Integer = 0 To NumberOfSelectedField<br />
lsItem.SubItems.Add(CStr(myDataset.Tables(0).Rows(i).Item(j + 1)))<br />
Next<br />
myListView.Items.Add(lvItem)<br />
Next
Tirtha
Miles to go before I sleep
|
|
|
|
|
|
Hello,
Which Exception appears when inserting duplicated data (primairy key) in a database?
In my application "System.Data.OleDb.OleDbException" appeared but that seems to general to me??
And how can i use the try, catch statement?
Thanks
|
|
|
|
|
That looks about right, it's a database exception, and there are not exceptions defined for everything that can happen in the DB. The text of the exception will explain it
keninfo wrote: And how can i use the try, catch statement?
If you really don't know how to use try/catch, you probably need to buy a book on VB and work through it. Or, at least try google.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I know a little how try catch is working but can you help me a little ?
|
|
|
|
|
Try
' do your processing here
Catch (WhateverException As Exception)
' handle the error here
Finally
' any additional processing that needs
' doing regardless of error handling
' release database connections, etc.
End Try
Read this[^] for more info.
|
|
|
|
|
Well, I assume you knew what you've been told ( as it's the bare bones of what try/catch does ). What did you need to know ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
How to get the current page number in ms word using vb.net.
i like to get the hyperlinks count in each page including the footnotes hyperlink and to store in an array
Thanks,
Nanda
|
|
|
|
|
i am trying to test the c dll in vb. but while calling the function it is giving me the follwing error.
Unhandled exception at 0x77f75a58 in Project1.exe: User breakpoint
the call from vb is like:
Dim buf As String
Dim xml As Long
buf = " "
xml = xmlnode_GetXml(root, buf, 10000)
and the code in c is like:
long __stdcall xmlnode_GetXml( XMLNODE xnode, char* pBuffer, long lBuflen )
{
std::string s = ((XMLNode*)xnode)->xml();
long l = (long)s.length();
if( pBuffer && lBuflen>0 )
{
memcpy( pBuffer, s.c_str(), (lBuflen
|
|
|
|
|
You have to allocate the right amount of memory for your buffer variable.
For instance:
Const lBufSize=10000
Dim buf as String * lBufSize
xml = xmlnode_GetXml(root, buf, lBufSize)
I used a const to highlight the requirement that buffer size must match the one passed to the called function.
Hope that helps
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
|
Hi all,
By using MSCOMM control i am able to make a phone call.But It requires Modem &
Phone.Is there any way of avoiding Modem,Is it Posible to make a phone call without using modem ? Please give me suggetions for this .
Thanks & Regards
Raju.
|
|
|
|
|
It depends on how you want to connect.
If you are using a PABX you need a TAPI driver from the vendor and make an application which instructs the TAPI driver.
This is called CTI(Computer Telefony Integration) and CSTA (Computer Supported Telefony Application).
Regards,
Bas
|
|
|
|
|
Hi,
I Get the Table values from sql server 2005 and display it in a DataGrid View in VB.NET 2005 Now I want to Add new record and Edit the values of existing one.
How to do it? Give me sample code..
Thanks in Advance
|
|
|
|
|
Hi, can anyone tell me how to disallow setting a property at run time like that of the Style property of a ComboBox where we are allow to set the style at design time but not via code.
|
|
|
|
|
In the Set code for your Property, check the status of the DesignMode property of your control. It'll return True of False depending on if your code is running under the forms designer or not.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi!
I have a string something like.
"#Title#CodeProject.#Description#The title name is CodeProject.#Summary#This is summary"
Which is stored in sql server and is rendered in powerpoint slides using automation using interop library. My problem here is I have to make any strings BOLD thats in between # and #.
Could someone please help
|
|
|
|
|
Does the automation library support RTF?
|
|
|
|
|
I dont know. coz i am hardcoding those strings with that are between "#" while inserting into sql table so that i could read anything that goes between # and make it bold.
please help
|
|
|
|
|
How are you moving the text into Powerpoint? What method calls are you using? Because it will be somewhere close to here that you will probably select the text between hashes, using the positions of the hashes in the original text, and set the bold attribute of the font for that text.
Example (pseudo code, you'll have to read up on how to really do this in Powerpoint VBA):
Dim oldText as string
Dim newText as String
Dim start as Integer, end as Integer
oldText = "I want #this# word bold"
start = Pos("#", oldText) ' Get pos of first #
end = Pos("#", oldtext, start) ' Get pos of first # after start pos.
newText = Strip(oldText, "#") ' Removed # from text
PPSlide.Insert(newText)
PPSlide.Select(newText, start, end)
PPSLide.Selection.Fond.Bold = true
"A little learning is a dangerous thing; drink deep, or taste not the Pierian spring: there shallow draughts intoxicate the brain, and drinking largely sobers us again.", by Alexander Pope
My Blog
|
|
|
|