|
|
seekdharani wrote: Put that datagrid inside the Div tag
I think the question might be related more to desktop applications and hence div tag may not be applicable.
[edit]Seems like the post I replied to was deleted.[/edit]
For the OP - You can generate a class object from the data in the gridview and generate a report based on that class object.
-- modified at 23:43 Tuesday 16th January, 2007
Shreekar
|
|
|
|
|
Okay i was wondering how i could change the name in the list box on an amend feature.
so far i got
<br />
<br />
Dim Rum As Integer<br />
<br />
If listbox1.SelectedIndex = -1 Then<br />
Exit Sub<br />
End If<br />
<br />
Num = listbox1.SelectedIndex<br />
<br />
frm1.R.Rt = txtRtText<br />
frm1.R.Rp = CSng(txtrp.Text)<br />
<br />
<br />
frm1.Rooms(Rum) = frm1.Room<br />
<br />
txtRt.Clear()<br />
txtRp.Clear()<br />
It changes it in "rt" and "rp" but wont change the name in the list box
|
|
|
|
|
What form is this ListBox on and what form is this code you posted on? Are you trying to update a listbox on one form from another? What is frm1 and how did it get defined?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Basically it is all on the same form but i a "Class" with
"RT" = String for a name
"RP" = Integer for a number
So basically i want to be able to recall data into textbox ( i know how to do this) then amend the current data.
If i select "Coffee" from the listbox it will display " coffee " and the "number" in two different text boxes. The amend on the Number works fine but when i change "Coffee" to "Coffee with sugar", it will still display "Coffee" in the list box. So now if i click "coffee" again it will show " coffee with sugar" but still coffee as the list box item and i want it to be "coffee with sugar"
Only way i found around it is by making it delete it from there and readding it but surly there is a way around that ,.
<br />
<br />
Dim Rum As Integer <br />
<br />
If listbox1.SelectedIndex = -1 Then 'if list box = not selected then ..<br />
Exit Sub<br />
End If<br />
<br />
Num = listbox1.SelectedIndex ' making variable = list boxes selected index<br />
<br />
frm1.R.Rt = txtRtText ' makes the class R.Rt = textbox<br />
frm1.R.Rp = CSng(txtrp.Text) ' makes class r.rp = textbox<br />
<br />
<br />
frm1.Rooms(Rum) = frm1.Room <br />
<br />
txtRt.Clear()<br />
txtRp.Clear()<br />
|
|
|
|
|
The code you're showing doesn't update the ListBox, so it's impossible to say what you're doing wrong. But, have you tried calling Refresh on the ListBox when you're done updating it?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
How do you refresh the list box, the code i provided only updates the where the data is being store i thought it would refresh/update the name once u change it
|
|
|
|
|
Uhhh, no. You'll have to remove the item from the ListBox and re-add it.
Your other alternative is to create a typed dataset, load your data into that, then bind the ListBox to the dataset. If you do that, then any changes to you make should be updated in the ListBox when they're made.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hi,
i wrote following code to validate my all controls on form.
it is working well but when i run my project & for testing purpose i leave the textbox as it is
following code executed & showing appropriate message but it is validating controls randomly....& i wnt that it should validate control in a sequence
( e.g. employeeid ,empname,designation......etc).
i have given tabindex to all controls in sequence though it is validating controls in random manner Wht shuld i do??
Is there anyone who will solve my problem????
Public Function Validate_Ctrl(ByVal sender As Form) As Boolean
For Each obj In sender.Controls
If TypeOf obj Is TextBox Then
If obj.Name = "txtSearch1" Or obj.Name = "txtSearch2" Or (TypeOf obj Is CheckBox) Then Continue For
If obj.Text = "" Then
MsgBox("Please Enter Values In " + obj.Name, MsgBoxStyle.Exclamation + MsgBoxStyle.OkOnly, obj.Name + " Validation")
obj.Focus()
Validate_Ctrl = False
Exit Function
End If
End If
Next
Validate_Ctrl = True
End Function
priya
|
|
|
|
|
As far as I know, the for each loop will visit the controls not according to tab index, but something else.
A cumbersome method can be to load all the controls in an array and then sort them based on their tab index and then apply the validations on them.
A simpler method might be to use ErrorProvider and the validate events for a better control over validation (This applies only in .Net 2.0) - so if you are using VB 6, ignore this part.
Shreekar
|
|
|
|
|
any code for doing a booking system in vb.net and just using the database to store the details. require code for the seats which are going to be text boxes 200 minimum 600 maximum and going to be using the tab index to return that specific seat number, which when searching a specific date tells me that whether the seats are free or booked and if free will let me book the seat for the customer, and if booked display the customers name seat no, and row, seat 30 x 20= 600 from rows A to T. jsu tell me where to look if possible please for the appropriate code thank you
-- modified at 9:24 Tuesday 16th January, 2007
|
|
|
|
|
Is this homework, or are you being paid to write this ? Sounds more like the former, but either way, the way to do this is well documented online, if you're not willing to do some research and start your project, you're on your own. If you're willing to give it a go, and ask specific questions when you get stuck, we're here to help.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Here[^] we go. Trainwreck in progess...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Christian Graus wrote:
Hehehehe! I can't help but to laugh every time I see that icon. One of the best next to .
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi Guys,
Does anyone know how to deal with leagcy binary .dat files in VB .Net i have a few systems in VB 6 that write to .dat files 1 example is the following structure / type:
Type AccountDat
cAccount As String * 12
cCompany As String * 32
cAddress(3) As String * 32
cTelFax(1) As String * 18
cContact As String * 22
nPriceLevel As Integer
nStop As Integer
nCash As Integer
nFirst As Long
nLast As Long
nLimit As Long
nBalance(4) As Long
nLock As Integer
End Type
Type AccountIdx
cAccount As String * 12
nRecord As Long
End Type
My question is how do i handle these files in VB .Net
Thanks
Keith
|
|
|
|
|
How to disable the Lock Computer button in Win 2k.
Plz Tell me....
Thanks & Regards
Kumaran
|
|
|
|
|
What do you want to disable ? The odds are, the answer is 'computer says no'
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi actually i cant get what u want can u please make it clear
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
The best way to do it is through Group Policy. Or, you can just edit the registry key that disables it. See here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hi all
please tell me how i can create a TRANSPERANT FORM
i.e. i can view back item on screen while form is on
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
Isn't there a transparency property ? There was an API in C++ from W2000 to set the transparency
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi
tx
can you please specify it with example
-- modified at 4:38 Tuesday 16th January, 2007
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
hi there
is any method in VB 6.0 for the same
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
Oh, no, I don't think so. VB6 is very out of date, it sure predates opacity on forms.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|