This is a migrated thread and some comments may be shown as answers.

A lighter version

3 Answers 136 Views
Grid
This is a migrated thread and some comments may be shown as answers.
renis cerga
Top achievements
Rank 1
renis cerga asked on 28 Jun 2010, 01:32 PM
Hi!

There are cases when you don't need the full potential of RadGrid. Indeed what i need in most of cases is to display some row data (no grouping, no totals, no nested tables, nothing... Simple table. You can ask why i don't do that by using a HTML table? Well... there are some facilities with grid like autogenerate columns, and my sql sp-s are dynamic. It means they return different number of columns.. Using grid in this scenario makes your job easier.

Nut when I use AJAX, i'm worried about overhead size of Grid. Whenever the grid is refreshed (or many of them) there is a big overhead with js functions with that. I disabled viewstate, because i don't need it and i tried to disable almos everything, but still the overhead size is big...

Is there any way to disable mos of functions (like client side events), so this overhead can be smaller? I mean, not the big JS file, but that part that is called every time a grid is refreshed.

For example making smaller something like this:

|0|hiddenField|__EVENTTARGET||0|hiddenField|__EVENTARGUMENT||56|hiddenField|__VIEWSTATE|/wEPZwUPOGNjZTRlNTY2ZTRiMGUxHJk8mrS1bLbuGXMwGAJHSNCFvHU=|96|hiddenField|__EVENTVALIDATION|/wEWCAKhw/y/DALZ8f76AQLbr53IDwK6qI6AAwKohJWGDQLT4J7NCQLJ/d6HDQKvjezdCy8TvR3DZmUxai2ShwN8h2S2DJ0O|63|asyncPostBackControlIDs||Ligat1$RadTreeView1,BetSlip1$btnVendos,BetSlip1$TimerKonfirmimi|0|postBackControlIDs|||447|updatePanelIDs||tPTjeterPanel,tKoka1$UserPassPanelPanel,tKoka1$EmerMbiemerPanelPanel,tGjermani Bundesliga$RadTabStrip1Panel,tGjermani Bundesliga$GridNdeshjetLigaPanel,tGjermani Bundesliga$panelperupdatePanel,tBetSlip1$BetSlipGridPanel,tBetSlip1$KoefiPanelPanel,tBetSlip1$MesazhiPanelPanel,tFrance Div. 2$RadTabStrip1Panel,tFrance Div. 2$GridNdeshjetLigaPanel,tFrance Div. 2$panelperupdatePanel,tBetSlip1$txtShumaPanel,tBetSlip1$PritjaPanelPanel,tRadAjaxManager1SU|221|childUpdatePanelIDs||Gjermani Bundesliga$RadTabStrip1Panel,Gjermani Bundesliga$GridNdeshjetLigaPanel,Gjermani Bundesliga$panelperupdatePanel,France Div. 2$RadTabStrip1Panel,France Div. 2$GridNdeshjetLigaPanel,France Div. 2$panelperupdatePanel|108|panelsToRefreshIDs||PTjeterPanel,BetSlip1$BetSlipGridPanel,BetSlip1$KoefiPanelPanel,BetSlip1$MesazhiPanelPanel,RadAjaxManager1SU|2|asyncPostBackTimeout||90|12|formAction||default.aspx|120|scriptBlock|ScriptPath|/ARIO BetWeb/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b|69|scriptStartupBlock|ScriptContentNoTags|Telerik.Web.UI.RadTreeView._preInitialize("Ligat1_RadTreeView1","0");|60|scriptStartupBlock|ScriptContentNoTags|Telerik.Web.UI.RadTreeView._clearLog("Ligat1_RadTreeView1");|62|scriptStartupBlock|ScriptContentNoTags|if(typeof ($telerik)!='undefined'){$telerik.registerSkins();};|5169|scriptStartupBlock|ScriptContentNoTags|Sys.Application.add_init(function() { 
    $create(Telerik.Web.UI.RadTabStrip, {"_postBackReference":"__doPostBack(\u0027Gjermani Bundesliga$RadTabStrip1\u0027,\u0027{0}\u0027)","_selectedIndex":0,"_skin":"Olsi_Pa_lidhje","clickSelectedTab":true,"clientStateFieldID":"Gjermani Bundesliga_RadTabStrip1_ClientState","selectedIndexes":["0"],"tabData":[{"value":"RF"},{"value":"45/90"},{"value":"DSH"},{"value":"RP1"},{"value":"SGP1"},{"value":"SGP"},{"value":"SHP"},{"value":"GJG"}]}, nullnull, $get("Gjermani Bundesliga_RadTabStrip1")); 
    $create(Telerik.Web.UI.RadGrid, {"ClientID":"Gjermani Bundesliga_GridNdeshjetLiga","ClientSettings":{"AllowExpandCollapse":false,"AllowGroupExpandCollapse":false,"DataBinding":{},"Selecting":{},"Scrolling":{},"Resizing":{},"ClientMessages":{},"KeyboardNavigationSettings":{"AllowActiveRowCycle":false,"EnableKeyboardShortcuts":true,"FocusKey":89,"InitInsertKey":73,"RebindKey":82,"ExitEditInsertModeKey":27,"UpdateInsertItemKey":13,"DeleteActiveRow":127}},"Skin":"Windows7","UniqueID":"Gjermani Bundesliga$GridNdeshjetLiga","_activeRowIndex":"","_controlToFocus":"","_currentPageIndex":0,"_editIndexes":"[]","_embeddedSkin":true,"_gridTableViewsData":"[{\"ClientID\":\"Gjermani Bundesliga_GridNdeshjetLiga_ctl00\",\"UniqueID\":\"Gjermani Bundesliga$GridNdeshjetLiga$ctl00\",\"PageSize\":10,\"PageCount\":1,\"EditMode\":\"EditForms\",\"CurrentPageIndex\":0,\"VirtualItemCount\":0,\"AllowMultiColumnSorting\":false,\"AllowNaturalSort\":true,\"AllowFilteringByColumn\":false,\"IsItemInserted\":false,\"clientDataKeyNames\":[],\"_dataBindTemplates\":false,\"_selectedItemStyle\":\"\",\"_selectedItemStyleClass\":\"rgSelectedRow\",\"_columnsData\":[{\"UniqueName\":\"Kodi\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"Display\":true},{\"UniqueName\":\"Ndeshja\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"Display\":true},{\"UniqueName\":\"1\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"Display\":true},{\"UniqueName\":\"X\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"Display\":true},{\"UniqueName\":\"2\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"Display\":true}]}]","_masterClientID":"Gjermani Bundesliga_GridNdeshjetLiga_ctl00","_shouldFocusOnPage":false,"allowMultiRowSelection":false,"clientStateFieldID":"Gjermani Bundesliga_GridNdeshjetLiga_ClientState"}, nullnull, $get("Gjermani Bundesliga_GridNdeshjetLiga")); 
    $create(Telerik.Web.UI.RadTabStrip, {"_postBackReference":"__doPostBack(\u0027France Div. 2$RadTabStrip1\u0027,\u0027{0}\u0027)","_selectedIndex":0,"_skin":"Olsi_Pa_lidhje","clickSelectedTab":true,"clientStateFieldID":"France Div. 2_RadTabStrip1_ClientState","selectedIndexes":["0"],"tabData":[{"value":"RF"},{"value":"45/90"},{"value":"DSH"},{"value":"RP1"},{"value":"SGP1"},{"value":"SGP"},{"value":"HA"},{"value":"SHP"},{"value":"GJG"}]}, nullnull, $get("France Div. 2_RadTabStrip1")); 
    $create(Telerik.Web.UI.RadGrid, {"ClientID":"France Div. 2_GridNdeshjetLiga","ClientSettings":{"AllowExpandCollapse":false,"AllowGroupExpandCollapse":false,"DataBinding":{},"Selecting":{},"Scrolling":{},"Resizing":{},"ClientMessages":{},"KeyboardNavigationSettings":{"AllowActiveRowCycle":false,"EnableKeyboardShortcuts":true,"FocusKey":89,"InitInsertKey":73,"RebindKey":82,"ExitEditInsertModeKey":27,"UpdateInsertItemKey":13,"DeleteActiveRow":127}},"Skin":"Windows7","UniqueID":"France Div. 2$GridNdeshjetLiga","_activeRowIndex":"","_controlToFocus":"","_currentPageIndex":0,"_editIndexes":"[]","_embeddedSkin":true,"_gridTableViewsData":"[{\"ClientID\":\"France Div. 2_GridNdeshjetLiga_ctl00\",\"UniqueID\":\"France Div. 2$GridNdeshjetLiga$ctl00\",\"PageSize\":10,\"PageCount\":1,\"EditMode\":\"EditForms\",\"CurrentPageIndex\":0,\"VirtualItemCount\":0,\"AllowMultiColumnSorting\":false,\"AllowNaturalSort\":true,\"AllowFilteringByColumn\":false,\"IsItemInserted\":false,\"clientDataKeyNames\":[],\"_dataBindTemplates\":false,\"_selectedItemStyle\":\"\",\"_selectedItemStyleClass\":\"rgSelectedRow\",\"_columnsData\":[{\"UniqueName\":\"Kodi\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"Display\":true},{\"UniqueName\":\"Ndeshja\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"Display\":true},{\"UniqueName\":\"1\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"Display\":true},{\"UniqueName\":\"X\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"Display\":true},{\"UniqueName\":\"2\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridBoundColumn\",\"Display\":true}]}]","_masterClientID":"France Div. 2_GridNdeshjetLiga_ctl00","_shouldFocusOnPage":false,"allowMultiRowSelection":false,"clientStateFieldID":"France Div. 2_GridNdeshjetLiga_ClientState"}, nullnull, $get("France Div. 2_GridNdeshjetLiga")); 
}); 
|1478|scriptStartupBlock|ScriptContentNoTags|Sys.Application.add_init(function() { 
    $create(Telerik.Web.UI.RadGrid, {"ClientID":"BetSlip1_BetSlipGrid","ClientSettings":{"AllowAutoScrollOnDragDrop":true,"ShouldCreateRows":true,"DataBinding":{},"Selecting":{},"Scrolling":{},"Resizing":{},"ClientMessages":{},"KeyboardNavigationSettings":{"AllowActiveRowCycle":false,"EnableKeyboardShortcuts":true,"FocusKey":89,"InitInsertKey":73,"RebindKey":82,"ExitEditInsertModeKey":27,"UpdateInsertItemKey":13,"DeleteActiveRow":127}},"Skin":"Simple","UniqueID":"BetSlip1$BetSlipGrid","_activeRowIndex":"","_controlToFocus":"","_currentPageIndex":0,"_editIndexes":"[]","_embeddedSkin":false,"_gridTableViewsData":"[{\"ClientID\":\"BetSlip1_BetSlipGrid_ctl00\",\"UniqueID\":\"BetSlip1$BetSlipGrid$ctl00\",\"PageSize\":10,\"PageCount\":1,\"EditMode\":\"EditForms\",\"CurrentPageIndex\":0,\"VirtualItemCount\":0,\"AllowMultiColumnSorting\":false,\"AllowNaturalSort\":true,\"AllowFilteringByColumn\":false,\"IsItemInserted\":false,\"clientDataKeyNames\":[],\"_dataBindTemplates\":false,\"_selectedItemStyle\":\"\",\"_selectedItemStyleClass\":\"rgSelectedRow\",\"_columnsData\":[{\"UniqueName\":\"zgjedhja\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"Display\":true}]}]","_masterClientID":"BetSlip1_BetSlipGrid_ctl00","_shouldFocusOnPage":false,"allowMultiRowSelection":false,"clientStateFieldID":"BetSlip1_BetSlipGrid_ClientState"}, nullnull, $get("BetSlip1_BetSlipGrid")); 
}); 
|3129|scriptStartupBlock|ScriptContentNoTags|Sys.Application.add_init(function() { 
    $create(Telerik.Web.UI.RadAjaxManager, {"_updatePanels":"","ajaxSettings":[{InitControlID : "Ligat1_RadTreeView1",UpdatedControls : [{ControlID:"PTjeter",PanelID:""}]},{InitControlID : "Koka1_btnLogin",UpdatedControls : [{ControlID:"Koka1_UserPassPanel",PanelID:""},{ControlID:"Koka1_EmerMbiemerPanel",PanelID:""}]},{InitControlID : "Koka1_btnLargohu",UpdatedControls : [{ControlID:"Koka1_UserPassPanel",PanelID:""},{ControlID:"Koka1_EmerMbiemerPanel",PanelID:""}]},{InitControlID : "Gjermani Bundesliga_RadTabStrip1",UpdatedControls : [{ControlID:"Gjermani Bundesliga_RadTabStrip1",PanelID:""},{ControlID:"Gjermani Bundesliga_GridNdeshjetLiga",PanelID:""}]},{InitControlID : "Gjermani Bundesliga_panelperupdate",UpdatedControls : [{ControlID:"Gjermani Bundesliga_panelperupdate",PanelID:""}]},{InitControlID : "Gjermani Bundesliga_panelperupdate",UpdatedControls : [{ControlID:"BetSlip1_BetSlipGrid",PanelID:""}]},{InitControlID : "Gjermani Bundesliga_panelperupdate",UpdatedControls : [{ControlID:"BetSlip1_KoefiPanel",PanelID:""}]},{InitControlID : "Gjermani Bundesliga_panelperupdate",UpdatedControls : [{ControlID:"BetSlip1_MesazhiPanel",PanelID:""}]},{InitControlID : "France Div. 2_RadTabStrip1",UpdatedControls : [{ControlID:"France Div. 2_RadTabStrip1",PanelID:""},{ControlID:"France Div. 2_GridNdeshjetLiga",PanelID:""}]},{InitControlID : "France Div. 2_panelperupdate",UpdatedControls : [{ControlID:"France Div. 2_panelperupdate",PanelID:""}]},{InitControlID : "France Div. 2_panelperupdate",UpdatedControls : [{ControlID:"BetSlip1_BetSlipGrid",PanelID:""}]},{InitControlID : "France Div. 2_panelperupdate",UpdatedControls : [{ControlID:"BetSlip1_KoefiPanel",PanelID:""}]},{InitControlID : "France Div. 2_panelperupdate",UpdatedControls : [{ControlID:"BetSlip1_MesazhiPanel",PanelID:""}]},{InitControlID : "BetSlip1_btnVendos",UpdatedControls : [{ControlID:"BetSlip1_MesazhiPanel",PanelID:""},{ControlID:"BetSlip1_KoefiPanel",PanelID:""},{ControlID:"BetSlip1_txtShuma",PanelID:""},{ControlID:"BetSlip1_PritjaPanel",PanelID:""},{ControlID:"BetSlip1_BetSlipGrid",PanelID:""}]},{InitControlID : "BetSlip1_TimerKonfirmimi",UpdatedControls : [{ControlID:"BetSlip1_MesazhiPanel",PanelID:""},{ControlID:"BetSlip1_KoefiPanel",PanelID:""},{ControlID:"BetSlip1_txtShuma",PanelID:""}]},{InitControlID : "BetSlip1_BetSlipGrid",UpdatedControls : [{ControlID:"BetSlip1_KoefiPanel",PanelID:""},{ControlID:"BetSlip1_BetSlipGrid",PanelID:""}]}],"clientEvents":{OnRequestStart:"",OnResponseEnd:""},"defaultLoadingPanelID":"","enableAJAX":true,"enableHistory":false,"links":["controls/styles.css","App_Themes/Bet07/Calendar.Bet07_bslip.css","App_Themes/Bet07/Grid.Bet07_bslip.css","App_Themes/Bet07/Input.Bet07_bslip.css","App_Themes/Bet07/Menu.Bet07_bslip.css","App_Themes/Bet07/Menu.bet07_treeview.css","App_Themes/Bet07/Menu.menu_koka.css","App_Themes/Bet07/Slider.Bet07_bslip.css","App_Themes/Bet07/TabStrip.Olsi_Pa_lidhje.css","App_Themes/Bet07/TreeView.bet07_treeview.css"],"styles":[],"uniqueID":"RadAjaxManager1","updatePanelsRenderMode":0}, nullnull, $get("RadAjaxManager1")); 
}); 

All this is returned every time an AJAX call is performed

Is there any way?

Thank you!

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 28 Jun 2010, 02:33 PM
Hello Renis Cerga,

You can disable all the RadGrid client-side functionality and prevent its scripts from being output by using the following approach:

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/accessibility/defaultcs.aspx

Note the file MySection508Grid.cs

Greetings,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
John
Top achievements
Rank 1
answered on 14 Sep 2011, 11:15 PM
I would like to eliminate the constant production of the small script files containning:
if(typeof ($telerik)!='undefined'){$telerik.registerSkins();};


But the answer provided does not help.  the example in the link does not contain any file called MySection508Grid.cs.  also, there does not seem to be any related information in the page about eliminating these files.  could you please provide an example of a RadControl with this turned off? for example, RadListView.
0
Iana Tsolova
Telerik team
answered on 20 Sep 2011, 08:50 AM
Hi John,

Find attached the files for the previous version of the demo.

All the best,
Iana Tsolova
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
renis cerga
Top achievements
Rank 1
Answers by
Dimo
Telerik team
John
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or