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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:20:24+00:00 2026-05-24T06:20:24+00:00

I have a table that is dynamically created in some c# code-behind when a

  • 0

I have a table that is dynamically created in some c# code-behind when a dropdown is changed. There 9 columns in this table. The first 8 should be in one group. The last attribute in another. When the last attribute is selected I want the first 8 to go unchecked. When any of the first 8 are checked I wanted the last attribute to go unchecked. I added some javascript and it works but it causes the tables to load extremely slow. If there is a simpler way please let me know. Thanks!

adding javascript function calls through c#

attr1.Attributes.Add("onClick", "uncheckOK(" + rowCount + ");");

attr2.Attributes.Add("onClick", "uncheckOK(" + rowCount + ");");

attr3.Attributes.Add("onClick", "uncheckOK(" + rowCount + ");");

attr4.Attributes.Add("onClick", "uncheckOK(" + rowCount + ");");

attr5.Attributes.Add("onClick", "uncheckOK(" + rowCount + ");");

attr6.Attributes.Add("onClick", "uncheckOK(" + rowCount + ");");

attr7.Attributes.Add("onClick", "uncheckOK(" + rowCount + ");");

attr8.Attributes.Add("onClick", "uncheckOK(" + rowCount + ");");

attr9.Attributes.Add("onClick", "uncheckAttr(" + rowCount + ");");

functions to uncheck

function uncheckAttr(row) {
    var chk1 = document.getElementById("MainContent_attr1-" + row);
    chk1.checked = false;
    var chk2 = document.getElementById("MainContent_attr2-" + row);
    chk2.checked = false;
    var chk3 = document.getElementById("MainContent_attr3-" + row);
    chk3.checked = false;
    var chk4 = document.getElementById("MainContent_attr4-" + row);
    chk4.checked = false;
    var chk5 = document.getElementById("MainContent_attr5-" + row);
    chk5.checked = false;
    var chk6 = document.getElementById("MainContent_attr6-" + row);
    chk6.checked = false;
    var chk7 = document.getElementById("MainContent_attr7-" + row);
    chk7.checked = false;
    var chk8 = document.getElementById("MainContent_attr8-" + row);
    chk8.checked = false;
}
function uncheckOK(row) {
    var chk9 = document.getElementById("MainContent_attr9-" + row);
    chk9.checked = false;
}
  • 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-24T06:20:26+00:00Added an answer on May 24, 2026 at 6:20 am
    function uncheck() {
        var clickSource = event.srcElement;
        if (clickSource != null) {
            var fullid = clickSource.name;
            if (fullid != null) {
                if (fullid.indexOf('attr') != -1) {
                    var checkboxid = fullid.substring(fullid.indexOf('attr'));
                    var row = checkboxid.substring(checkboxid.indexOf('-') + 1);
                    var attr = checkboxid.substring(checkboxid.indexOf('-') - 1, checkboxid.indexOf('-'));
                    if (attr == '9') {
                        uncheckAttr(row);
                    }
                    else {
                        uncheckOK(row);
                    }
                }
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table that is created in a DataList in ASP.Net. This table
I have a table that looks something like this: word big expensive smart fast
I have a table that got into the db_owner schema, and I need it
I have a table that contains tasks and I want to give these an
I have a table that has redundant data and I'm trying to identify all
I have a table that records a sequence of actions with a field that
I have a table that holds information about cities in a game, you can
I have a table that has an insert trigger on it. If I insert
I have a table that looks like that: The rows are sorted by CLNDR_DATE
I have a table that was imported as all UPPER CASE and I would

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.