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

  • SEARCH
  • Home
  • 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 3608416
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:29:54+00:00 2026-05-18T21:29:54+00:00

I have TextBox1 whose Default text is Sumit and a gridview with records and

  • 0

alt text

I have TextBox1 whose Default text is Sumit and a gridview with records and button field in each row ..

On Page load event

I want if textbox1 text is Sumit …. then all the records in gridview1 whose name column values is sumit …. then that rows Book button will be disabled and rest of all will be remain as it is in Enableed form …

i m using Visual Studio 2008 with vb

Is this coding is right : ?

Protected Sub GridView1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.DataBound
        For Each myRow As GridViewRow In GridView1.Rows
            'Find the checkbox
            Dim lab1 As Label = DirectCast(myRow.FindControl("Label1"), Label)
            If lab1.Text = "Sumit" Then
                'Find the Delete linkbutton and hide it
                Dim deleteButton As Button = DirectCast(myRow.FindControl("Button1"), Button)
                deleteButton.Enabled = False
            End If
        Next
    End Sub

But this coding doesn’t disabled the button …. in rows whose name field is Sumit

  • 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-05-18T21:29:55+00:00Added an answer on May 18, 2026 at 9:29 pm

    In the grid view item data bound eventhandler, set button.Enabled = false if “name” in the dataitem is sumit.

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

Sidebar

Related Questions

I have three TextBox controls on the page <asp:TextBox ID=TextBox1 runat=server AutoPostBack=True OnTextChanged=TextBox_TextChanged TabIndex=1>
I have a textbox and a link button. When I write some text, select
I have an ASP.NET text control FromDate whose visible property is set to false,
My ASP.NET page has an <asp:TextBox /> whose text input is encoded via HttpUtility.HtmlEncode();
I have a textbox whose input is being handled by jQuery. $('input.Search').bind(keyup, updateSearchTextbox); When
I have a textbox whose value I want to set based on the inner
I have a TextBox whose value is passed to an int property in an
I have a textbox with the Text property bound to a dataset column with
I have a textbox with an onchange event. Why does this event not fire
I have a TextBox control on my Form. I use the Leave event on

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.