Click here to Skip to main content
15,121,230 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Can You Really Use ASP.NET Core 3.1 to Build Production Web Pages/Apps? Pin
Richard Deeming3-Mar-20 5:59
mveRichard Deeming3-Mar-20 5:59 
AnswerRe: Can You Really Use ASP.NET Core 3.1 to Build Production Web Pages/Apps? Pin
jkirkerx4-Mar-20 8:59
professionaljkirkerx4-Mar-20 8:59 
AnswerRe: Can You Really Use ASP.NET Core 3.1 to Build Production Web Pages/Apps? Pin
Bohdan Stupak18-Mar-20 6:57
professionalBohdan Stupak18-Mar-20 6:57 
QuestionApplication for creating vector objects Pin
MitchCZ2-Mar-20 3:45
MemberMitchCZ2-Mar-20 3:45 
AnswerRe: Application for creating vector objects Pin
Pete O'Hanlon2-Mar-20 3:59
mvePete O'Hanlon2-Mar-20 3:59 
GeneralRe: Application for creating vector objects Pin
MitchCZ2-Mar-20 4:31
MemberMitchCZ2-Mar-20 4:31 
GeneralRe: Application for creating vector objects Pin
Pete O'Hanlon2-Mar-20 5:20
mvePete O'Hanlon2-Mar-20 5:20 
QuestionSome GridView controls are running empty rows. Any ideas to fix Pin
samflex25-Feb-20 8:57
Membersamflex25-Feb-20 8:57 
Greetings again,

Please forgive me for posting too much code. I am trying to post something that gives an idea of what I am struggling with.

Looking at the code, you can see there are 7 controls, GridView1, gvspouse, etc.

When the user queries the DB and there is say one row of data for say GridView1, the rest of the controls display one row of data. This is fine.

However, if the query returns two or more rows of data for one control, usually the rest of controls will show two or more empty rows of data.

This is not good.

We would like only the controls with two or more rows of data to return those rows and those controls that don't have any data to return just one row so user can fill that row if need be or leave it empty.

Is this possible?

Again, I apologize for too much code. My hope is that it helps convey the point I am trying to make when I say seven GridView controls.

Many thanks in advance

