How do I edit a dataset from a gridview and then iterate through the updated dataset? (.Net 2.0/VB/Visual Web Developer 2005)

I've got an editable gridview bound to a dataset. I would like to place a button below the gridview.  When it is clicked, I want it to submit the data in the gridview back into the bound dataset, and then i want to iterate through the records in the dataset.   Any code samples/documentation/references would be appreciated!

The code for the gridview is here:

<asp:GridView ID="gvfiles" runat="server" AutoGenerateColumns="false" EmptyDataText="No Records found!">
            <asp:TemplateField HeaderText="Filename">
            <asp:TemplateField HeaderText="Include?">
            <asp:CheckBox id="cbinclude" runat="server" Visible='<%# isineditmode %>' checked='<%# eval("includecolumn") %>'></asp:CheckBox>

The code used to build my dataset is below(it's in the page_load):

 Dim basepath As String = Request.QueryString("path")
        Dim filedataset As New dataset()
        Dim filedatatable = New DataTable("filetable")
        Dim filecolumn As New DataColumn("filecolumn")
        Dim includecolumn As New DataColumn("includecolumn")
        Dim filelist As String() = Directory.GetFiles(basepath)

        Dim filename As String

        For Each filename In filelist
            Dim filetablerow As DataRow = filedatatable.newrow()
            filetablerow.Item(filecolumn) = filename
            filetablerow.Item(includecolumn) = "false"

        gvfiles.DataSource = filedataset
        iseditmode = True
Thanks in advance for your help!
4/2/2007 2:29:57 PM 72751 articles. 2 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 15


You can have a look at this sample:

I hope the above information will be helpful. If you have any issues or concerns, please let me know. It's my pleasure to be of assistance

Best Regards,
Rex Lin
Microsoft Online Community Support

If there is any question or the issue is not resolved, please feel free to mark the thread as not resolved
4/3/2007 7:09:14 AM

Similar Artilces:

Visual Web Developer 2005 express edition and 2.0
I am using Visual Web Developer 2005 express edition and 2.0. They seem to be working pretty well together except for one thing. I can't update the database with the updatedata command. I can insert, delete, filter and sort just fine but updating is a problem. I am unable to drag the transaction object over from the toolbox even though it is there. The transaction object is available but it is grayed out. I coded a transaction object manually for all of the other database updates which worked just fine. I tried the same process for updating and it did not work. D...

.Net 2.0 Web application using is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one web application using which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

Visual Web Developer 2005 and DW.NET 2.0
I just received a copy of DW.NET 2.0 45 day eval cd. I would like to install it but I do not have VS.NET 2005 and, of course, it complains about that when installing. I am currently using Visual Web Developer 2005 Express. Is it possible to use DW.NET with Express? Thanks in advance Yes, you should be able to install it though you may have to manually register the controls on the toolbox. The install will look for VS2005, but should continue after closing the warning dialog. Regards, Dave Fish Sybase On 6 Apr 2006 11:36:25 -0800, Tom wrote: >I just received a copy of...

Master Details in two seperate GridView Controls
I am simply trying to have a list of people in the top grid control (works fine), then when selected have the second Grid Control show details for that person(not working). Here is what I am trying from the load event: Sub BindData() Dim myConnection As New MySql.Data.MySqlClient.MySqlConnection(System.Configuration.ConfigurationManager.AppSettings("ConnectionSql")) Dim strPersonSQL, strActSQL As String strPersonSQL = "select row_id, first_name, last_name, middle_initial, dsi_id, created, created_by, program_of_study, email from tbl_person" Dim myPerCommand As New MySqlClient.MySqlComm...

Visual Web Developer 2005 Express/Datawindow .NET 2.0
After adding a WebDataWindowControl, after I set the LibraryList to the correct .pbl (which has datawindows), no DataWindows appear in the "Select DataWindow Object" window. I created and saved the datawindows using DataWindow Designer 2.0 into a .pbl, and then added that .pbl to the Solution Explorer. Am I missing something here? Thanks. ...

Me've a BIg Questions in using Visual Web Developer 2005 Express and .NET framework 2.0
wassap Guys: I've downloaded Visual Web Developer 2005 Express but I've not installed it yet. I have some Q's as follows : Can Visual Web Developer 2005 Express make projects in the same process such as visual studio.NET 2003 and 2005 'Here I do mean does it make code behind files for each page automatically and BIN directory and .vbproj or csproj extension for each project? Can I use the previous application to run and script ASP.Net 1.1? If I would like to install .NET framework 2.0 ,Can I run 1.1 on this framework or not ? sorry guys it might be idiot Q's but th...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0 #2
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! There are too many differences for one email - - from 1.0 to 1.1 (not a whole lot of real change, other than fixes, at least compared to 1.1 to 2.0) With 2.0, there were many new declarative controls, with many new ideas added in With 3.0, it's a superset of 2.0 - instead of replacing the installation completely, it just 'added on' new functionality - I would...

Install Visual Web Developer 2005 Express Edition with Visual Studio .Net 2003
Hi All, Just want to make sure the following issue: is there any probelms/issue to install Visual Web Developer 2005 Express Edition on a workstation which have Visual Studio .Net 2003 installed? will it caused the VS .Net 2003 not work correctly? IIS 6.0 working fine for .Net framework 1.1 and 2.0?   Thanks!Edward During the beta period, I had both VWD 2005 and VS .NET 2003 installed side-by-side and I didn't notice any problems. I've also installed .NET Frameworks 1.1 and 2.0 on IIS 6.0, also without any issues. So, 1 and 2 shouldn't give you any problems. HTH,RyanRyan Olsha...

Access .Net 2.0 Application from .Net 2.0 Web Site
I need to populate a specific form in a .Net desktop application from a .net web application.  Is there an easy way to go about this? Hi, Based on my understanding, you want to start an executable application from your ASP.NET websit, right? We can invoke Process.Start method ( to launch an executable application from ASP.NET application. Note: Please keep in mind, the ASP.NET application is running on the server, so it will start the executable application that exists in the server.   I look...

Getting Started with Visual Studio 2005 Beta 2 and Visual Web Developer Express Edition 2005 Beta 2
Visual Studio 2005 Beta 2 was released on 4/17/2005.  Here's some important information for users to get started with: If you installed any version of Whidbey Beta 1 products, you must uninstall all Whidbey Beta 1 products before installing Beta 2.  The following links provide details and additional information about uninstalling: You ...

Upgrading from "Visual Web Developer 2005 Express Edition Beta 2" to "Visual Studio 2005 Beta 2"
Newby question: I am learning ASP.NET and downloaded "Visual Web Developer 2005 Express Edition Beta 2" in order to practice and learn the ropes.I just received "Visual Studio 2005 Beta 2" and would like to upgrade. However, I haven't found any reference to removing "Visual Web Developer 2005 Express Edition Beta 2" before installing "Visual Studio 2005 Beta 2".Should I remove it?What do I need to back up before doing so?Thanks in advance,Ira I believe you can install VS on top of VWD. They, in fact, can coexits (although they will share some files).Thanks----------------------------------...

Do I need to install SOL 2005 server express edition with Visual Web developer 2005 beta 2.0?
Hello,,after I install VWD 2005 beta 2.0 on my machine, I also try to install the download 2005 SQL express edition , too. However, It won't let me to install SQL express because it said that I have to clean something on my machine. Do anyone have problem like this? is VWD 2005 have SQL 2005 express in it or not? I am confused... You don't need to have SQL 2005 to run VWD beta 2.0.  However if you are playing with the beta than its most likely because you want to learn about the feature 2.0 offers and if that is the case then I strongly recommend that you install SQL 2005 because...

DW.Net 2.0, TreeView expansion in VB.Net 2005
Hello, I created a TreeView datawindow in DW.Net 2.0 Designer. It contains 3 expansion levels. The inner level expands correctly in the designer, displaying multiple lines as appropriate. In Visual Studio 2005, under VB.Net, all levels look correct, except that the innermost level will not display more than one line. Anyone have an idea what is needed under VB.Net to permit all detail lines to display? Thanks for your help. Joel H. Replying to my own message: This problem appears to have been caused by incorrect filters. An extra filter was created in a l...

Visual Web Developer Express 2005 and Visual Studio .Net 2005
I have Visual Studio .NET installed and have purchased a textbook for learning that uses examples, cases, and projects which reference use of Visual Web Developer Express 2005 (VWD). I have discovered that there are some nuances of differences between the Web UI in Visual Studio .Net 2005 and VWD. Therefore, I want to install VWD. I downloaded VWD and started to install it but stopped as I noticed the intallation as about to copy all it's files into the same directory the contained Visual Studio. I'm scared I'm going to screw up my Visual Studio installation, so I thought I&...

Web resources about - How do I edit a dataset from a gridview and then iterate through the updated dataset? (.Net 2.0/VB/Visual Web Developer 2005) -

Dungeons and developers
Have you ever wanted to learn web development or just refine your webdev skills? Dungeons and Developers gives your quest for knowledge a role ...

Video game developer - Wikipedia, the free encyclopedia
A video game developer is a software developer (a business or an individual) that creates video games . A developer may specialize in a certain ...

Uncharted 4 developer hints at Drake’s fate under Sony
Someone looks worried... Uncharted developer Naughty Dog has already said that the upcoming Uncharted 4: A Thief's End will be the last game ...

Apple's iAd may soon allow developers to keep all the revenue
Back in 2010, Steve Jobs revealed Apple’s new mobile advertising platform iAd. The goal of this new venture into advertising was to make the ...

A prominent developer who claims bitcoin has 'failed' denies he's part of a 'banker conspiracy'
A high-profile developer made waves last week with the explosive claim that bitcoin has "failed." Mike Hearn, who has worked around the digital ...

Family Caught In Battle Between HOA & Developers While Their Yard Falls Into Pond
... which is supposed to handle such disasters, but they do nothing because the pond in question still technically belongs to the developers, who ...

Crytek will help colleges train young VR developers
Crytek is best known for Crysis, Far Cry and other games that push the limits of CryEngine, a developer tool that it licenses to other studios. ...

The Windows 10 store has a serious app discovery issue, and its developers aren’t pleased
Windows 10 has a significant problem with app searching and discovery, and it's driven one longtime developer to call for boycotting the Windows ...

QuickBooks Recruits App Developers To Create Greater End-User Value
How can a market leader stay on top? Innovation, engagement, self-disruption, entrepreneurship and thought leadership are all solid business ...

NYC Real Estate Developer Charged in Hamptons Vehicular Homicide Accused of Trying to Buy Boat to Flee ...
Sean Ludwick, the New York real estate developer who allegedly dumped his dead friend’s body in the street after getting into a car wreck, was ...

Resources last updated: 1/22/2016 11:53:16 PM