Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Disable a row in datagrid


  • Please log in to reply

#1
HappyTomato

HappyTomato

    Member

  • Member
  • PipPip
  • 38 posts
Hi all, thanks in advance for taking the time to help! :tazz:

I'm coding a win application using C#, the winform contains a datagrid with information plus two columns of buttons that coresponds to each row.

To explain it in a simplified way... The program works by going through a user defined csv file containing a list and attempt to match each entry with the ones in the database, and if there's a match, the extra information in the database corresponding to that entry will be displayed on the datagrid, and if there's no match, just the entry from the csv will be displayed.
So the resulting datagrid display will be similar to the original csv file except that for the entries with matches to the database, more info will be displayed.

My question is, is there a clear way of maybe disabling particular rows in the datagrid so the user cannot click on it? Mainly I want the user to not be able to click on the buttons on those rows that didn't match with database - i.e. those rows with no extra info in the datagrid. (because the extra buttons gives extra functionalities to the rows that matched the database and the program crashes if the user tries to click on the button next to the rows that didn't match the database)

I've been searching the Internet for a solution but I only managed to find very few and all of those looked extremely complicated.. does C# not provide better solution than that?

I hope that was clear enough.. Any help is greatly appreciated! :)

Edited by HappyTomato, 22 August 2005 - 07:14 PM.

  • 0

Advertisements







Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP