Files
mono/mcs/class/System.Web/System.Web.UI.WebControls/GridView.js
T
Lluis Sanchez 170d79ed12 2005-03-11 Lluis Sanchez Gual <[email protected]>
* Button.cs, ImageButton.cs: Interpret PostBackOptions.ClientSubmit
	  correctly.
	* CommandField.cs: Mostly implemented.
	* Menu.cs: Use callback methods moved to ClientScriptManager.
	* DataControlButton.cs: Internal control used to implement buttons
	  for navigating in data bound controls.
	* DataControlField.cs, PagerSettings.cs: Use the new DataControlButton
	  to render the column headers.
	* CheckBox.cs, RadioButton.cs, BulletedList.cs, TextBox.cs
	  DropDownList.cs, Calendar.cs, ListBox.cs, LinkButton.cs, TreeView.cs:
	  Don't use Page.GetPostBackClientEvent
	  since it is deprecated in 2.0.
	* GridView.cs: Implemented some several interfaces.
	  Implemented support client sorting and page navigation (using callbacks).
	  Implemented the autogenerated command column using the new CommandField
	  class.
	* ButtonFieldBase.cs: Implemented.
	* GridView.js: New helper script to support client side sorting and
	  paging in the grid view.


svn path=/trunk/mcs/; revision=41698
2005-03-11 13:25:26 +00:00

22 lines
678 B
JavaScript

function GridView_ClientEvent (ctrlId, evnt)
{
var gridData = eval (ctrlId + "_data");
var clientData = gridData.pageIndex + '|' + escape (gridData.sortExp) + '|' + evnt;
WebForm_DoCallback (gridData.uid, clientData, GridView_ClientRender, ctrlId, GridView_ClientRender_Error);
}
function GridView_ClientRender (data, ctx)
{
var gridData = eval (ctx + "_data");
var grid = document.getElementById (ctx);
var i = data.indexOf ("|");
var j = data.indexOf ("|", i+1);
gridData.pageIndex = parseInt (data.substring (0, i));
gridData.sortExp = unescape (data.substring (i+1, j));
grid.innerHTML = data.substr (j+1);
}
function GridView_ClientRender_Error (data, ctx)
{
}