Hi
I am using VS2008, .NET 3.5 and C#.
My Prometheus RadGrid is populated with Prometheus RadComboboxes. These in turn fire client-side SelectedIndexChanged events.
I can catch the events nicely. In Javascript I use the following to determine the row the RadComboBox came from (which I can then manipulate other controls in that same row...):
function cboSubType_SelectedIndexChanged(sender, e)
{
var item = e.get_item();
var combo = item.get_comboBox();
var rowElement = combo.get_parent();
// Loop through Detail Tables
for(var i = 0; i < grid.get_detailTables().length; i++)
{
// Loop through Rows
for(var j = 0; j < grid.get_detailTables()[i].get_dataItems().length; j++)
{
if(grid.get_detailTables()[i].get_dataItems()[j] == rowElement)
etc. etc...
The rowElement seems to point to something different when first fired (and hence fails), however 2nd time onwards it always points to a valid row in a detail grid.
The only time it will break again is with a full post-back.
How can I make this work every time?
Kind regards
Mark Eaton
I am using VS2008, .NET 3.5 and C#.
My Prometheus RadGrid is populated with Prometheus RadComboboxes. These in turn fire client-side SelectedIndexChanged events.
I can catch the events nicely. In Javascript I use the following to determine the row the RadComboBox came from (which I can then manipulate other controls in that same row...):
function cboSubType_SelectedIndexChanged(sender, e)
{
var item = e.get_item();
var combo = item.get_comboBox();
var rowElement = combo.get_parent();
// Loop through Detail Tables
for(var i = 0; i < grid.get_detailTables().length; i++)
{
// Loop through Rows
for(var j = 0; j < grid.get_detailTables()[i].get_dataItems().length; j++)
{
if(grid.get_detailTables()[i].get_dataItems()[j] == rowElement)
etc. etc...
The rowElement seems to point to something different when first fired (and hence fails), however 2nd time onwards it always points to a valid row in a detail grid.
The only time it will break again is with a full post-back.
How can I make this work every time?
Kind regards
Mark Eaton