VB.NET Data Grid, windows app to web app

Is it possible to make a Web Application Data Grid element with identical functionality as a Windows Application Data Grid?

When I run the code as a windows application, it allows me to make direct edits of each database record through the data grid. When I run the code through a browser, however, it only displays the records.

This is the code:

Any suggestions?

Inherits System.Web.UI.Page 
Dim connstr As String = "data source=SERVER;initial catalog=DB;user id=USER;password=PASSWORD;" 
Dim sqlStr As String = "SELECT * FROM Users" 
Dim dt As New DataTable 
Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoad.Click 
Dim dataAdapter As New SqlClient.SqlDataAdapter(sqlStr, connstr) 
dgDisplay.DataSource = dt 
End Sub 

Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click 
Dim changes As Integer 
Dim dataAdapter As New SqlClient.SqlDataAdapter(sqlStr, connstr) 
Dim commandBuilder As New SqlClient.SqlCommandBuilder(dataAdapter) 
changes = dataAdapter.Update(dt) 
If changes > 0 Then 
MsgBox(changes & " changed rows were stored in the database.") 
MsgBox("no changes made.") 
End If 
End Sub 

5/13/2006 12:05:16 AM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 51
Get it on Google Play
Get it on Apple App Store


Similar Artilces:

convert java web app 2 .NET web app
Hi, i am able to convert java console app to .NET console app.but i am unable to convert java web based application to .NET web based application. can u give me some idea as to how to convert that. Thanks in advance,nizam. I believe the technical phrase is.. rtfm?  lol.  you're going to have to do it the hard way.  JSP operates on a different theory of web development than asp.net/asp.net 2.0Kay LeeMySpace.com - http://www.myspace.com/kragieInfrastructure GroupMySpace.com- Code to live, but Live to code. Try these two links for sample code and free book from Microsoft, ...

vb.net and c#.net same app
Been asked before, but... If I build a c# web app and someone builds a vb.net desktop app, can they communicate? and can you develop against it...ie..in my c# web app, can I add the vb.net desktop app as a reference? or at least make calls to it? web apps or desktop apps can contain components created in either language. i have a web solution that contains 4 projects. One of the projects is C# the others are VB.Mike Banavige~~~~~~~~~~~~Need a site code sample in a different language? Try converting it with: http://converter.telerik.com/ Thanks...that is what I was looking for ...

how to use the Ultra grid to customise the scroll bar setting in vb.net (windows app)
I am using Infragistics Ultra grid in windows application.Can anyone tell me how to use the Ultra grid to customise the scroll bar setting in vb.net (windows app).Regards,Shobana The ASP.NET Forums are not available to support commercial components. You will need to seek support at Infragistics Support. Also, for future reference, you should post all non-ASP.NET related questions such as Windows application questions on the MSDN Forums.Ryan OlshanASPInsider | Microsoft MVP, ASP.NEThttp://ryanolshan.comHow to ask a question...

Determining if an app is a web app or a windows app
Hi all,  I'm writing a generic utilites class and one of the methods needs to get the physical path of the application. I know Server.MapPath("~") gets the server path of the app for windows and also that Application.ExecutablePath gets the path for windows app. Now how would i determine which app is a windows app or a web app?   Thanks in advance. add a reference to system.web and then do the following  if (System.Web.HttpContext.Current == null)            {       &...

Call Independenly Designed Crystal Report Using cr viewer control in vb.net web apps
Hi, I have designed the crystal report independently in version 9.0 with one parameter field. i want to call that report from the web application and pass the parameter. so that the report can show me the right value from the data base of SQL server. How can i do that?? plz hlp me. Tauseef Just do Add >> Existing Object to add the report to your project. Then, you can use that report file just as if you had created it in Visual Studio. This works for all versions 8.5 or better. For examples of passing parameters, support.businessobject.com has a good example in...

Run Vb.net Web app using Web Harpoon
Does anyone know what Begin Tag and End Tag to use to run a VB.Net web App in Web Harpoon? We are experiencing errors trying to run the app. Error --> The state information is invalid for this page and might be corrupted Thanks,   Erik...

vb.net windows app with listbox
I have a vb.net windows program that copies files from one directory to another. I have a list box that displays record details such as file name, size load time etc. My issue is that the listbox does not display any of the data until the program is finished running. I would like the listbox to display the status each time an individual file copy is completed. Is there some way to refresh the listbox to show the file copy progress? While r.Read If FolderExists(FolderPathIncoming) = True Then If FolderExists(FolderPathOutgoning) = True Th...

Deploying PowerBuilder client/server app as .NET Web app
Hi when I deploy Client/Server(stand alone) PowerBuilder application as .NET Web application I get below output. Not even getting any error messages. --Deploy--- Checking IIS Server... Generating .NET assembly file... Deploy failed. Have deployed provided Tutorial application as Web application. It has successfully created and deployed as shown below. ---------- Deploy: Deploy of p_pbtutor_webform2 (1:50:39 PM) Checking IIS server... Generating .NET assembly file... Generating PBD files... Copying to IIS server... Deploy succeeded. ---------- Finished Deploy of p_pbt...

