Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7903815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:50:29+00:00 2026-06-03T09:50:29+00:00

I had a data grid with more than 100 rows on it if the

  • 0

I had a data grid with more than 100 rows on it
if the user click the first column of the row the whole row must be selected and if he click on any other column it must not select the whole row
I set the selection mode of datagridview cellselection and made it read only also and tried all the below code but found no use can any one suggest any idea

private void tbljobdata_CellClick(object sender, DataGridViewCellEventArgs e)
{
    if (tbljobdata.CurrentCell.ColumnIndex == 0)
    {
        tbljobdata.Rows[tbljobdata.CurrentCell.RowIndex].Selected = true;
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:50:31+00:00Added an answer on June 3, 2026 at 9:50 am

    Handle mouse down event since thats captured the first.

    private void tbljobdata_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
    {
        if (e.ColumnIndex == 0)
            tbljobdata.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
        else
            tbljobdata.SelectionMode = DataGridViewSelectionMode.CellSelect;
    }
    

    Alter the read only property too accordingly under the condition required.. you can set readonly for individual cells in fact if you want

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had grid view which bind sql data source and added field to update
I had grid view which retrieved data from database and mad update for specific
I had used a webgrid and displayed the data fine.For one column in the
I had data like this var pageval = $('#grid') .load('/Dealer/AllClaims?page=5&__=634673230919806673 #grid', CallBackFunction); I had
A discussion happened today where a grid containing data, which ultimately had data attached
in this sample the sorting of the grid works well with the first column.
Question: How to append more rows to the celltable/datagrid? I think there must be
I have a live database that had some data deleted from it and I
Suppose I'm making a JDBC call and I had fetched data from a database
I Had Drop down list and I want to fill it with data from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.