• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 271
  • Last Modified:

Do I need to sep these into 2 panels?

Hi, I'm using asp.net 3.5 and C#
I have a page where the top half have several textboxes and a submit button when pressed the textboxes data are then saved and that new addition is reflected in the gridview below.  The bottom half has a gridview control that list all records.  

Now I need to provide Edit ability to the Grid view.  When I edit a row and then click the Update but nothing is updated and all required textboxes have a red * next to them.  Is this becuase the Gridview control Update button causes the top half thinks it's also submitting data?  Can I solve this problem by putting these 2 section into 2 panels?  Thank you.
0
lapucca
Asked:
lapucca
1 Solution
 
suvmitraCommented:
How you are using all these controls through your code that is a question so in that case viewing that code is important. However I would suggest if you need to update the records then use text boxes only for editing the value..do not use grids as grid is best only for viewing records.
0
 
AndyAinscowCommented:
No and no.
The Update button runs the code you provide.  You probably have a mistake in the code somewhere.
0
 
lapuccaAuthor Commented:
Sorry, I didn't make it clear.  the top half textboxes takes in data and submits to create a new record.  The gridview control in the button lists all the records.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
lapuccaAuthor Commented:
I don't have any code in the back.  I only code update in the front using a stored procedure.
ManageAccounts.aspx
0
 
suvmitraCommented:
in that case your .cs file and the sp would help.
0
 
nidheeshmcaCommented:

Provide the ValidationGroup Property same for each conttrols of first panel.

Example:
<asp:Panel>
<asp:Textbox id="txt" runat="Server" ValidationGroup="First"></asp:Textbox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"  ErrorMessage="RequiredFieldValidator" ValidationGroup="First" ></asp:RequiredFieldValidator>
<asp:Textbox id="txt2" runat="Server" ValidationGroup="First"></asp:Textbox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"  ErrorMessage="RequiredFieldValidator" ValidationGroup="First" ></asp:RequiredFieldValidator>
<asp:Textbox id="txt3" runat="Server" ValidationGroup="First"></asp:Textbox><asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"  ErrorMessage="RequiredFieldValidator" ValidationGroup="First" ></asp:RequiredFieldValidator>
<asp:Button id="butt" runat="Server" ValidationGroup="first" ></asp:Button>
<asp:panel>
0
 
lapuccaAuthor Commented:
That solve the problem.  Thank you and thanks for everyone's input.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now