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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:32:43+00:00 2026-06-10T14:32:43+00:00

I am using a SubGrid. I will click a link add session in the

  • 0

I am using a SubGrid. I will click a link “add session” in the subgrid which will add rows to the subgrid. I can add n number of rows. Now i need to validate each added rows in the sub grid. How could i do that?

I am pasting my code below…

//This is my jqgrid code:

function loadSubGrid(subgrid_id, row_id) {

   DayID = $('#DayEvents').getCell(row_id, 'DayID');
    var pager_id;
    subgrid_table_id = subgrid_id + "_t";
    pager_id = "p_" + subgrid_table_id;
    $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><a href=# id='AddSession' OnClick='addRow(\"" + subgrid_table_id + "\");'>add session</a><div id='" + pager_id + "' class='scroll'></div>");

    jQuery("#" + subgrid_table_id).jqGrid({
        url: 'Event.asmx/GetSubGridDay',
        datatype: 'json',
        mtype: 'POST',
        cellEdit: false,
        cellsubmit: 'clientarray',
        onCellSelect: GridCellClick,
        ajaxGridOptions: { contentType: 'application/json; charset=utf-8' },
        serializeGridData: PrepareGridPostData,
        jsonReader: { repeatitems: false, root: "d.rows", page: "d.page", total: "d.total", records: "d.records" },
        colNames: ['sessionId', 'session', 'start time', 'end time', 'Speaker'],
        colModel:
                          [{ name: 'SessionId', index: 'SessionId', width: 90, formatter: 'text', align: 'center', hidden: true },
                          { name: 'SessionName', index: 'SessionName', width: 90, formatter: 'text', align: 'center', edittype: 'text', editable: true, editoptions: { size: 10, maxlength: 15, dataEvents: [{ type: 'change', fn: GetRemainingEffort }, { type: 'focus', fn: clearCellValues }, { type: 'blur', fn: resetCellValues}]} },
                          { name: 'StartTime', index: 'StartTime', width: 90, formatter: 'text', align: 'center', edittype: 'text', editable: true, editoptions: { size: 10, maxlength: 15, dataInit: function(element) {
                              $(element).timepicker({})
                          }, dataEvents: [{ type: 'change', fn: GetRemainingEffort }, { type: 'focus', fn: clearCellValues }, { type: 'blur', fn: resetCellValues}]}
                          },
                          { name: 'EndTime', index: 'EndTime', width: 90, formatter: 'text', align: 'center', edittype: 'text', editable: true, editoptions: { size: 10, maxlength: 15, dataInit: function(element) {
                              $(element).timepicker({})
                          }, dataEvents: [{ type: 'change', fn: GetRemainingEffort }, { type: 'focus', fn: clearCellValues }, { type: 'blur', fn: resetCellValues}]}
                          },

                            { name: 'Speaker', index: 'Speaker', width: 300, editable: false, formatter: 'showlink', formatoptions: { baseLinkUrl: 'javascript:', showAction: "Speaker('", addParam: "');"} },


                          ],
        rowNum: 10,
        height: 'auto',
        autowidth: true
    });

}

Now in this line in the above code it calls a function to open a dialog box..

 { name: 'Speaker', index: 'Speaker', width: 300, editable: false, formatter: 'showlink', formatoptions: { baseLinkUrl: 'javascript:', showAction: "Speaker('", addParam: "');"} },

The function to open the dialog box is below:

function Speaker() {


        $("#SpeakerPopUp").dialog('open');

        $("#SpeakerPopUp").dialog(
{

    autoOpen: true,
    height: 500,
    width: 500,
    modal: true,
    title: 'Speakers List',
    open: gridData,
    buttons: {
        'cancel': function CancelCheck() { $(this).dialog('close'); },
        'Save': SpeakerSelectionSave
    }
});
    }

}

Now what i need is it should not open the dialog box if any one of the column in that subgrid row is empty.. Please help me out.. Hope i explained my need clearly..

  • 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-10T14:32:45+00:00Added an answer on June 10, 2026 at 2:32 pm

    Just insert the following lines in the function speaker before $(“#SpeakerPopUp”).dialog(‘open’);

         if (_lastSelRow == null) { alert("enter all"); }
                else {
    
                    alert("test" + _lastSelRow);
                    if (($('#' + _lastSelRow + '_SessionName').val() == "") || ($('#' + _lastSelRow + '_StartTime').val() == "") || ($('#' + _lastSelRow + 'EndTime').val() == "")) 
    else
    {
    ///
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
using a binary search tree I need to add to a vector all int
Using Delphi 2010. I am looking for (possibly) a function or procedure which can
Using gcc and ld on x86_64 linux I need to link against a newer
Using Location.getBearing(); I seem to get randomly changing bearings. Aka, I can turn the
Is it possible to add data to a subgrid when the data type for
I am using JqGrid with javascript. I would set the height of each table
Using Rails 3.2.0 with haml and sass: I Would like to link an external
Using android 2.3.3, I have a background Service which has a socket connection. There's
Using jQuery, one can easily find out whether a particular element is visible using

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.