Input Box In VB.NET Web App
Hi Does anyone know of any good links for the creation of Input Boxes in VB.NET web applications.I have searched the web and cannot find anything relevant! Thank you for your help! Julie HtmlInputControl Class on MSDN I prefer to use the TextBox Class. Jared LivingstonMrLivingston.com - Livingston Family WebsiteTest/Demo site - moonmark.com Thank you for your reply!Im very new to VB.NET and cant seem to figure out how to use it from the MSDN site,anyone have any more examples? I actually dont think I made myself very clear in my first post,what im looking for is a popu...

Write to Excel from VB.NET web app
Hi everyone!! I am using this code to write a new excel spreadsheet from VB.NET and populate it with values.However I keep getting the error "cannot create active x component."I am thinking it has something to do with security features but Im just wondering if anyone has any ideas!! Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MakeNewFile() Dim sConn As String sConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\temp\NewExcel.xls; Extended Properties=Excel 8.0;" Dim objConn As New S...

vb.net web app and Office Communicator
Hi, We have installed Office Communicator 2007 at work and I want to try creating vb.net web apps with it.  But I just cant get started.  Everything on the web seems to be focused to windows apps or c# apps.  Can anyone point me to a good tutorial for building a web app from scratch i.e reference dlls.  Or run me thru a simple how to. I know if I can build the first simple one...the rest should be easier. Thanks...  Hi, Based on your description, you would like to develop an application like office communicator 2007 using .NET The fo...

convert vb.net to C# web App
Wat is the easiest way to convert VB.Net Window application to C# Web Application I recommend this website, as I've used it countless time and it seems to delivery. http://www.developerfusion.com/tools/convert/vb-to-csharp/Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. Check out http://www.dgwebit.co.uk I recommend this website, as I've used it countless times and it seems to delivery. http://www.developerfusion.com/tools/convert/vb-to-csharp/Please remember to click ...

Compressing Folders In VB.NET Web App
Hi Im just wondering if anyone has an example of folder compression in VB.NET? Ive searched the web for this an have only come across C# examples for zipping files. If anyone has a link it would be very nuch appreciated! Thanks in advance jewly: ) Hi, Take a look @ Xceed Zip for .NET 1-developer HTH K B ShajudeenAreYaar.comDubai, United Arab Emirates....

vb.net apps available via the web?
Hi, We have vb.net apps we want to keep on our servers and just have the clients point their browsers to them. Can they do this? What is the best way to go about this? Thanks Steve Yes you can but you have to understand Code Access Security http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcodeaccesssecurity.asp Rajhttp://weblogs.asp.net/rajbk/ Also, can you generate ASPs from the vb.net code that simulates the application over the web?...

Web resources about - VB.NET Data Grid, windows app to web app - asp.net.presentation-controls

Window - Wikipedia, the free encyclopedia
This article is about the part of a building. For the Microsoft operating system, see Microsoft Windows . For other uses, see Window (disambiguation) ...

Microsoft Windows Information, Solutions, Tools - Windows IT Pro
Microsoft Windows information and solutions for IT pros. Topics include cloud computing, Windows Server, Exchange, Outlook, PowerShell, virtualization, ...

The Windows Blog
The Windows Blog is Microsoft's Official Blog for the Windows Operating System.

Microsoft explains how it uses Windows 10 Insider feedback with 'Made by you' articles
The Windows Insider program was designed to help anyone test driving preview builds of Windows 10 to provide feedback and help shape the future ...

Life hack: The scientifically proven way to defog your car windows faster
It's winter, which means that you're going to have to deal with foggy windows when you start up your car . While lots of people have their own ...

This stick is a palm-sized Windows 10 computer that you plug into a TV
Meet the Asus VivoStick, a $129 gadget on display at CES 2016 that fits into the palm of your hand — but holds a full, real, actual Windows 10 ...

Samsung’s Galaxy TabPro S Offers the First Super AMOLED Windows Tablet Display
... However, its slender physique is no commentary on its abilities. It is packed with capabilities with full PC functionality including Windows ...

Windows tech support: Keyboard and mouse
Get your input devices to input, and tweak power-saving mode and pointer sensitivity.

Microsoft is launching its own data SIM for Windows devices
Microsoft appears to building its own contract-free cellular data service for getting Windows 10 devices online, if a curious app store listing ...

New Windows 10 stats show Microsoft is closely watching you — but is it an issue?
Windows 10 is collecting more information than some people may have realized, as is evidenced by the company's recent usage reports. Is this ...

Resources last updated: 1/8/2016 1:53:21 PM