1. I have a grid and can delete, or update with no issues
2. When i add an item it adds the item but I cannot refresh the Grid once the Entity framework code adds the item to the data context, (its just stuck with the waiting icon)
I have looked in the forums and code and noticed others have had similar issues which your team has fixed
3. I tried to upload the project structure but the file size is just a little to large for stated max upload size (is there another way to get the code as is to your team to check for me as a corporate customer)...
4. I hope your team can help resolve the issue as it is a bit of a sticking point for me in development.
5. the code for the Grid is below as well as the code behind snippet.
6. NOTE I use drop downs in the grid not sure if this may be causing the none refreshing issue or what is the best way.
Thanks for your help in Advance:
Ej-Grid Control
-------------------------------------------------------------------------------------------------
<!-- WORK WITH POST BACK!!-->
<ej-grid runat="Server" id="GridNewProjectTeam" action-complete="onActionComplete" allow-paging="true" allow-filtering="false" SelectionType="Single">
<e-datamanager json="(IEnumerable<object>)ViewBag.ProjectTeamDatasource" insert-url="/RicsNewPIDProjectWizard/ProjectTeamInsert" remove-url="/RicsNewPIDProjectWizard/ProjectTeamDelete" update-url="/RicsNewPIDProjectWizard/ProjectTeamUpdate" adaptor="remoteSaveAdaptor" />
<e-edit-settings allow-adding="true" allow-editing="true" allow-deleting="true" allow-edit-on-dbl-click="true" show-delete-confirm-dialog="true" edit-mode="InlineForm"></e-edit-settings>
<e-toolbar-settings show-toolbar="true" toolbar-items='@new List<string> {"add","edit","delete","update","cancel"}' />
<e-columns>
<e-column field="ID" header-text="ID" is-primary-key="true" is-identity="true" allow-editing="false"></e-column>
<e-column field="FKMemberID" header-text="Name" is-primary-key="false" datasource="(IEnumerable<object>)ViewBag.dropDataRicsMemebers" edit-type="DropdownEdit"></e-column>
<e-column field="FkRoleId" header-text="Role" is-primary-key="false" datasource="(IEnumerable<object>)ViewBag.dropDataRoles" edit-type="DropdownEdit"></e-column>
<e-column field="Designation" header-text="Designation" is-primary-key="false"></e-column>
<e-column field="ImageUrl" header-text="Image Url" is-primary-key="false"></e-column>
<e-column field="ReportingPerson" header-text="Reporting Person" is-primary-key="false"></e-column>
<e-column field="ReportingManager" header-text="Reporting Manager" is-primary-key="false"></e-column>
<e-column field="CreationDate" header-text="Creation Date" is-primary-key="false" allow-editing="false" edit-type="DateTimePicker"></e-column>
<e-column field="LastUpdated" header-text="Last Updated" is-primary-key="false" allow-editing="false" edit-type="DateTimePicker"></e-column>
</e-columns>
</ej-grid>
COde Behind (this seem to be stuck and not refreshing the grid!!!!)
-------------------------------------------------------------------------------------
/// <summary>
/// ProjectTeamInsert - Working
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public ActionResult ProjectTeamInsert([FromBody]CRUDModel<RicsProjectTeam> value)
{
// Debugger.Break();
//database contex
RicsPIDContext RicsPidContext = new RicsPIDContext();
if (value != null)
{
// return RedirectToPage("/RicsNewUser/RicsNewUserFeatures");
//Generate ID as we are using GUIDS
value.Value.ID = Guid.NewGuid();
//Get ProjectID FK
string injectID = HttpContext.Session.GetString("CreatePIDwizardGUID"); // ViewBag("CreatePIDwizardGUID").ToString();
//do we have a project selected ...
if (String.IsNullOrEmpty(injectID))
{
//internal error manager
HttpContext.Session.SetString("ExceptionNewPidVisibility", "true");
HttpContext.Session.SetString("ErrormessageNewPid","Please specify Project invalid project PID found are you creating a new project?");
return Json(value);
}
//SAVE - Set project ref ...
value.Value.FkProjectId = new Guid(injectID);
//dates
value.Value.CreationDate = DateTime.Now;
value.Value.LastUpdated = DateTime.Now;
//Add the new value'
RicsPidContext.RicsProjectTeams.Add(value.Value);
//Apply chnages
RicsPidContext.SaveChanges();
}
// this should reload the view and reset the grid I assume ...
return RedirectToPage("/RicsNewPIDProjectWizardFeatures", "RicsNewPIDProjectWizard");
}