Welcome Guest Search | Active Topics | Sign In | Register

EO Ecel Like Grid Web Control data iteration on client side. Options
joebalint
Posted: Monday, February 9, 2009 7:09:04 PM
Rank: Newbie
Groups: Member

Joined: 2/6/2009
Posts: 2
My request is simple. I want to iterate through all of the grid data regardless of whether it has changed or not on the client side. Does EO Excel Like Web Control have an associated js function that I can call on the client side to retrieve a collection of rows in the order that they are displayed. This collection can be in xml or html format. I want to append this data to a "Get" xmlhttprequest. The grid control will be residing on a page that is already using an xmlhttprequest object. The page cannot issue a postback at any time due to other controls on the page.
Joe
eo_support
Posted: Monday, February 9, 2009 7:48:47 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Hi,

You can do that with our client side JavaScript interface. The code will be something like this:

Code: JavaScript
//Get the grid object
var grid = eo_GetObject("Grid1");

//Loop through all grid items
for (var i = 0; i < grid.getItemCount(); i++)
{
    //Get the grid item object
    var gridItem = grid.getItem(i);

    //Get the cell object. This call requires column index.
    //You can put the following code inside a loop to loop
    //through all columns.
    var cell = gridItem.getCell(colIndex);

    //Get the cell value
    var cellValue = cell.getValue();

    //Now you have the cell value, you can do whatever
    //you would like to do such as appending it to your
    //XmlHttpRequest
}


If you have not used our client side JavaScript interface before, you will want to go over this topic:

http://doc.essentialobjects.com/library/1/clientapi_howto.aspx

You can also expand "JavaScript Objects" below that topic to get detailed information about all the client side JavaScript objects and all the methods supported on those objects.

Hope this helps.

Thanks!
joebalint
Posted: Monday, February 9, 2009 7:58:35 PM
Rank: Newbie
Groups: Member

Joined: 2/6/2009
Posts: 2
Sweet! Thanx. I will try this immediately!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.