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

  • Home
  • SEARCH
  • 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 4616474
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:59:11+00:00 2026-05-22T01:59:11+00:00

I have binded a custom datatable to gridview. Now I want to validate if

  • 0

I have binded a custom datatable to gridview. Now I want to validate if the value of cells of the column “DocumentsAttached” is Yes or No. If it is yes, then an alert message displaying ” Documents are Attached”. If No, a pop up box with message would you like to continue” Yes/No…If yes, is chosen my submit button should go through otherwise no.

Hope i made sense until now. Below is my aspx

 <asp:GridView ID="UploadDocs" AutoGenerateColumns="False" runat="server" 
         EnableViewState="true" onrowdatabound="dgdUpload_RowDataBound" style="margin-top: 0px">

 <Columns>

<asp:HyperLinkField  DataTextField="DocName" HeaderText="Invoice File Name" DataNavigateUrlFields="FilePath" DataNavigateUrlFormatString="{0}">   
</asp:HyperLinkField>
  <asp:BoundField HeaderText="Document Included" DataField="DocumentsAttached" ReadOnly="true" />
 <asp:BoundField HeaderText="Identifier" DataField="Identifier" Visible="false"/>
 <asp:CommandField ButtonType="Button" HeaderText="Delete" ShowDeleteButton="true"/>
</Columns>
 </asp:GridView>
   <asp:Button ID="btnSubmit" runat="server" Text="Save to MassUploadList" />

Can anyone help me to achieve this please.

  • 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-22T01:59:12+00:00Added an answer on May 22, 2026 at 1:59 am

    The function that I used to serve my purpose is below

    <script language="javascript" type="text/javascript">
    
    function Validate() {
        var cntrlname = document.getElementById('<%= gridview1.ClientID %>');
        var gridcell;
        var retVal = 1;
        var result = 1;
        for (i = 1; i < cntrlname.rows.length; i++) {
            if (cntrlname.rows[i].cells[2].innerText == "No") {
                retVal = 0;
            }
            if (retVal == 0) {
                return window.confirm("One of the Attachments is missing, would you like to proceed")
            }
             else{
                 return true;
             }
             }
    }
    
    
    function window.confirm(str) {
        execScript('n = msgbox("' + str + '","4132")', "vbscript");
        return (n == 6);
    }
    

    The column documents attached is readonly, the user will not be able to make any changes to it.So , this displays a confirmation box if there any attachments missing, if the user is ok …it will execute the server side code otherwise will not.

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

Sidebar

Related Questions

I have created 2 dropdownlists that are binded to a SQL DB and then
I have list of checkboxes in list binded by Custom simpleCursorAdapter . In my
I have a Button and the button content is binded to a custom class
I have a gridView binded to a data source, and I have a ButtonField
Background I have a custom collection that is binded to the datagridview this.datagridview.DataSource =
I have a DataGridView binded to this table: [Users] ID Name -- ---- 11
I have a listview that is binded to a ThreadSafeObservableCollection. The background of each
Which one is better from performance view user control or custom control? Right now
I've binded the tooltip of a slider control to it's Value property and i'm
I'm creating a custom model binder in an Mvc application and I want 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.