473,499 Members | 1,573 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VS.NET 2005 - lost in translation?

Hi folks - extremely new to this, so I've been hunting up online
example to allow me to create a simple web front end to a SQL DB. I
was doing well with a demo but I'm stuck and I'm not sure of the next
step. This is the example in question:
http://www.wherecanibuyit.co.uk/ASP/...nd_insert.html

Under "Adding a new row to the gridview" I seem to have fallen down
making the Multiview work. His example is C# and I'm working in VB, so
either I'm just 100% missing the point, or I've translated something
wrong.

Short version:
Gridview pulling from SQL
Multiview
- view 0 - an "add new entry" button
- view 1 - a detail view that allows adding a new entry, or editing an
existing one; when 'save' is clicked it should return to view "0" - but
does not.

These are the procedures. The first one works - when the button is
clicked, it activates view "1" so you can see a Detail View, allowing
adding a new record. But all the others fails - when I 'save' the new
record it does not come back to view "0", nor does it open view "1"
when I click the edit link on the Gridview. I'm hoping this is enough
to show what I'm missing - any tip appreciated.

'When 'add new' button clicked, display the second view
Protected Sub btnAddNewClient_Click(ByVal sender As Object, ByVal e
As System.EventArgs) Handles btnAddNewClient.Click
MultiView1.ActiveViewIndex = 1
End Sub

'When 'save' button clicked, display the first view
Protected Sub dvAddEditClient_ItemInserted(ByVal sender As Object,
ByVal e As DetailsViewInsertedEventArgs)
gvAddEditClient.DataBind()
MultiView1.ActiveViewIndex = 0
End Sub

'When 'cancel' button clicked, display the first view
Protected Sub dvAddEditClient_ItemCommand(ByVal sender As Object,
ByVal e As DetailsViewCommandEventArgs)
gvAddEditClient.DataBind()
MultiView1.ActiveViewIndex = 0
End Sub

'When 'edit' is chosen in Grid View, open in Detail View
Protected Sub gvAddEditClient_SelectedIndexChanged(ByVal sender As
Object, ByVal e As EventArgs)
If gvAddEditClient.SelectedRow.RowIndex >= 0 Then
dvAddEditClient.DataBind()
MultiView1.ActiveViewIndex = 1
End If
End Sub

Oct 31 '06 #1
1 1006
yeah sorry.. MS screwed us VB developers by putting all of their
efforts into C# instead of VB.

I guess that the worlds richest software company doesn't have $$ to
provide samples in the worlds most popular language lol

Don't mean to sound negative; but im still pissed off --- daily-- and I
refuse to wear the flag for C#

half a million java dorks _CAN_ be wrong

-Aaron
Dave wrote:
Hi folks - extremely new to this, so I've been hunting up online
example to allow me to create a simple web front end to a SQL DB. I
was doing well with a demo but I'm stuck and I'm not sure of the next
step. This is the example in question:
http://www.wherecanibuyit.co.uk/ASP/...nd_insert.html

Under "Adding a new row to the gridview" I seem to have fallen down
making the Multiview work. His example is C# and I'm working in VB, so
either I'm just 100% missing the point, or I've translated something
wrong.

Short version:
Gridview pulling from SQL
Multiview
- view 0 - an "add new entry" button
- view 1 - a detail view that allows adding a new entry, or editing an
existing one; when 'save' is clicked it should return to view "0" - but
does not.

These are the procedures. The first one works - when the button is
clicked, it activates view "1" so you can see a Detail View, allowing
adding a new record. But all the others fails - when I 'save' the new
record it does not come back to view "0", nor does it open view "1"
when I click the edit link on the Gridview. I'm hoping this is enough
to show what I'm missing - any tip appreciated.

'When 'add new' button clicked, display the second view
Protected Sub btnAddNewClient_Click(ByVal sender As Object, ByVal e
As System.EventArgs) Handles btnAddNewClient.Click
MultiView1.ActiveViewIndex = 1
End Sub

'When 'save' button clicked, display the first view
Protected Sub dvAddEditClient_ItemInserted(ByVal sender As Object,
ByVal e As DetailsViewInsertedEventArgs)
gvAddEditClient.DataBind()
MultiView1.ActiveViewIndex = 0
End Sub

'When 'cancel' button clicked, display the first view
Protected Sub dvAddEditClient_ItemCommand(ByVal sender As Object,
ByVal e As DetailsViewCommandEventArgs)
gvAddEditClient.DataBind()
MultiView1.ActiveViewIndex = 0
End Sub

'When 'edit' is chosen in Grid View, open in Detail View
Protected Sub gvAddEditClient_SelectedIndexChanged(ByVal sender As
Object, ByVal e As EventArgs)
If gvAddEditClient.SelectedRow.RowIndex >= 0 Then
dvAddEditClient.DataBind()
MultiView1.ActiveViewIndex = 1
End If
End Sub
Oct 31 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1450
by: Armin Rigo | last post by:
Post-EuroPython 2005 PyPy Sprint 1st - 7th July 2005 ====================================================== The next PyPy sprint is scheduled right after EuroPython 2005 in Gothenborg, Sweden. ...
9
2320
by: Jenta | last post by:
A World Beyond Capitalism 2005, An Annual International Multiracial Alliance Building Peace Conference Is Accepting Proposals... ...and Online Registration is now available if you plan to table...
6
2116
by: sathyashrayan | last post by:
Following are the selected thread from the date:30-jan-2005 to 31-jan-2005. I did not use any name because of the subject is important. You can get the original thread by typing the subject...
4
1144
by: Tobin | last post by:
Hello, I'm developing production software in VB 6 sp5. We are looking to convert our software to visual studio 2005. Resources are limited and I would like to install 2005 on the same machine...
16
1310
by: Lighter | last post by:
Is this a Bug of VS 2005? We know size_t is not a built-in data type in C++, rather, it is just a typedef declaration. However, I found the following code could be normally compiled with VS...
7
1385
by: klenne | last post by:
Hallo, Ik probeer een programma, gemaakt in vb 6.0 te openen in vb.net 2005. Bij het runnen zijn er enkele problemen opgetreden. Ik denk dat het probleem bij geheugens ligt, declaratie van...
0
1157
by: Stef Mientki | last post by:
hello, I've build a translation tool, to translate all strings in a python source file. As a extra gadget I added translation through Babel Fish, using beautifulsoup. Although it works...
0
7130
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5468
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4918
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
295
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.