I have a problem with Gridview control in VS2013. I have a simple page with GridView, which loads 200 records. I should first be able to edit the amp; Last name is therefore they are in TemplateFields. When I open the page in IE11, the page gridview shows the records in fine, but the page is not responsible for several minutes. If I try to scroll down scroll bars then just sit there for a good 10 seconds and then they go a little further if they have other links on the page that they do not work and even web browsers It takes some time to shut down. I have tried to do it in Firefox and Chrome and this is the same issue, although not as clear as I have created the exact same project in VS2010 and the page works fine with the exact same code. Does anyone know why this is Used to be.
HTML Code:
& lt ;! DOCTYPE html & gt; & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Head runat = "server" & gt; & Lt; Title & gt; & Lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Form id = "form1" runat = "server" & gt; & Lt; Div & gt; & Lt; Asp: gridview id = "gridview 1" runat = "server" autogrentech column = "wrong" & gt; & Lt; Columns & gt; & Lt; Asp: CommandField ShowEditButton = "True" /> & Lt; ASP: BoundfieldDefined = "ID" header text = "ID" /> & Lt; Asp: TemplateField Header Text = "Previous" & gt; & Lt; EditItemTemplate & gt; & Lt; ASP: Text Box ID = "Text Box 1" Runat = "Server" Text = '& lt;% # Bind ("First Name")% & gt; & Gt; & Lt; / Asp: text box & gt; & Lt; / EditItemTemplate & gt; & Lt; ItemTemplate & gt; & Lt; ASP: Labels ID = "Label 1" runtat = "server" text = '& lt;% # bind ("first name")% & gt;' & Gt; & Lt; / Asp: label & gt; & Lt; / ItemTemplate & gt; & Lt; / ASP: TemplateField & gt; & Lt; Asp: TemplateField Header Text = "Final" & gt; & Lt; EditItemTemplate & gt; & Lt; ASP: Text Box ID = "Textbox2" Runat = "Server" Text = '& lt;% # Bind ("Last Name")% & gt; & Gt; & Lt; / Asp: text box & gt; & Lt; / EditItemTemplate & gt; & Lt; ItemTemplate & gt; & Lt; Asp: Label ID = "Label2" runat = "server" text = '& lt;% # bind ("last name")% & gt; & Gt; & Lt; / Asp: Label & gt; & Lt; / ItemTemplate & gt; & Lt; / ASP: TemplateField & gt; & Lt; / Column & gt; & Lt; / ASP: GridView & gt; & Lt; / Div & gt; & Lt; / Form & gt; & Lt; / Body & gt; & Lt; / Html & gt;
Behind the code:
Acquisition of public class WebForm1 system. Web.UI.Page Protected Sub Page_Load (ByVal, System.EventArgs as ByVal E, as the sender object) I.PostBack if loaded then load grid (end) if the ending sub-subsystem is sub-loaded grid ( ) Dim DT Dotter DT = New Datatable DT as Demat Datalet Columns Add ("id", gettip) Dt.Columns.Add ("FirstName", GetType (String) dt.Column.Add ("LastName", GetType (string) Dim I as Integer = 0 for i = 0 to 200 dr = dt.NewRow dr (0) = I (1) = "John" & amp; I.ToString DR (2) = "Do" & amp; I.ToString dt.Rows.Add (dr) Next GridView1.DataSource = dt GridView1.DataBind () End Sub End Class
I have not received any reply yet, but it has been narrowed down a bit further. If I have an 'id' attribute in the item template, then the page is very slow when it first loads. If I remove the 'id' attribute from the text box and the page loads the label in the item template and works fine. Why should the page be slow when it first loads with an 'id' attribute ??
Comments
Post a Comment