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 227221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:34:49+00:00 2026-05-11T19:34:49+00:00

I have an extended GridView class, GridViewEx, which inherits from the basic ASP.NET gridview.

  • 0

I have an extended GridView class, GridViewEx, which inherits from the basic ASP.NET gridview. I override the CreateColumns method to intercept the columns collection and inject my own column, containing a modified CheckBoxField.

(Sidenote: I tried looking some other method of storing and updating which rows were selected and just using the checkbox as a display mechanism, but ultimately the checkbox was the easiest method for handling everything.)

The CheckBoxField has its ReadOnly property set to true when it is created (and it remains true when it is added to the columns collection), which should prevent it from being passed along as a parameter for Update requests against the gridview’s datasource.

As you may infer, that’s not happening. When I try to perform a row edit and update, I get a “Too many parameters” warning with a single parameter which has no name. If I turn off the multiselect function, this goes away. So I know that my checkboxfield is not being treated as a Readonly field. But I don’t know how to fix it!

Any ideas on where, when, or how I need to set up this field so that it won’t be passed automatically as a parameter to my updates?

  • 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-11T19:34:49+00:00Added an answer on May 11, 2026 at 7:34 pm

    Ok, figured it out.

    I also had a custom CheckBoxField which overrides InitializeDataCell and writes in my own checkbox. I needed to add an extra check so that it disables the field during edits if Readonly is set. That seems to have resolved this issue. Hope this helps anyone else out who might be doing custom GridView edits.

        internal class InputCheckBoxField : CheckBoxField
        {
            //... Some boilerplate for ID and other properties here
    
            protected override void InitializeDataCell(DataControlFieldCell cell, DataControlRowState rowState)
            {
                base.InitializeDataCell(cell, rowState);
    
                if (cell.Controls.Count == 0)
                {
                    CheckBox chk = new CheckBox();
                    chk.ID = CheckBoxID;
                    chk.AutoPostBack = true;
                    cell.Controls.Add(chk);
    
                    //This was the needed check
                    if(ReadOnly && rowState == DataControlRowState.Edit)
                        chk.Enabled = false;
                }
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 105k
  • Answers 105k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is something I've done before - as the original… May 11, 2026 at 8:42 pm
  • Editorial Team
    Editorial Team added an answer So it seems that there is no way to effectivly… May 11, 2026 at 8:42 pm
  • Editorial Team
    Editorial Team added an answer It's basically just a matter of building the RSS file… May 11, 2026 at 8:42 pm

Related Questions

...specifically, the fn_listextendedproperty system function in MSSQL 2005. I have added an Extended Property
I have an array of float values and want the value and more importantly
I've set up FBA on an extended site, added a user, verified the central
I am having some trouble with the Google Maps API . I have an
I'm making a Scorched Earth like game in Java (for my exam project :D),

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.