Click here to Skip to main content
15,885,739 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I work on Windows c# telerik.
And i have problem that as when i want to add new entry in my grid view it will add 2 entries. in which one is correct but other one will get only 2 fields.
how to eliminate this problem.
I required as only one entry should have entered.
New Entry added as there will form will popup and on save data entry should have enter in GridView


My Code is as below.


C#
public void Save(TimesheetEntry timesheetEntry)
        {
            if (timesheetEntry.TimesheetEntriesId == -1)
            {
                timesheetEntry.SequenceNumber = GetNextSequenceNumber(timesheetEntry.FileId, timesheetEntry.EntryDate);
                Add(timesheetEntry);

            }
            else
            {
                Update(timesheetEntry);
            }
            //Audit trail
            //TODO:
            //MyAuditTrialModel.Add<TimesheetEntry>(Helper.Actions.CU_Timesheet, Helper.TableNames.TimesheetEntry, timesheetEntry);
        }



Thanks in advance
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900