Titanium tableView rowData id missing in android but working in iOS

I found a strange problem while coding in Titanium

I first tested my code on iOS only and not on android. Now in one of the table I redesigned the rows with height etc.

Now I was accessing the onClick event, but in e.rowData.id the value was missing. I don’t know why.

So I used the following code to get the access of ID and so that it works on both android as well as iOS

	console.log('**********MY EXPERIMENT ***********');
	for (var i = 0; i < dataArray.length; ++i) {
		console.log('IN FOR LOOP' + i);
		var row = Titanium.UI.createTableViewRow();
		//row.layout = 'vertical';
		row.id = dataArray[i].id;
		row.backgroundColor = '#000000';

		var e_code = Titanium.UI.createLabel({
			text : dataArray[i].display_panel_code,
			font : {
				fontSize : '24dp',
				fontWeight : 'bold',
				fontFamily : 'Digital-7'
			color : "#00FF04",
			//width : '30%',
			textAlign : 'left',
			left : '20dp'


		led_code = dataArray[i].led_code;
		console.log('**********LED CODE : ' + led_code);
		if (led_code != null || led_code != '') {
			ledImages = createLedImage(led_code);
			ledImages.left = '120dp';

		var e_summary = Titanium.UI.createLabel({
			text : dataArray[i].summary,
			font : {
				fontSize : '14dp',
			color : "#FFFFFF",
			//width : '70%',
			textAlign : 'left',
			left : '20dp',
			height : 'auto',
			top : '40dp'

		row['errorcode_id']=dataArray[i].id;///added to support the android applications and ios both

		//row.className = 'e_code_row';

	}///end of for

and to accesss it I used


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s