Hello.
I use GridView inside UpdatePanel, recently i swichted from ado.net to entity framework.
UpdatePanel is updating with Timer and Tick event.
My GridView has delete button, firstly on RowDeleting event i used SqlDatasource with something like:
SqlDataSource1.DeleteCommand = "delete from [Email] where Id=..."; SqlDataSource1.Delete(); GridView.DataBind();
And row was removed immediately from GridView.
Now i switched to EntityFramwork and i use:
BL.Blemail.deleteEmail(...);
GridView.DataBind();
But then row is not removed immediately ( I have wait for Timer's Tick event to see results )
And even when i still use SqlDataSource with the same code (Delete command) but conntected to EntityFramework connection string the problem still occures.
Connection strings:
<add name="emailNotificationsConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=D:\Projekty\baza\EmailNotifications.mdf;Integrated Security=True;Connect Timeout=30;User Instance=true" providerName="System.Data.SqlClient" /><add name="EmailNotificationsEntities" connectionString="metadata=res://*/DataModel.csdl|res://*/DataModel.ssdl|res://*/DataModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;attachdbfilename=D:\Projekty\baza\EmailNotifications.mdf;integrated security=True;connect timeout=30;user instance=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" /></connectionStrings>
Do you have any ideas?
Thanks