Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

GridView inside UpdatePanel strange issue

$
0
0

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=&quot;data source=.\SQLEXPRESS;attachdbfilename=D:\Projekty\baza\EmailNotifications.mdf;integrated security=True;connect timeout=30;user instance=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" /></connectionStrings>


Do you have any ideas?

Thanks


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>