/HTML
     <asp:UpdatePanel ID="PnlUsrDetails" runat="server">
       <ContentTemplate>
           <asp:MultiView ID="myMultiView" ActiveViewIndex="0" runat="server">
           <asp:View ID="vwPersonalData" runat="server">
            <!-- All user textboxes for input here -->
            <span style="font-weight:bold;font-size:18px;color:#000000;">Name, title, and email address of employee filling this form</span><br /><br />
     <div>
     <div class="table-responsive">
           <tablecccc>
            <tr>
                <td>
                    <div class="form-group">
                        <label id="lblEmpID">
                            <span style="font-weight: bold; font-size: 16px; color: #000000;">Enter your Employee Id to begin</span><span
                                style="color: #ff0000">*</span></label>
                        <asp:TextBox ID="txtEmpID" maxlength="10" placeholder="Badge ID..." Style="width: 150px;" class="form-control"
                            runat="server" AutoPostBack="true" OnTextChanged="txtEmpID_TextChanged"></asp:TextBox>
                        <br />
                    </div>
                </td>
                <td>
                   <div class="bd-callout bd-callout-danger" id="dprocessed" style="width:90%;" runat="server" visible="false">
                    <div id="checkusername" runat="server" visible="false" style="white-space:nowrap">
                     <asp:Label ID="lblStatus" runat="server"></asp:Label>
                     <asp:Image ID="imgstatus" runat="server" Width="17px" Height="17px" />
                    </div>
                  </div>
                  <div class="waitingdiv" id="loadingdiv" style="display:none;margin-left:5.3em">
                   <img src="images/ajax-loader.gif" alt="Loading" />Please wait...
                  </div>
                 </td>
               </tr>
              </tablecccc>

             </div>
             <div class="bd-callout bd-callout-danger" style="width:70%;">
              <span style="color:#0093B2;font-weight:bold;font-size:1em;"> If you do not have an Employee ID, use the First Initial of first name + first initial of Last Name + date of birth in the format of MMDDYYYY. (For example, John Doe born January 1, 1900 will be, JD01011900)</span></div><br /><br />
          <div class="table-responsive">
            <table class="table">
            <tr>
                <td>
                <div class="form-group">
                <label for="lblEname"><span style="font-weight:bold;font-size:16px;color:#000000;">Employee Name</span><span style="color:#ff0000">*</span></label>
                 <asp:TextBox ID="txteName" placeholder="Employee name..." style="width:200px;" class="form-control" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator id="RequiredFieldValidator2" Font-Bold="true" 
                 SetFocusOnError="true" runat="server" 
                 ErrorMessage="*" ControlToValidate="txteName" /><br />
                 </div>
                 </td>
                <td>
                 <div class="form-group">
                <label id="lblTitle"><span style="font-weight:bold;font-size:16px;color:#000000;">Your title</span><span style="color:#ff0000">*</span></label>
                <asp:TextBox ID="txttitle" placeholder="Employee title..." style="width:200px;" class="form-control" runat="server"></asp:TextBox>
               <asp:RequiredFieldValidator id="RequiredFieldValidator3" Font-Bold="true" 
                   SetFocusOnError="true" runat="server" 
                 ErrorMessage="*" ControlToValidate="txttitle" />
               </div> 
               </td>
                <td>
                 <div class="form-group">
                 <label id="lblEmail"><span style="font-weight:bold;font-size:16px;color:#000000;">Your email address</span><span style="color:#ff0000">*</span></label>
                <asp:TextBox ID="txtemail" placeholder="Employee email..." style="width:200px;" class="form-control" runat="server"></asp:TextBox>
               <asp:RequiredFieldValidator id="RequiredFieldValidator4" Font-Bold="true" 
                SetFocusOnError="true" runat="server" 
                ErrorMessage="*" ControlToValidate="txtemail" />
                </div>
                </td>
            </tr>
           </table>
        </div>
            <br /><br />
     <div id="mainContainer" class="container">   
      <div class="shadowBox">   
       <div class="page-container">   
        <div class="container">   
         <div class="row">   
          <div class="col-lg-12 ">   
           <div class="table-responsive" data-pattern="priority-columns">
          <span style="font-weight:bold;font-size:18px;color:#000000;">1. Name and address of Income Sources of $1,000.00 or greater of Employee (excluding income received from the organization):</span><br /><br />    
     <table class="table">
      <tr>
        <td>
          <asp:gridview ID="Gridview1" RowStyle-Wrap="false" gridlines="None" CssClass="responsiveTable1" runat="server" ShowFooter="true" AutoGenerateColumns="false" onrowdatabound="Gridview1_RowDataBound" OnRowDeleting="Gridview1_RowDeleting">
            <Columns>
            <asp:BoundField DataField="RowNumber" Visible="false" HeaderText="Row Number" />
            <asp:TemplateField HeaderText="Name">
             <headerstyle horizontalalign="Left" />
                <ItemTemplate>
                    <asp:TextBox ID="txtsourcename" Text='<%# Eval("sourcename") %>' placeholder="Name...(e.g, Jane Doe)" runat="server" style="width:375px;" AutoPostBack="true" class="form-control textClass" OnTextChanged="txtsourcename_TextChanged"></asp:TextBox><br />
                    <asp:CheckBox ID="grid1Details" ClientIDMode="Static" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="Grid1CheckChanged" /><span style="color:#ff0000">*Check this box if N/A</span>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Address">
            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                <ItemTemplate>
                    <asp:TextBox ID="txtsourceaddress" Text='<%# Eval("sourceaddress") %>' placeholder="Address..." runat="server" style="width:375px;" class="form-control textClass"></asp:TextBox><br /><br />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                 <asp:Button ID="ButtonAdd" runat="server" Text="Add another row if needed" 
                        onclick="ButtonAdd_Click" CssClass="grvAddButton" /><br /><br /><br>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                 <asp:Button ID="sourceDelete" runat="server" Text="Delete" CommandName="Delete"
                         CssClass="grvDelButton" OnClientClick="return confirm('Are you sure you want to remove this row?')"  /> <br /><br /><br />
                </ItemTemplate>
            </asp:TemplateField> 
            </Columns>
          </asp:gridview>
        </td>
     </tr>
   </table>
     <span style="font-weight:bold;font-size:18px;color:#000000;">2. Name and address of Income Sources of $1,000.00 greater of Spouse, if any:</span>
         <button type="button" class="btn btn-info" data-toggle="popover" title="Definition of Spouse" data-trigger="focus" data-content="For purposes of this ordinance, the term spouse includes a domestic partner as the Code of organization defines that term."></button><br />                       
   <table class="table">
    <tr>
        <td>                     
            <asp:gridview ID="grvspouse" RowStyle-Wrap="false" GridLines="None" CssClass="responsiveTable1" runat="server" ShowFooter="true" AutoGenerateColumns="false" onrowdatabound="grvspouse_RowDataBound" OnRowDeleting="grvspouse_RowDeleting">
            <Columns>
            <asp:BoundField DataField="SpouseNumber" Visible="false" HeaderText="Row Number" />
            <asp:TemplateField HeaderText="Name">
            <headerstyle horizontalalign="Left" />
                <ItemTemplate>
                    <asp:TextBox ID="txtspousename" Text='<%# Eval("spousename") %>' placeholder="Name...(e.g, Jane Doe)" runat="server" style="width:375px;" class="form-control" AutoPostBack="true" OnTextChanged="txtspousename_TextChanged"></asp:TextBox><br />
                    <asp:CheckBox ID="spouseDetails" ClientIDMode="Static" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="SpouseCheckChanged" /><span style="color:#ff0000">*Check this box if N/A</span>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Address">
            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                <ItemTemplate>
                    <asp:TextBox ID="txtspouseaddress" Text='<%# Eval("spouseaddress") %>' placeholder="Address..." runat="server" style="width:375px;" class="form-control"></asp:TextBox><br /><br />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                 <asp:Button ID="ButtonAdd2" runat="server" Text="Add another row if needed" 
                        onclick="ButtonAdd2_Click" CssClass="grvAddButton" /><br /><br /><br />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                 <asp:Button ID="spouseDelete" runat="server" Text="Delete" CommandName="Delete"
                         CssClass="grvDelButton" OnClientClick="return confirm('Are you sure you want to remove this row?')"  /> <br /><br /><br />
                </ItemTemplate>
            </asp:TemplateField> 
            </Columns>
          </asp:gridview>
        </td>
    </tr>
   </table>
    <span style="font-weight:bold;font-size:18px;color:#000000;">3. Name and address of sources of Interest or Dividends of $1,000 or greater of Employee and/or Spouse: </span><br /><br />
   <table class="table">
    <tr>
        <td>  
            <asp:gridview ID="grvDiv" RowStyle-Wrap="false" GridLines="None" CssClass="responsiveTable1" runat="server" ShowFooter="true" AutoGenerateColumns="false" OnRowDeleting="grvDiv_RowDeleting">
            <Columns>
            <asp:BoundField DataField="DivsNumber" Visible="false" HeaderText="Row Number" />
            <asp:TemplateField HeaderText="Name">
            <headerstyle horizontalalign="Left" />
                <ItemTemplate>
                    <asp:TextBox ID="txtdividentname" Text='<%# Eval("dividentName") %>' placeholder="Name of income or divident source..." runat="server" style="width:375px;" class="form-control" AutoPostBack="true" OnTextChanged="txtdividentname_TextChanged"></asp:TextBox><br />
            <asp:CheckBox ID="divDetails" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="divCheckChanged" /><span style="color:#ff0000">*Check this box if N/A</span>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Address">
            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                <ItemTemplate>
                    <asp:TextBox ID="txtdividentaddress" Text='<%# Eval("dividentAddress") %>' placeholder="Address..." runat="server" style="width:375px;" class="form-control"></asp:TextBox><br /><br />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                 <asp:Button ID="ButtonAdd3" runat="server" Text="Add another row if needed" 
                        onclick="ButtonAdd3_Click" CssClass="grvAddButton" /><br /><br /><br />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                 <asp:Button ID="divDelete" runat="server" Text="Delete" CommandName="Delete"
                         CssClass="grvDelButton" OnClientClick="return confirm('Are you sure you want to remove this row?')"  /> <br /><br /><br />
                </ItemTemplate>
            </asp:TemplateField> 
            </Columns>
           </asp:gridview>
        </td>
    </tr>
   </table>
     <span style="font-weight:bold;font-size:18px;color:#000000;">4. Name and address of sources of reimbursement of expenses of $1,000 or greater of Employee and/or Spouse: (excluding reimbursement of expenses by DeKalb County or reimbursement by any insurance program offered by DeKalb County):</span><br /><br />              
   <table class="table">
    <tr>
        <td>
            <asp:gridview ID="grvReim" RowStyle-Wrap="false" GridLines="None" CssClass="responsiveTable1" runat="server" ShowFooter="true" AutoGenerateColumns="false" OnRowDeleting="grvReim_RowDeleting">
            <Columns>
            <asp:BoundField DataField="ReimNumber" Visible="false" HeaderText="Row Number" />
            <asp:TemplateField HeaderText="Name">
            <headerstyle horizontalalign="Left" />
                <ItemTemplate>
                  <asp:TextBox ID="txtReimbursename" Text='<%# Eval("reimbursementName") %>' placeholder="Name of source of reimbursement..." runat="server" style="width:375px;" class="form-control" AutoPostBack="true" OnTextChanged="txtReimbursename_TextChanged"></asp:TextBox><br />
            <asp:CheckBox ID="reimDetails" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="ReimCheckChanged" /><span style="color:#ff0000">*Check this box if N/A</span>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Address">
            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                <ItemTemplate>
                    <asp:TextBox ID="txtReimburseaddress" Text='<%# Eval("reimbursementAddress") %>' placeholder="Address..." runat="server" style="width:375px;" class="form-control"></asp:TextBox><br /><br />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                 <asp:Button ID="ButtonAd4" runat="server" Text="Add another row if needed" 
                        onclick="ButtonAdd4_Click" CssClass="grvAddButton" /><br /><br /><br />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                 <asp:Button ID="reimnDelete" runat="server" Text="Delete" CommandName="Delete"
                         CssClass="grvDelButton" OnClientClick="return confirm('Are you sure you want to remove this row?')"  /> <br /><br /><br />
                </ItemTemplate>
            </asp:TemplateField> 
            </Columns>
        </asp:gridview>
        </td>
      </tr>
   </table>
      <span style="font-weight:bold;font-size:18px;color:#000000;">5. Honoraria from a single source in the aggregate amount of $500.00 or greater:  (No comma (,)  or period(.), eg 500)</span>
         <button type="button" class="btn btn-info" data-toggle="popover" title="Honoraria Definition" data-trigger="focus" data-content="A payment given to a professional person for services for which fees are not legally or traditionally required."></button><br />
   <table class="table">
    <tr>
        <td>
            <asp:gridview ID="grvHon" RowStyle-Wrap="false" GridLines="None" CssClass="responsiveTable1" runat="server" ShowFooter="true" AutoGenerateColumns="false" OnRowDeleting="grvHon_RowDeleting">
            <Columns>
            <asp:BoundField DataField="HonNumber" Visible="false" HeaderText="Row Number" />
            <asp:TemplateField HeaderText="Honoraria">
            <headerstyle horizontalAlign="Left" />
                <ItemTemplate>
                    <asp:TextBox ID="txthonoraria" Text='<%# Eval("honoraria") %>' placeholder="Honoraria from a single source... eg 500" runat="server" style="width:250px;" class="form-control txtgiftincome" AutoPostBack="true" OnTextChanged="txthonoraria_TextChanged"></asp:TextBox><br />
            <asp:CheckBox ID="honDetails" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="HonCheckChanged" /><span style="color:#ff0000">*Check this box if N/A</span>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Address">
            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                <ItemTemplate>
                    <asp:TextBox ID="txthonaddress" Text='<%# Eval("HonorariaAddress") %>' placeholder="Address..." runat="server" style="width:250px;" class="form-control"></asp:TextBox><br /><br />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Income">
            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                <ItemTemplate>
                     <asp:TextBox ID="txthonincome" Text='<%# Eval("HonorariaIncome") %>' placeholder="Income...(example: 500)" runat="server" style="width:250px;" class="form-control txtgiftincome numeric"></asp:TextBox>
                    <asp:CompareValidator ID="valQtyNumeric" runat="server" ControlToValidate="txthonincome" style="color:red;font-weight:bold;font-size:1.0em;" Display="Dynamic" SetFocusOnError="true"
                 Text="" ErrorMessage="Error: Amount must be digits only!" Operator="DataTypeCheck" Type="Integer">              
                     </asp:CompareValidator><br /><br />

                </ItemTemplate>
           </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                 <asp:Button ID="ButtonAdd5" runat="server" Text="Add another row if needed" 
                        onclick="ButtonAdd5_Click" CssClass="grvAddButton" /><br /><br /><br />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                 <asp:Button ID="HonDelete" runat="server" Text="Delete" CommandName="Delete"
                         CssClass="grvDelButton" OnClientClick="return confirm('Are you sure you want to remove this row?')"  /> <br /><br /><br />
                </ItemTemplate>
            </asp:TemplateField> 
            </Columns>
          </asp:gridview>
        </td>
    </tr>
   </table>
     <span style="font-weight:bold;font-size:18px;color:#000000;">6. Name and address of the source of any gift /or gifts in the aggregate amount or value of $500 or greater from a single source: (excluding gifts from relatives unless the relative is doing business with the County):</span><br /><br />             
   <table class="table">
    <tr>
        <td>
            <asp:gridview ID="grvGift" RowStyle-Wrap="false" GridLines="None" CssClass="responsiveTable1" runat="server" ShowFooter="true" AutoGenerateColumns="false" OnRowDeleting="grvGift_RowDeleting">
            <Columns>
            <asp:BoundField DataField="GiftNumber" Visible="false" HeaderText="Row Number" />
            <asp:TemplateField HeaderText="Name">
            <headerstyle horizontalalign="Left" />
                <ItemTemplate>
                    <asp:TextBox ID="txtgiftname" Text='<%# Eval("giftName") %>' placeholder="Name of source of any gift..." runat="server" style="width:375px;" class="form-control" AutoPostBack="true" OnTextChanged="txtgiftname_TextChanged"></asp:TextBox><br />
                    <asp:CheckBox ID="giftDetails" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="GiftCheckChanged" /><span style="color:#ff0000">*Check this box if N/A</span>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Address">
            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                <ItemTemplate>
                    <asp:TextBox ID="txtgiftaddress" Text='<%# Eval("giftAddress") %>' placeholder="Address..." runat="server" style="width:375px;" class="form-control"></asp:TextBox><br /><br />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                 <asp:Button ID="ButtonAdd6" runat="server" Text="Add another row if needed" 
                        onclick="ButtonAdd6_Click" CssClass="grvAddButton" /><br /><br /><br />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                 <asp:Button ID="giftDelete" runat="server" Text="Delete" CommandName="Delete"
                         CssClass="grvDelButton" OnClientClick="return confirm('Are you sure you want to remove this row?')"  /> <br /><br /><br />
                </ItemTemplate>
            </asp:TemplateField> 
            </Columns>
        </asp:gridview>
        </td>
     </tr>
   </table>
       <span style="font-weight:bold;font-size:18px;color:#000000;">7. Name and address of any organization in which the employee or spouse is an officer, director, partner, proprietor or serves in any advisory capacity from which the income of $1,000.00 or greater was derived:</span><br /><br />            
   <table class="table">
    <tr>
        <td>
              <asp:gridview ID="grvOrg" RowStyle-Wrap="false" GridLines="None" CssClass="responsiveTable1" runat="server" ShowFooter="true" AutoGenerateColumns="false" OnRowDeleting="grvOrg_RowDeleting">
            <Columns>
            <asp:BoundField DataField="OrgNumber" Visible="false" HeaderText="Row Number" />
            <asp:TemplateField HeaderText="Name">
            <headerstyle horizontalalign="Left" />
                <ItemTemplate>
                    <asp:TextBox ID="txtorgname" Text='<%# Eval("orgName") %>' placeholder="Name of organization..." runat="server" style="width:375px;" class="form-control" AutoPostBack="true" OnTextChanged="txtorgname_TextChanged"></asp:TextBox><br />
            <asp:CheckBox ID="orgDetails" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="OrgCheckChanged" /><span style="color:#ff0000">*Check this box if N/A</span>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Address">
            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                <ItemTemplate>
                    <asp:TextBox ID="txtorgaddress" Text='<%# Eval("orgAddress") %>' placeholder="Address..." runat="server" style="width:375px;" class="form-control"></asp:TextBox><br /><br />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                 <asp:Button ID="ButtonAdd7" runat="server" Text="Add another row if needed" 
                        onclick="ButtonAdd7_Click" CssClass="grvAddButton" /><br /><br /><br />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                 <asp:Button ID="orgDelete" runat="server" Text="Delete" CommandName="Delete"
                         CssClass="grvDelButton" OnClientClick="return confirm('Are you sure you want to remove this row?')"  /> <br /><br /><br />
                </ItemTemplate>
            </asp:TemplateField> 
            </Columns>
        </asp:gridview>
        </td>
    </tr>
  </table>
              <span style="font-weight:bold;font-size:18px;color:#000000;">8. Name and address of each creditor to whom the employee or spouse was indebted for a period of 90 consecutive days or more in an amount of $7,500.00 or greater, excluding the purchase or sale of real property, retail installment debt, vehicle payments and student loans:</span><br /><br />            
  <table class="table">
    <tr>
        <td>
            <asp:gridview ID="grvCred" RowStyle-Wrap="false" GridLines="None" CssClass="responsiveTable1" runat="server" ShowFooter="true" AutoGenerateColumns="false" OnRowDeleting="grvCred_RowDeleting">
            <Columns>
            <asp:BoundField DataField="CreditNumber" Visible="false" HeaderText="Row Number" />
            <asp:TemplateField HeaderText="Name">
            <headerstyle horizontalalign="Left" />
                <ItemTemplate>
                    <asp:TextBox ID="txtcreditorname" Text='<%# Eval("creditorname") %>' placeholder="Name of creditor..." runat="server" style="width:375px;" class="form-control" AutoPostBack="true" OnTextChanged="txtcreditorname_TextChanged"></asp:TextBox><br />
            <asp:CheckBox ID="credDetails" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="CredCheckChanged" /><span style="color:#ff0000">*Check this box if N/A</span>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Address">
            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                <ItemTemplate>
                    <asp:TextBox ID="txtcreditoraddress" Text='<%# Eval("creditoraddress") %>' placeholder="Address..." runat="server" style="width:375px;" class="form-control"></asp:TextBox><br /><br />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                 <asp:Button ID="ButtonAdd8" runat="server" Text="Add another row if needed" 
                        onclick="ButtonAdd8_Click" CssClass="grvAddButton" /><br /><br /><br />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                 <asp:Button ID="credDelete" runat="server" Text="Delete" CommandName="Delete"
                         CssClass="grvDelButton" OnClientClick="return confirm('Are you sure you want to remove this row?')"  /> <br /><br /><br />
                </ItemTemplate>
            </asp:TemplateField> 
            </Columns>
        </asp:gridview>
        </td>
       </tr>
      </table>
     </div>   
    </div>  
   </div>
  </div>
 </div>
