Greetings again experts,
I have seven gridview controls, Gridview1 through Gridview7.
For now, I am posting below the code for two of the seven gridview controls.
Our requirement is that each gridview control must have a checkbox next to it.
Users are asked to fill all the textboxes in each gridview control.
However, if user does not see the need to complete the textboxes in any particular gridview control, then we need to have user check a box next to each gridview control to disable that gridview control.
If any gridview is not completed and a box is not checked, an error needs to be raised and user should not be allowed to submit the form.
Does anyone know to do this?
Thanks in advance
I have seven gridview controls, Gridview1 through Gridview7.
For now, I am posting below the code for two of the seven gridview controls.
<asp:gridview ID="Gridview1" gridlines="None" runat="server" ShowFooter="true" AutoGenerateColumns="false" onrowdatabound="Gridview1_RowDataBound" OnRowDeleting="Gridview1_RowDeleting">
<Columns><asp:BoundFieldDataField="RowNumber"Visible="false"HeaderText="Row Number"/><asp:TemplateFieldHeaderText="Name"><headerstylehorizontalalign="Left"/><ItemTemplate><asp:TextBoxID="txtsourcename"placeholder="Name..."runat="server"style="width:250px;"class="form-control"></asp:TextBox></ItemTemplate></asp:TemplateField><asp:TemplateFieldHeaderText="Address"><ItemStyleHorizontalAlign="Left"></ItemStyle><ItemTemplate><asp:TextBoxID="txtsourceaddress"placeholder="Address..."runat="server"style="width:250px;"class="form-control"></asp:TextBox></ItemTemplate></asp:TemplateField><asp:TemplateFieldHeaderText="Income"><ItemStyleHorizontalAlign="Left"></ItemStyle><ItemTemplate><asp:TextBoxID="txtsourceincome"placeholder="Income...(example: 1000)"runat="server"style="width:250px;"class="form-control txtsourceincome numeric"></asp:TextBox></ItemTemplate></asp:TemplateField><asp:TemplateFieldHeaderText=""><ItemTemplate><asp:ButtonID="ButtonAdd"runat="server"Text="Add"onclick="ButtonAdd_Click"CssClass="grvAddButton"OnClientClick="return ValidateEmptyValue();"/></ItemTemplate></asp:TemplateField><asp:CommandFieldShowDeleteButton="True"><ControlStyleCssClass="grvDelButton"/></asp:CommandField></Columns></asp:gridview><spanstyle="font-weight:bold;font-size:18px;color:#000000;">Name and address of income source of spouse greater than $1,000.00 (No comma (,) or period(.); Example 1000)</span><br/><br/><asp:gridviewID="Gridview1"GridLines="None"runat="server"ShowFooter="true"AutoGenerateColumns="false"onrowdatabound="gGridview1_RowDataBound"OnRowDeleting="Gridview1_RowDeleting"><Columns><asp:BoundFieldDataField="SpouseNumber"Visible="false"HeaderText="Row Number"/><asp:TemplateFieldHeaderText="Name"><headerstylehorizontalalign="Left"/><ItemTemplate><asp:TextBoxID="txtspousename"placeholder="Name..."runat="server"style="width:250px;"class="form-control"></asp:TextBox></ItemTemplate></asp:TemplateField><asp:TemplateFieldHeaderText="Address"><ItemStyleHorizontalAlign="Left"></ItemStyle><ItemTemplate><asp:TextBoxID="txtspouseaddress"placeholder="Address..."runat="server"style="width:250px;"class="form-control"></asp:TextBox></ItemTemplate></asp:TemplateField><asp:TemplateFieldHeaderText="Income"><ItemStyleHorizontalAlign="Left"></ItemStyle><ItemTemplate><asp:TextBoxID="txtspouseincome"placeholder="Income...(example: 1000)"runat="server"style="width:250px;"class="form-control txtsourceincome numeric"></asp:TextBox></ItemTemplate></asp:TemplateField><asp:TemplateFieldHeaderText=""><ItemTemplate><asp:ButtonID="ButtonAdd2"runat="server"Text="Add"onclick="ButtonAdd2_Click"CssClass="grvAddButton"OnClientClick="return ValidateSPEmptyValue();"/></ItemTemplate></asp:TemplateField><asp:CommandFieldShowDeleteButton="True"><ControlStyleCssClass="grvDelButton"/></asp:CommandField></Columns></asp:gridview>
Our requirement is that each gridview control must have a checkbox next to it.
Users are asked to fill all the textboxes in each gridview control.
However, if user does not see the need to complete the textboxes in any particular gridview control, then we need to have user check a box next to each gridview control to disable that gridview control.
If any gridview is not completed and a box is not checked, an error needs to be raised and user should not be allowed to submit the form.
Does anyone know to do this?
Thanks in advance