|
I know about the event. I could save to xml but i'd rather save as a string collection in the settings, problem is, i don't know how to go about it.
Posted by The ANZAC
|
|
|
|
|
Which version of .NET are you using? 1.0, 1.1 or 2.0?
|
|
|
|
|
I'm using 2.0. Anyway thanxs for your help, i figured it out using a string collection setting, on load it fills the listbox with the collections items and on closing it removes all checked items then saves the rest to the collection. thanx again for your help.
Posted by The ANZAC
|
|
|
|
|
Hello,
I have just had a error deploying a clickonce application. The error is below and has been solved
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {10020200-E260-11CF-AE68-00AA004A34D5} failed due to the following error: 80040154.
The above problem caused me hours to solve. However, was solved my simply by doing the following: regsvr32 sqldmo.dll. to register the dll on the client machine.
I have created a deployment using the MSI, and never had this problem. But clickOnce does cause this problem if the dll does not exist and is not registered on the client machine.
Is there any way that you can use clickone to add this dll on the client's machine, so I don't have to go to trouble of registering manually.
When I publish this file I have added all the required dlls.
This is what I have done:
1. In the solution explorer | references | properties | set the sqldmo local copy to true
2. On the publish tab | Application File | set the publish status for the sqldmo.dll to include and required
3. Prereqisities | Added the .net framework, CR Reports .Net, MS Data Access components.
VB 2005 & SQL Server 2005.
Many thanks for any help,
Steve
|
|
|
|
|
anyone know how to pass some information from datagrid to EXCEL?? which from the row 1 of the datagrid to the last row.
|
|
|
|
|
I can be somthing like this:
Private Sub cmdCreateXLTemplate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCreateXLTemplate.Click
Dim ColHeadings() As String = {"warehouse", "product", "alpha"}
Dim xlApp As New Excel.Application
Dim xlBook As Excel.Workbook
Dim Row As Integer = 1
Dim Col As Integer
xlBook = xlApp.Workbooks.Add
xlBook.Sheets(2).Name = "ErrorData"
'Column Headings
For Col = 1 To ColHeadings.GetUpperBound(0)
xlBook.Sheets(1).cells(2, Col) = ColHeadings(Col - 1)
Next
'Actual Data
For j As Integer = 0 To Me.dgExcelData.RowCount - 1
xlBook.Sheets(1).cells(j+1, 1) = Me.dgExcelData.Item(0, j).ToString
Next
'Saving The Excel File
Dim Filename As String
Filename = Application.StartupPath & "\Import.xls"
Dim i As Integer = 1
Do While IO.File.Exists(Filename)
Filename = "C:\Import" & i & ".xls"
Loop
Dim Save As New SaveFileDialog
Save.FileName = Filename
Dim Result As DialogResult
Result = Save.ShowDialog
If Result = Windows.Forms.DialogResult.OK Then
xlBook.SaveAs(Filename)
End If
xlBook.Close()
xlBook = Nothing
xlApp.Quit()
xlApp = Nothing
GC.Collect()
End Sub
|
|
|
|
|
good day to everyone... again i badly needed your help...
i encountered problem in hiding one of my tabpages in the tabcontrol. This is the code that i put:
TabControl1.TabPages(1).Hide()
it did not hide the tabpages(1)....
pls i need your help very badly, i know its so basic for you guys but for me i already wasted two days for nothing.... pls help the simple mind....
thanks
nothing is impossible.....
|
|
|
|
|
I believe there's a visible property, which you want to set to false.
If that doesn't work, I have another vague feeling that perhaps you need to remove the tab page from the tab control to hide it.
Christian Graus - C++ MVP
|
|
|
|
|
Sir,
i also tried this one tabcontrol1.tabpages.item(1).hide.... still doesnt work....
visible property is only applied for the tabcontrol but for its tabpages it is not applicable...
Is there other ways to hide a tabpage? how?
thanks Sir Christian
nothing is impossible.....
|
|
|
|
|
sounds like my second recollection is on the money. You need to remove the page from the tab control.
Christian Graus - C++ MVP
|
|
|
|
|
Sir,
Thank you for you idea... i did remove first the tabpage when the form load, then i insert a command to reload the tabpage in an event.... and all the controls are still there...
Thank you for your kindness.... Your help is highly appreciated... Thank you again sir Christian...
simple minds creates impossible things....
nothing is impossible.....
|
|
|
|
|
You can disable the tab page but it does not disable the tab itself. It does disable all controls on that tab page.
The best way is to remove the page compeletely.
|
|
|
|
|
Hi I am using this treeview in web browser populated via a database.
when i select a node i pass a url parameter and filter a datagrid on the right hand side of same page.
eg.
---
nodeAutoCat.NavigateUrl = "Index.aspx?CatId=" + Server.UrlEncode(CType(rowAutoCat("CatId"), String))
---
but i cant maintain the view state of treeview it collaspe everytime i do postback.
can some body help me how to retain the state of treeview upon postback
cheers
PS: I am using visual studio 1.1 and database is sql server 2000
|
|
|
|
|
Does anyone have an idea what i am talking about or its not clear? Or it is not a good idea to used treeweb control. in aspx the tag looks like
<iewc:treeview id="TreeView1" runat="server" target="_self">
have some one faced similar problem and fixed it?
|
|
|
|
|
Is there no EnableViewState property in the treeview control for .NET 1.1? There should be, most controls do.
You may be to accomplish it using query strings or cookies (session variables would be overkill I think) & manipulating these methods at PageLoad. I hope these methods exist for the .NET 1.1 treeview. They really should.
treeview.FindNode("NewNode/NewNode").Expand()'node path
treeview.Nodes.Item(i).Expand()'node index
treeview.SelectedNode.Expand()
|
|
|
|
|
there is no method called FindNode under treeview web control and under my treeview web controls property i have set enableviewstate to true.
Please help here are my codes. when i navigate i just want to maintain the state of the treeview control
---
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
objConn = New SqlConnection(dbPath)
Dim value As String
value = Request.QueryString("CatId")
If value <> Nothing Then
Dim dsProducts As New DataSet
cmd = New SqlCommand("SELECT vehId, vehName, vehImgRef from vehicle where catId ='" + value.ToString + "'", objConn)
Dim daAuto As New SqlDataAdapter(cmd)
daAuto.Fill(dsProducts)
dgProducts.DataSource = dsProducts
dgProducts.DataBind()
End If
If Not IsPostBack Then
Dim objDS As New DataSet
Dim daAutoType As New SqlDataAdapter("SELECT AutoId,AutoType FROM AutoType", objConn)
Dim daAutoCat As New SqlDataAdapter("SELECT AutoId,CatId, CatName FROM Category", objConn)
daAutoType.Fill(objDS, "dtAutoType")
daAutoCat.Fill(objDS, "dtAutoCat")
objConn.Close()
objDS.Relations.Add("AutoTypeToCat", objDS.Tables("dtAutoType").Columns("AutoId"), objDS.Tables("dtAutoCat").Columns("AutoId"))
Dim nodeAutoType, nodeAutoCat As TreeNode
Dim rowAutoType, rowAutoCat As DataRow
For Each rowAutoType In objDS.Tables("dtAutoType").Rows
nodeAutoType = New TreeNode
nodeAutoType.Text = rowAutoType("AutoType")
nodeAutoType.ID = rowAutoType("AutoId")
TreeView1.Nodes.Add(nodeAutoType)
TreeView1.EnableViewState = True
For Each rowAutoCat In rowAutoType.GetChildRows("AutoTypeToCat")
nodeAutoCat = New TreeNode
nodeAutoCat.ID = rowAutoCat("CatId")
nodeAutoCat.Text = rowAutoCat("CatName")
nodeAutoCat.NavigateUrl = "Index.aspx?CatId=" + Server.UrlEncode(CType(rowAutoCat("CatId"), String))
nodeAutoType.Nodes.Add(nodeAutoCat)
Next
Next
'clean up
objDS.Dispose()
daAutoType.Dispose()
daAutoCat.Dispose()
objConn.Close()
objConn.Dispose()
End If
End Sub
Private Sub TreeView1_SelectedIndexChange(ByVal sender As Object, ByVal e As Microsoft.Web.UI.WebControls.TreeViewSelectEventArgs) Handles TreeView1.SelectedIndexChange
'TreeView1.Nodes.Item("nodeAutoCat").Expanded() = True
Response.Write("I am here")
End Sub
---
|
|
|
|
|
Hi
I use a database with sql server 2000 , I deal with a tabel which has primary key ID which is auto number .
i create a stored procedure to isnert fields
i link the program with that stored procedure ,
as the normal you can't enter that field ID (auto number) ...
when i try to save record , the system error occured and told me that i didn't enter the ID field ....
i'm sorry to waste your time ,,,,
jooooo
|
|
|
|
|
You forgot to ask a question.
What is it that you are trying to do, what exactly have you tried, and what exactly happened? When you say that you tried to save a record, do you mean an insert or an update? What was the exact error message?
---
b { font-weight: normal; }
|
|
|
|
|
Hi
Really i's so glad to participation on this nice site,
thanks my friend Guffa ,
i found the soloution of it , I didn't want to waste your time ti dispripe it , it's along case of code ,
but thanks and keep in touch
jooooo
|
|
|
|
|
Hello every one
I am making quiz and i want to add background sound in project and i am using vb.net - 2003
any help
wating for help
thanks
|
|
|
|
|
There is no built in sound API in 2003, you can p/invoke PlaySound, or use Windows Media Player as a control.
Christian Graus - C++ MVP
|
|
|
|
|
Hello
Thanks for your rep.
Yes I agrey with you but can you please tell me how to do it,But before i tried with WMP so i add WMP in my project and tried it but it's not working so can you please tell me how
wating for your kind rep.
have a nice time
|
|
|
|
|
I can't answer this. 'I tried with WMP' tells me nothing. Given that both I, and countless others, use WMP in our code, it's obvious that 'it's not working' means you're doing it wrong. The tutorials on the web are easy enough to follow, but either way, if you don't post your code, I have no way of knowing what you're doing wrong.
Christian Graus - C++ MVP
|
|
|
|
|
|
kindman_nb wrote: System.Threading.Thread.Currentculture.....("here language name")
That line won't do anything, unless your code changes it's UI by checking the culture.
You want both UIs to be in use in the one app ? The most likely way to do this is to design the two UI's as controls and have them both coded to work on the one form. Then, just switch which control is visible.
Christian Graus - C++ MVP
|
|
|
|