</div>
</div>
</div>
</asp:View>
</asp:MultiView>
</ContentTemplate>
</asp:UpdatePanel>
  </asp:Panel>
  </form>
//VB
    Private Sub fillSourceRecords()
        Dim control As Control = Nothing
        Dim conn_str As String = ConfigurationManager.ConnectionStrings("ppmtest").ConnectionString
        Using conn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("ppmtest").ConnectionString)
            conn.Open()
            Using sourcecmd As SqlCommand = New SqlCommand()
                sourcecmd.CommandText = "uspGetEthicsRecs"
                sourcecmd.CommandType = CommandType.StoredProcedure
                sourcecmd.Parameters.AddWithValue("@empID", txtEmpID.Text.Trim())
                sourcecmd.Connection = conn
                Using ad As SqlDataAdapter = New SqlDataAdapter(sourcecmd)
                    Dim ds As DataTable = New DataTable()
                    ad.Fill(ds)
                    If ds.Rows.Count > 0 Then
                        Gridview1.DataSource = ds
                        Gridview1.DataBind()
                        grvspouse.DataSource = ds
                        grvspouse.DataBind()
                        grvDiv.DataSource = ds
                        grvDiv.DataBind()
                        grvReim.DataSource = ds
                        grvReim.DataBind()
                        grvHon.DataSource = ds
                        grvHon.DataBind()
                        grvGift.DataSource = ds
                        grvGift.DataBind()
                        grvOrg.DataSource = ds
                        grvOrg.DataBind()
                        grvCred.DataSource = ds
                        grvCred.DataBind()
                    Else
                    End If
                End Using

            End Using
        End Using
    End Sub

