Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: datarow problem

0
0
Hi wernersita,

What is the actual .NET type of the object you're exposing as "myRow"? If it's System.Data.DataRow, the actual name of the indexer is "Item", and the following syntax should work:
// JavaScript
MessageBox.Show(myRow.Item(0).ToString());
Note that this is a read-only shortcut. Here's the general syntax that ClearScript supports for accessing .NET indexed properties:
// JavaScript
value = obj.Item.get(index1, index2 ...);
obj.Item.set(index1, index2 ..., value);
Note also that ClearScript does support normal JavaScript-style indexing for .NET arrays.

Good luck!

Viewing all articles
Browse latest Browse all 2297