Results 1 to 6 of 6

Thread: Compare between 2 GridView

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2009
    Posts
    19

    Compare between 2 GridView

    Hello Every one ,

    I try to make program .. which have to Gridview
    one contains all Data in the Databasae and another is contains some of these data

    and I try to compare between this Two GridView and show that gridview1 is contains the data in gridview2 by change the color of row in the gridview1...


    please help me..

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Compare between 2 GridView

    Hello,

    Can you describe how you are populating the GridViews?

    Doing a comparison between the GridViews is probably the wrong place to do the comparison, it should be done before you populate the GridViews.

    If you provide some more information about what you are doing, then I am sure that someone here will be able to help.

    Gary

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2009
    Posts
    19

    Re: Compare between 2 GridView

    My idea is to make program that contain Course Table and anothe Table called Coursetaken

    I fill the Gridview with the first table
    and I want to make the subject that user take in another color
    so its easy to know which subject is take or not
    depend of the row color
    Last edited by miney; Jun 7th, 2011 at 08:00 AM.

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Compare between 2 GridView

    Hello,

    Yes, I see what you are trying to do, but you didn't answer my question.

    How are you binding the data to the GridView? Are you using a SqlDataSource? Are you using a BLL and a DAL? Or what?

    You are going to want to make this easy on yourself, and get this information "before" you bind it to the GridView's.

    Gary

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Mar 2009
    Posts
    19

    Re: Compare between 2 GridView

    I am binding the data By SqlDataSource

    I know what you see but I want to Show the information or dtat in one Gridview

  6. #6
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Compare between 2 GridView

    Hello,

    And I am not saying that you can't. What I am saying is that you should figure out that information before binding that GridView's, so that when you are binding the GridView's you can take the appropriate action while the GridView is being bound, i.e. changing the back ground colour of the row.

    Part of the problem, in my opinion, is that you are using SqlDataSource. You would be much better off removing this design pattern from your application, and instead, use straight up ADO.Net. Refer to the links in my signature for more information.

    Gary

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width