Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
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