Asp.Net Gridview - asp.net

I have a gridview with an enormous viewstate that I am attempting to shrink. I have turned the viewstate off in the control(which the gridview is in) but this seems to have done next to nothing in terms of the page size.
Now the gridview has buttons and dropdowns in it, which I know add to the size. But cannot be helped. Now short or rolling by own or overriding where the viewstate is stored is there any way to shrink the viewstate.
The gridview is also in an update pannel.

If your gridview is so large I would advise you to use paging so the number of rows is kept to a minimum.

Related

UpdatePanel not updating with large amounts of data

I have an UpdatePanel which contains GridView and submit button, selecting the submit button causes the update panel to update OK when the GridView contains not many records, however, when the grid view contians a large amount of data, clicking the submit button does not cause the UpdatePanel to update.
Any ideas, I do not know if there is a restriction on the amount of data that can be sent using the ScriptManage/UpdatePanel, but in one instance the page size is 718Kb.
I'm not aware of any restrictions in size but maybe the page is just timing out somewhere? The best idea if you can is to limit the amount of data that you are passing back and forth.
ek_ny's suggestion Re: EnableViewState is a good one that will slash your page sizes if you can implement it.
Another idea is to implement paging in your Gridview so that you are only displaying a manageable number of rows at a time.
If you rebind the GridView then you don't need the GridView to be in the ViewState and you can set the EnableViewState of the GridView property to false.

callback in one aspxgridview causes all gridviews to databind

I have a aspxgridview with details row.
in detils row of this gridview, there are about 10 aspxgridviews. whenever one of this grids cause callback by clicking edit/new/delete , other gridview also databound i.e hit database. this cause performance issue.
Is there a way to disable databinding on other aspxgridview?
tanks.
You can use tab content lazy loading. Look here for example and here for further explanation.
i find a solution here:
ASPxPageControl - Page Load of all TabPages

Embedded Gridview Postback into EditMode

I have a page I'm working on with a Gridview embedded into a Gridview. The page uses templates to fill itself out, including the edittemplate for rows. When the row is in edit mode, 3 of the cells contain dropdownlists.
I'm trying to filter these dropdownlists to prevent conflicts. The problem is that when the page autoposts back, the row is no longer in edit mode. Is it possible to persist edit mode on that row through a postback and apply the filter I need to?
The GridView should be in edit mode, even after the postback. Maybe you are forcing a DataBind in Page_Load or some other event.

ASP.net: Paging one Gridview caused other gridviews to reload

I haven't actually dealt with multiple grids on one page in a very long time, so perhaps someone can jog my memory. I have two grids and a treeview in three separate jQuery UI tabs. Every time I page my gridview, which is a custom control inheriting from Gridview, the other tabs refresh.
How can I stop this?
Are you refreshing the grids in the postback? When you click paging buttons, page_load will fire. Make sure you're testing for !IsPostBack in this event
You will need to do some sort of AJAX postback when you click on the next page link (or button) and refresh/replace your grid rows.
I would steer clear of wrapping everything in an UpdatePanel (if you choose to take this route) as the ViewState will keep growing and growing... and being passed back and forth.
http://msdn.microsoft.com/en-us/library/system.web.ui.updatepanel.aspx
You want to avoid this (view source -> ViewState) -

ASP.NET Events not firing in page containing large GridView control

I have a GridView control on an ASP page, which I've bound to a large(ish) datasource (about 10k rows, with 24 varchar(50) columns). The page also has a seperate (i.e. not in the GridView) button control.
The problem is; clicking on the button doesn't appear to fire either the PageLoad or the Button___click events, all I get is a 'Cannot display page' error..
Interestingly, if I reduce the size of the dataset behind the GridView, everything works fine and events are fired as expected. So i'm assuming its some sort of timeout or overflow related to the amount of data on the page.
I don't particularly want to use paging if I can get away with it, so the question is, is there some sort of timeout or setting that I can change to allow handling of large grids of data?
Have you tried turning off ViewState (EnableViewState=false in your Page directive) on your page? I would imagine that with a 1.2MB table, the ViewState is pretty huge and it may be overwhelming the parameter handling on the page.

Resources