|
i have 3 gridview
on selected index change of first gridview(company), I populate second gridview(users) on second gridview selected index change i display a list of jobs that are available (in a listview) and list of jobs assigned (in gridview) and roles associated with that job (checkbox in a 3rd gridview)
when i need to assign a job to the user i simply do followings
1. click company from 1st gridview
2. click user from 2nd gridivew
3.select a property from available property
and click a button that adds a new record in the assigned gridview but i want to display the newly added row as soon as they hit assign button. i need to reselect the user to see the updated change. is there anyway i could achieve this without using session?
please advise.
|
|
|
|
|
There's no reason in the world you need to use the session. Just use viewstate, or pass a value on the url, if they are different pages.
BTW, I answered tis even though you should not have posted it here, it's an ASP.NET question.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
You are a kind-hearted and charitable individual Mr Graus...
-------------------------------------------
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Just bugger off and leave me alone!!
|
|
|
|
|
I know - ask anyone.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi all,
recently i have developed an application in vb6 (sp6).
when i run this application all is ok but when i want to take print out of given subject it gives me some problems
when i take printing on domatrix printer it gives me ok result, i mean to there is no problem with such like proble on any other pc.
but, when i same take on laserjet printer it gives varied result, mean on some pc it suppoted and on some pc i could not able take the print out.
find the coding which i used to take printout
Private Sub DataRptRecord()
'On Error Resume Next
Dim Var1, Var2 As String
If A_DataEnvironment.rsCmdPrnt.State Then A_DataEnvironment.rsCmdPrnt.Close
A_DataEnvironment.rsCmdPrnt.Open ("SELECT *From adrsmstr",conn)
DataRptAddress.Sections(2).Controls("lbl1").Caption = Trim(TxtCntact1.Text) ' AdrsBook_DataEnvironment.rsCmdAdrsPrnt.Fields(1)
DataRptAddress.Show
the following section of codes deals with only dos base printings.
Private Sub DosBasePrinting()
On Error Resume Next
Dim A1, A2, A3, A4, A5, A6, A7 As String
Dim z As Integer
Dim i As Integer
If MarkAtt = True Then
Call AskForSave
If a.State Then a.Close
a.Open ("SELECT * From adrsmstr"), Conn, adOpenStatic, adLockBatchOptimistic
If a.EOF = False Then
a.MoveFirst
z = PrntNos
Open App.Path & "\A.TXT" For Output As #1
A1 = a.Fields(1)
A2 = a.Fields(0)
A3 = a.Fields(2)
A4 = a.Fields(3)
A5 = a.Fields(4)
A6 = a.Fields(6)
A7 = a.Fields(5)
For i = 1 To z
Print #1, " " & Trim(TxtCntact.Caption)
Print #1, " " & A2
Print #1, " " & UCase(Trim(A3)) & "," & UCase(Trim(A4))
Print #1, " " & A5
Print #1, " " & A6
Print #1, " " & A7
Print #1, " "
Print #1, " "
Print #1, " "
Next
Close #1
End If
X = Shell(App.Path & "\print.bat", vbHide)
rmshah
Developer
|
|
|
|
|
r_mohd wrote: recently i have developed an application in vb6 (sp6).
Why on earth would someone start a new app with VB6 in 2008 ?
Unless VB6 is utterly rubbish ( and, I know, it is ), your printing should be handled the same for any printer, because it should rely on the driver for specifics of the printer. I suspect the problem is that you're not taking the time in your code to check the size of the page, and so it probably prints differently based on page settings.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks,
u talking absolutely right, some time it's clients specific requirement.
but i have solved my problem, it was some dll i was missed.
thanks
rmshah
Developer
|
|
|
|
|
NO, there is no problem for dll, i also have the same problem with one of my application. this code will work only for the dot matrix printers.
Yogesh Agarwal
|
|
|
|
|
Christian Graus wrote: ...your printing should be handled the same for any printer, because it should rely on the driver for specifics of the printer.
There are times when it's best to handle printing in a device-independent way. There are times, however, when device-dependent code is the only practical way to do things.
A typical dot-matrix printer can quickly output monospaced text at 10, 12, or 17 characters/inch and 6 or 8 lines/inch; such text will be far more legible than any sort of graphics Windows could produce with it at anything resembling comparable speed. While such printers are regarded as obsolete in some contexts, there are other situations where they have considerable advantages. They can print multi-part forms, multi-page printouts are automatically fastened together without stapling, and they can run thousands of pages without reloading.
It looks like this application works by creating a text file and then using a DOS batch file to print it. Without seeing what the DOS program is doing, it's hard to say exactly what your problem is. My guess would be that the default character/line spacing and page margins on the laser printer are different from those used by the dot-matrix.
|
|
|
|
|
Hi, I am using dataset for playing with data and wanted to create an additional column that stores logarithm (log) of another column. I tried to use number of options including the one below but still have trouble making the program work.
dtRec.Columns.Add("sumXY", Type.GetType("System.Double"), Math.Log("recflow"))
recflow is an existing column of the dataset and I want log values of reflow to be stored in new sumXY column.
Any suggestions!!
Amanjot
|
|
|
|
|
Amanjot,
The way you've written the third parameter is, I think, incorrect. This might work instead:
tRec.Columns.Add("sumXY", Type.GetType("System.Double"), "Math.Log(recflow)")<br />
Steve Erbach
Neenah, WI
http://TheTownCrank.blogspot.com
|
|
|
|
|
Thanks Steve. I tried the option you suggested; however, it didn't work.
Thanks,
Amanjot
|
|
|
|
|
question
if i select 2 items then numbers in the first column is 1,2 when i close the open file dialog and want again add 4 files
I want the numbers3, 4 ,5,6 after 1,2
so that i hav 1,2,3,4,5,6 including the file name in the second column
so i must then look like this.
col1 col2 Col3
1 tina turner Pathname
2 10cc Pathname
3 Gwen steffani Pathname
4 Abba Pathname
And so on
with the folowing code it wont work
Me.OpenFileDialog1.Multiselect = True
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
End If
Dim x As Integer
Dim item As Integer
Dim file As String
For Each file In OpenFileDialog1.FileNames
x = item + 1
ListView1.Items.Add(x)
ListView1.Items(item).SubItems.Add(IO.Path.GetFileNameWithoutExtension _(file))
ListView1.Items(item).SubItems.Add(file)
item += 1
Next
End If</code>
please help
thanks
|
|
|
|
|
johnny1963 wrote: Dim item As Integer
Dim file As String
For Each file In OpenFileDialog1.FileNames
x = item + 1
Perhaps if you gave x a value before you started, something like ListView1.Items.Count ?
I don't see why you need x at all, actually. Just use the item count.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I found the just by myself
First i want to say
X= item +1
thats i want to start with number 1 and not 0
the solution is:
Dim x As Integer
Dim item As Integer = listview1.Items.Count
Dim file As String
For Each file In OpenFileDialog1.FileNames
x = item + 1
ListView1.Items.Add(x)
ListView1.Items(item).SubItems.Add _(IO.Path.GetFileNameWithoutExtension(file))
ListView1.Items(item).SubItems.Add(file)
item += 1
Next
End If
thanks
|
|
|
|
|
Yeah, that works, but of course, like I said, you don't need x. x will continue to be listview1.Items.Count + 1, all the way through.
And what's with calling it listview1, what's wrong with meaningful variable names ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Guys,
I wonder how I can program a fuzzy set like you can see it here:
Fuzzy Set Example
Fuzzy sets are sets whose elements have degrees of membership. So the input [70 km/h] is to 75% low and 25% medium.
I don't need to draw(present) the functions I just need to calculate the degree of membership for each input e.g. [70 km/h], [60 km/h], [80 km/h].
I noticed that pseudonym67 is quite a strong contributer in this subject, nevertheless he actually
never mentions triangular/or other shaped functions.
Many thanks for any suggestions
polynaux
|
|
|
|
|
Hi,
I wonder if anyone can help. Some time ago I managed to deploy a VB.Net 2003 system with Crystal Reports 8.5. I have forgotten how I did this. Can anyone point me the correct direction or give me any help. I remember it was add merged files etc.
|
|
|
|
|
Can someone help me?.....
I'm working on developing an add-in for outlook 2007...
I want an event that identifies an email has been add/moved drag and drop to a folder
How can I do this in VB ????????????
|
|
|
|
|
Hi All,
I having doubt in adding SQL(which is inside the VS.Net). Wheather if we add db from inside .net, will work without SQL installation in Clint system.?
Can any one give me an idea.........
Thank you in Advance...
Senthil.S
Senthil S
Software Engineer
|
|
|
|
|
Senthil S wrote: I having doubt
You mean that you have a question?
Senthil S wrote: Wheather if we add db from inside .net, will work without SQL installation in Clint system.?
SQL is the query language that you use to communicate with the database. What you install is a database driver, and perhaps a database server.
To use a database driver it has to be installed on the computer that runs the code that accesses the database. Some database drivers are installed by default, like the MS Access database driver.
If the database is on a different computer than the one running the code, that computer needs a database server installed. It then has to be a server based database like MS SQL Server, not a file based database like MS Access.
If you could be more specific about what kind of applicataion you are making, I could provide more specific information.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
hi all,
in my application i store some data in Registry. Everything is ok except one . when i run my application on vista machine as limited user (not as admin) then Following error occured
"Requested registry access is not allowed"
anybody have idea that how can i resolve this Error ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
What part of the registry are you reading/writing?? What's the registry path you're using??
|
|
|
|
|
hi,
i am using following path
HKEY_LOCAL_MACHINE\SOFTWARE\
at above path, i am try to creating a key. but failed on vista (limited account).
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Normal users are not allowed to create keys under the HKLM\SOFTWARE key. This can only be done by the admin and is usually done at application installation time, not at run time.The keys under this one should be Company Name or Application Name keys, under which application values should be created.
|
|
|
|
|