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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:12:23+00:00 2026-06-12T08:12:23+00:00

I have a WebGrid on my Razor-based site and now I would like to

  • 0

I have a WebGrid on my Razor-based site and now I would like to have a Checkbox and a Textbox inside a Column, and when I click on the Checkbox after entering a Quantity, I would like it to submit the form, so I can add that item to the database (I’m not really keen on AJAX for this right now, unless it’ll be easier and better). But I just don’t know how I should go about this.

enter image description here

Should I wrap each combo of Checkbox and Textbox in its own form, so there will be a form for every column that has a Checkbox? Or should I wrap the whole WebGrid div inside just 1 form and then determine which ones were checked on submission? I’m really not sure where to even start here.

Any help will be much appreciated.

  • 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-12T08:12:25+00:00Added an answer on June 12, 2026 at 8:12 am

    If you aren’t keen on ajax you can wrap that whole grid in a form then using the checked event on the checkbox grab the id of that checkbox so you know specifically which value to look at when the form post. You’ll have to tie each checkbox to it’s associated textbox via an identifier in the id, cause it will post all the values of the grid. Having multiple forms on a page is something you would do if the page were sectioned where each section performs specific functionality. In this case the grid is performing one piece of functionality across the entire grid.

    In lieu of that, and ajax style approach is going to be the best bet. Using jquery it would be fairly each to attach a ajax.post to each element in the grid that you want to make a post for. much cleaner than trying to write all the extra code to figure out what checkbox was altered and what the data is that you want to look at from the post.

    $.ajax({
                type: "POST",
                url: path,
                data: "id=" + checkboxId + "text=" + textboxdata+ ,
                success: function() {
                    // if needed alert user data saved
    
                }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WebHelpers WebGrid in MVC 3.0 and would like to custom display
I have an mvc3 webgrid that contains results that I would like to filter
I am using a webGrid and would like to be able to change the
I have an MVC3 webgrid where the first column is being hidden by jQuery
I have a ASP.Net MVC Webgrid and when the 'SuccessRate' column is less than
I want to have a column as row number in MVC WebGrid. How can
I'm looking to create some hyperlinks in a Webgrid. I'd like to have the
I have a webgrid presenting data grouped by weeks. The first grid column contains
I have a webgrid and there is a column I want to be visible
I have, surprisingly, been searching on the internet how to bind a webgrid column

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.