Filter Dataset/Current DG Source

Posted on 2006-03-27
Last Modified: 2010-05-18
I have a DataGrid bound to a dataset - what I want to do is, when the user select s a row, to filter the grid's source and bind labels with details from the dataset  - specific to the row selected (datagrid contains product list - selecting row will bind labels above datagrid to product details)
Question by:tbaseflug
    1 Comment
    LVL 12

    Accepted Solution

    Create an event handler for the SelectedIndexChanged event. Inside that, you can pick up the new selected item by using:

    This will be a DataGridItem (can be cast down to a TableRow) from the datagrid. From this you can get your row identifier (product ID or name) and use that to get the details from the database that you want. Alternatively, if all the info is in the row, then you can just pick it out and write it to the labels.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    Article by: Najam
    Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now