AjaxDataControls (ADC) FAQ - get_items()[index]

Remember that you can always use the the following javascript code to get the desired item from any of the data controls.

var index = 3;
var item = adcControl.get_items()[index];
item.findControl("your control");

 

Published Thursday, June 12, 2008 11:45 AM by Sonu

Comments

# AjaxDataControls (ADC) FAQ - INDEX

Tuesday, June 24, 2008 12:24 AM by Sonu on .NET

Welcome to the AjaxDataControls FAQ. How to get started with the AjaxDataControls with Visual Studio

# re: AjaxDataControls (ADC) FAQ - get_items()[index]

Monday, November 17, 2008 6:15 AM by Pawan Mishra

Hello

I am using the sample code you have mentioned above with the ajaxGridView control . It looks something like this :-

var item = adcControl.get_items()[rowIndex];

item.findControl("ID");

where rowIndex is the index of row currently selected using an image button . but when I try to use it it throws a javascript error saying object doesn't support this property .

Looking for your help !!!

# re: AjaxDataControls (ADC) FAQ - get_items()[index]

Monday, November 17, 2008 8:11 AM by Sonu

Try this:

function loopItems()

{

  var rows = grid.get_rows();

  for (var row in rows)

  {

     var dataItem = row.get_dataItem();

  }

}