|
I'm kind of at a loss of what your trying to do with the listview, the vb.net listview has a backcolor and picture properties.
If you are you trying to add colors to the sub items, you'll need to set the listviewitem "UseItemStyleForSubItems" property to false:
' Make a ListView row.
Private Sub ListViewMakeRow(ByVal lvw As ListView, ByVal item_title As String, ByVal ParamArray subitem_titles() As String)
' set the listviw back color
lvw.BackColor = Color.LightGoldenrodYellow
' Make the item.
Dim new_item As ListViewItem = lvw.Items.Add(item_title)
'must set useritemstyleforsubitems = false to change color
new_item.UseItemStyleForSubItems = False
' Make the sub-items.
For i As Integer = subitem_titles.GetLowerBound(0) To subitem_titles.GetUpperBound(0)
new_item.SubItems.Add(subitem_titles(i), Color.Black, Color.AliceBlue, Font)
Next i
End Sub
I hope this helps
|
|
|
|
|
I am recreating a Windows Explorer control. I am stuck at making the selected column (when in details view) have a different color. I was hoping that maybe I could paint the rectangle when the packground was painted and the items would still paint alright. I am just trying about anything I can think of or find close on the internet.
|
|
|
|
|
Hai...
I want to extract wav file from the mp3,mpeg,avi or wmv files. With this i want to display the wav file in my application. I can do this, my problem is to convert into wav file from the above formats.
Thanking you,
e.veera raghavendra
|
|
|
|
|
I am having a datagrid which is reading data from an XML file
<?xml version=""1.0"" encoding=""ISO-8859-1""?><medgivanden><medgivande betalarnummer=""121212121212"" status=""10"" datum=""2004-12-31""><avtal avtalsnummer=""11111111111"" produkt=""Skoter""/><avtal avtalsnummer=""22222222222"" produkt=""Tjej MC""/><avtal avtalsnummer=""33333333333"" produkt=""Hem och Villa""/></medgivande><medgivande betalarnummer=""121212121212"" status=""10"" datum=""2004-12-31""><avtal avtalsnummer=""23232323232"" produkt=""Personbil""/><avtal avtalsnummer=""45454545454"" &produkt=""Liv""/></medgivande></medgivanden>
Now this will show + signs in the datagrid.
What i am not able to do is to be able to select the row when i click on it . I want to get the a few selected columns of the parent row.
How can i get the columns of the selected parent row.
|
|
|
|
|
Hi nitin
this is what i would do.
You can i add a button column in your datagrid.Make it a select button
Sub ItemsGrid1_Command(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid1.ItemCommand
' this event is raised when any row on a datagrid is clicked if you are doing more than one task
' so in order to differentiate the eevents you can check for the commandname
'this name tag is attached to the commandbutton column of your datagrid
If e.CommandName = "Select" Then
Dim column5 As String = e.Item.Cells(5).Text
Dim column6 As String = e.Item.Cells(6).Text
column7 = e.Item.Cells(7).Text
end if
end sub
I hope this is helpful to you
Mandar Patankar
Microsoft Certified professional
|
|
|
|
|
Hello,
I have an Identity column 'FormNo'...'autogenerated/seeded' column in my (SQL Server) database. I am using datagrid to display the records. My 'Insertvalues' with codebehind is working since the FormNo is automatically incremented on saving. But my 'UpdateValues' refuses to work or recognize the 'FormNo'...In general my datagrid does not seem to like identity columns.
Can someone kindly throw some light on the 'Identity' columns in datagrid?
Thanks a ton!!
arty=me
|
|
|
|
|
|
Hi all, ok, as the subject stated, I am trying to make my form link up to a Ms Access file that is password protected. I tried linking using oledbdataadaper1 on a un-protected MS Access file and it works fine, I can access the inside DB and all. But when I put a password into that Access File, I cannot get my form to link up to it.
It came out a message saying 'Test connection failed because of an error initializing provider'. I put the username as Admin and the password I put in for the Access file, but still this error... Anyone have any idea where I went wrong.? Thanz..
|
|
|
|
|
In the connection string, you have to supply a User Id, Password, and possibly the System Database path that holds the workgroup security information. I really can't tell you for sure because I stopped using Access for all of my database work years ago.
Just a little sample:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyDb.mdb;Jet OLEDB:System Database=C:\MySystemDB.mdw"
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hmm, didn't really help there since I am using the oledbdataadapter wizard to link to my MS Access file.. Anyone else who got any idea to my situation..? Thanz anyway, Dave.
P.S :- You mentioned that u are not using Access years ago... What are you using now to keep your data and all.. Can it be password protected? If so, I might want to look into it...
|
|
|
|
|
icowa wrote:
What are you using now to keep your data and all
He might be using SQL Server.
icowa wrote:
Can it be password protected?
You can use a combination of user name and password to access the data.
<italic>Work hard, Work effectively.
|
|
|
|
|
If your using the Wizard to generate the OleDb code, then I think you're out of luck using a password protected Access database. I found the code the Wizards generated to much of a pain to maintain, so I would HIGHLY recommend writing the code by hand. It's much easier to maintain, by FAR, much easier to ask questions about in the forums, much easier to debug, and it gives you much greater control over how your code runs.
I use MSDE and SQL Server. Both of which has security FAR better than anything you'll find in Access.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
mmm, I was afraid you'll say that. The part about vb.net not being able to access a password protected Access file. Yea, I read a lot of PDF files on this sql but not a one of them is very intuitive on how you go and create a SQL Db and accessing it and providing it with password and all. Thats what made me go and figure out on Access on the first place.
Since I search throughout the net before and not having much luck, do you know of any sites or maybe you have any PDF files that is good in teaching u on SQL. Preferably with good DIY step by step instructions... Thanz
|
|
|
|
|
icowa wrote:
The part about vb.net not being able to access a password protected Access file.
I didn't say it couldn't access a password protected Access file. I said it wasn't supportable in the forums because the Wizard is completely visual. It's FAR easier to deal with code that is hand written then it is to deal with the stuff that the Wizard generates.
icowa wrote:
Since I search throughout the net before and not having much luck, do you know of any sites or maybe you have any PDF files that is good in teaching u on SQL. Preferably with good DIY step by step instructions
I don't have anything. I taught myself SQL Server straight out of the Administrators manuals.
There's no such thing as adding a single password to an SQL Server database. Each SQL Server can maintain it's own users and groups. You can give each user/group rights to specific databases, tables, procedures, ... Right down to even who can execute which procedures and who can can cannot read/write whatever tables in the databases.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
No, you learn how to write the code yourself instead of having a Wizard mess it up for you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is there no one who can help me on this area?
|
|
|
|
|
You said the database is password protected. How is it protected?
In Access there are 2 ways to protect a database. 1 is by setting the database password (this will simply prompt for a password when you try to open the db), the other is by setting up users and using a workgroup database to store this info.
How you access the DB in code will depend on which method used.
Jon
|
|
|
|
|
My password protection for the MS Access file is the one you have to key in whenever u open the file..
|
|
|
|
|
icowa wrote:
Is there no one who can help me on this area?
Have patience. You got an initial reply in 4 hours and you posted this after 8 hours. That isn't too bad considering how much this service is costing you (i.e. nothing). Everyone who responds here are volunteers. If you need a fast solution to your problem then you can always open a support incident with Microsoft.
Anyway, to your problem. First, try not to use the wizards - if you feel you must, at least look at the code they generate. You can look at the code the wizard generates and modify the connection string. Dave already suggested one. You can find more examples at http://www.connectionstrings.com/[^]
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
I completely forgot about that site!
Thanks Colin!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How do I take a string that a user typed into my app and run it as code or use it to call a function within the form (like a scripting engine). Im trying to make a 3D Turtle Graphics Engine from scratch. The code will be calls to functions like "forward(10)" and needs to pass the variables. I have everything except for the string-->code part...
Thanks in advance!
|
|
|
|
|
Since the .NET Framework doesn't know anything about the Turtle graphics language, you don't have anyting to compile. You'll have to write the virtual machine and interpreter to understand your Turtle language. You have to interpret the statements and maintain your virtual machines state as you step through the program.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
im going to use a bitmap as the back, and just make a group of functions to control it. i want the string>script to call functions and pass variables.
|
|
|
|
|
What you really want is to parse the code entered, and run your internal code in response to it.
Christian Graus - Microsoft MVP - C++
|
|
|
|