Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 11th, 2008, 05:12 AM
Registered User
Join Date: Sep 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to twyce

Hi All
My code is already exporting datafrom a datagrid to an excel spreadsheet.My grid has student numbers and the modules they are registered for. example:
StudentID ModuleCode
s20600752 WIC2345
s20569875 POP3456
s20587466 TYU8765
s20569875 UYT6788

Now I want to be able to select a ModuleCode from the grid and only export students that are registered for that particular module.
Is this possible? please help?

Old November 14th, 2008, 02:22 PM
Registered User
Join Date: Nov 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

dim e as integer = 0
For e = 0 To yourdatagridname.RowCount - 1
            If yourdatagridname.Rows(e).Cells(cellnumber).Value = "specificmodulecode" Then
            'export the data you want here
            end if
specificmodulecode is the module code you want to search for
yourdatagridname is the name of the grid
cellnumber is the cell you want to search

Try that


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting a particular item in Datagrid muskaanbajaj ASP.NET 1.0 and 1.1 Professional 13 December 1st, 2005 07:47 AM
Selecting Fields to be printed on vb6 report marvs Pro VB Databases 0 June 29th, 2005 07:36 PM
Selecting data from lookup fields hashtlishnii Access 3 September 25th, 2003 11:14 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.