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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:07:16+00:00 2026-06-08T02:07:16+00:00

I have an ASP.NET website with a C# back-end that uses Jqgrid. I want

  • 0

I have an ASP.NET website with a C# back-end that uses Jqgrid.

I want users to be able to select an item in the grid to edit. One of the fields that can be edited will be presented to users as a drop-down selection list with only valid options for that user.

For example, let’s say I have a grid displaying persons. If “person1” is edited, the user may be able to choose “blue” or “red” from the selection list for this item, but if “person2” is edited the user may only choose “yellow” or “green” from the selection list.

I want to dynamically populate the selection list based on what person/row is selected.

I have editoptions and dataurl set on the specific field as follows:

editoptions: { dataUrl: 'FetchData.aspx' }

Yet, I somehow need some kind of parameter to pass to the FetchData.aspx page so that it can do its background-checking on the specific person and create the correct list for the specific “person”.

I was hoping I could pass the rowid or itemname or something as follows to identify the specific row/item that is selected:

editoptions: { dataUrl: 'FetchData.aspx?selecteditem=' + Id }

How can I pass a parameter so that I can create the correct list of items for the specific item? There are countless similar questions on the web, but I haven’t been able to find a conclusive answer…

  • 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-08T02:07:18+00:00Added an answer on June 8, 2026 at 2:07 am

    I have solved the problem by adding the following onSelectRow function (note that ‘Id’ in the below code represents the name of a column I want to pass as parameter. It can be any column name in your grid) :

    onSelectRow: function (id) {
      var temp = $("#list").getRowData(id)['Id']
      $("#list").setColProp('mySelectListColumnName', { editoptions: { dataUrl:'FetchData.aspx?selecteditem=' + temp });
    }
    

    The above helps to pass the parameter. However, this alone is not sufficient – it allows FetchData.aspx to receive a parameter and customize the html response accordingly, but it only fetches the values once from the dataUrl – so it doesn’t refresh when I select different rows.

    To solve this, I have also added the following statement:

    jQuery.extend(jQuery.jgrid.edit, { recreateForm: true });
    

    This ensures that the edit form will be recreated every time that edit is clicked, which is what I want since the edit form will be slightly different for each row. Works perfectly. Hope this helps someone out there – there is a maze of options out there and this is the simplest I’ve seen. And it works.

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

Sidebar

Related Questions

I have an ASP.Net website which uses a MySQL database for the back end.
I have a website that uses asp.net 3.5 and Sql server 2008 as backend
I have Asp.net website for domain A users with the Integrated Windows Authentication. Now
I have a ASP.NET website deployed to IIS with a couple of ashx that
I have an ASP.NET website and am having trouble capturing some specific requests that
I have an asp.net mvc application where i want the user to be able
So I have a jqGrid on an ASP.NET MVC 3 website. It's loading the
I am new to .net and the back end of the website that i
I'm currently building the Admin back-end for a website in ASP.NET MVC. In an
I have developed a website in asp.net mvc that reads from a xml-file to

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.