SuggestionRe: Some GridView controls are running empty rows. Any ideas to fix Pin
Richard MacCutchan25-Feb-20 9:51
mveRichard MacCutchan25-Feb-20 9:51 
GeneralRe: Some GridView controls are running empty rows. Any ideas to fix Pin
samflex25-Feb-20 10:03
Membersamflex25-Feb-20 10:03 
GeneralRe: Some GridView controls are running empty rows. Any ideas to fix Pin
Richard MacCutchan25-Feb-20 10:26
mveRichard MacCutchan25-Feb-20 10:26 
AnswerRe: Some GridView controls are running empty rows. Any ideas to fix Pin
Mycroft Holmes25-Feb-20 12:35
professionalMycroft Holmes25-Feb-20 12:35 
GeneralRe: Some GridView controls are running empty rows. Any ideas to fix Pin
samflex25-Feb-20 18:20
Membersamflex25-Feb-20 18:20 
SuggestionRe: Some GridView controls are running empty rows. Any ideas to fix Pin
phil.o25-Feb-20 21:19
mvephil.o25-Feb-20 21:19 
GeneralRe: Some GridView controls are running empty rows. Any ideas to fix Pin
Richard MacCutchan25-Feb-20 22:22
mveRichard MacCutchan25-Feb-20 22:22 
AnswerRe: Some GridView controls are running empty rows. Any ideas to fix Pin
Blikkies26-Feb-20 2:19
professionalBlikkies26-Feb-20 2:19 
QuestionASP.NET + Multi Form using Textbox problem Pin
kerek224-Feb-20 22:41
Memberkerek224-Feb-20 22:41 
SuggestionRe: ASP.NET + Multi Form using Textbox problem Pin
Richard MacCutchan25-Feb-20 0:16
mveRichard MacCutchan25-Feb-20 0:16 
QuestionWhen string in a cell has double quotes those appear in Excel after export. How do I remove them? Pin
Member 1140330424-Feb-20 11:19
MemberMember 1140330424-Feb-20 11:19 
AnswerRe: When string in a cell has double quotes those appear in Excel after export. How do I remove them? Pin
Member 1140330424-Feb-20 12:26
MemberMember 1140330424-Feb-20 12:26 
Rant[REPOST] When string in a cell has double quotes those appear in Excel after export. How do I remove them? Pin
Richard Deeming25-Feb-20 3:27
mveRichard Deeming25-Feb-20 3:27 
Questionreturning null value from populated selectlist with DB data Pin
ElenaRez21-Feb-20 22:11
MemberElenaRez21-Feb-20 22:11 
QuestionASP.Net MVC: When to use HttpGet and when to use HttpPost for action Pin
Mou_kol18-Feb-20 9:32
MemberMou_kol18-Feb-20 9:32 
AnswerRe: ASP.Net MVC: When to use HttpGet and when to use HttpPost for action Pin
jkirkerx19-Feb-20 10:15
professionaljkirkerx19-Feb-20 10:15 
GeneralRe: ASP.Net MVC: When to use HttpGet and when to use HttpPost for action Pin
Mou_kol19-Feb-20 10:41
MemberMou_kol19-Feb-20 10:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.