|
While adding columnstyle, you can change the width of the column, i think it should work fine.
ldgColumnText = New DataGridTextBoxColumn
ldgColumnText.MappingName = "MyColumnMappingName"
ldgColumnText.HeaderText = "Header I want on Grid"
ldgColumnText.Width = 200
ldgColumnText.TextBox.MaxLength = 15
ldgColumnText.TextBox.TextAlign = HorizontalAlignment.Left
ldgColumnText.TextBox.Enabled = False
ldgColumnText.ReadOnly = True
Call ldgTableStyle.GridColumnStyles.Add(ldgColumnText)
I have made line of code in bold which i think allows u to change the width of the column.
try and let me know the exact problem, if still it persists.
Het Waghela
Be Humble in Victory and Strong in Defeat.
Het Waghela, Blog|Het Waghela DotNet Questions Link|More Links
|
|
|
|
|
Hi,
I have problem when trying to print Crystal report from vb.net.
Program is very simpel : He accepts 4 parameters from 1 ComboBox and 3 TextBoxes and that should be printed in Crystal Reports report, but constantly shows " An unhandled exception of type 'System.ArgumentException' occurred in system.drawing.dll
Additional information: '-1' is not a valid value for 'value'. 'value' must be greater than or equal to 0. "
the code is below, thanks in advance for help.
Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument
Dim paramFields As New CrystalDecisions.Shared.ParameterFields
Dim paramField As New CrystalDecisions.Shared.ParameterField
Dim discreteVal As New CrystalDecisions.Shared.ParameterDiscreteValue
paramField.ParameterFieldName = "txtPrefix"
discreteVal.Value = cboPrefix.SelectedText
paramField.CurrentValues.Add(discreteVal)
discreteVal = New CrystalDecisions.Shared.ParameterDiscreteValue
paramField.ParameterFieldName = "txtDate"
discreteVal.Value = txtDate.Text
paramField.CurrentValues.Add(discreteVal)
discreteVal = New CrystalDecisions.Shared.ParameterDiscreteValue
paramField.ParameterFieldName = "txtpartnr"
discreteVal.Value = txtPartNr.Text
paramField.CurrentValues.Add(discreteVal)
discreteVal = New CrystalDecisions.Shared.ParameterDiscreteValue
paramField.ParameterFieldName = "txtPickingLocation"
discreteVal.Value = txtPickingLocation.Text
paramField.CurrentValues.Add(discreteVal)
paramFields.Add(paramField)
CrystalReportViewer1.ParameterFieldInfo = paramFields
CrystalReportViewer1.ReportSource = "C:\DotNetApps\Printlabel\WindowsApplication1\kistlabel.rpt"
CrystalReportViewer1.PrintReport()
|
|
|
|
|
I am using a vc++ dll in a vb program. The function require a pass byref single type. because in vc++ it require a floating point pointer. However, the values I'm getting is wrong. Anyone got any idea what could be wrong? I guessing the values are read in the wrong direction.
Thanks for any help.
Aaron
|
|
|
|
|
float* is not equal to single byref .
byref means the value is passed by reference, where pointers don't. it should be float& instead...
moreover, i'm not certain that float is the equivalent to single . isn't float (vb type) better ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I have check on msdn, there is no float type for vb 6.0. Not sure about .net.
I've look up several papers saying that when the vc function in the dll is using a pointer as a parameter, the vb-side of calling the function should be using byref.
Aaron
|
|
|
|
|
aarontan wrote:
I have check on msdn, there is no float type for vb 6.0. Not sure about .net.
Surely VB6 has a type for floating point numbers ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
The C/C++ float data type is equivalent to a VB6 Single .
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I wanted to override the onpaintbackground of my listview control, but it never seems to be invoked. Is there a way I can cause it to invoke..maybe getting a message from WndProc. If so, what message?
|
|
|
|
|
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?
|
|
|
|