This is a migrated thread and some comments may be shown as answers.

Dual Listbox Funcationality Multi-Select Error

1 Answer 87 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Todd
Top achievements
Rank 1
Todd asked on 24 Feb 2012, 04:24 PM

I'm trying to implement dual listbox functionality that is nearly identical to the AJAX version of the code sample provided by Telerik:

http://www.telerik.com/community/code-library/aspnet-ajax/grid/dual-listbox-functionality.aspx

However, I need to be able to select multiple rows to move between the two listboxes instead of one at a time as the sample does.  

If I set AllowMultiRowSelection = true for both grids and then attempt to move all items form one grid to the other, I get a JavaScript error.: 

Line: 4083
Error: Sys.ArgumentUndefinedException: Value cannot be undefined.
Parameter name: element

The file that is throwing the error appears to be a Microsoft AJAX related scripting file:

// Name:        MicrosoftAjax.debug.js
// Assembly:    System.Web.Extensions
// Version:     4.0.0.0
// FileVersion: 4.0.30319.225
//-----------------------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------
// MicrosoftAjax.js
// Microsoft AJAX Framework.

It appears that some part of the AJAX scripting doesn't like it that one of the grids suddenly has no records.   I tried implementing buttons that move all items form one grid to the other via the code behind, and the JavaScript error still shows up.

Is there a fix or work around for this?  I haven't been able to find one yet :-(

1 Answer, 1 is accepted

Sort by
0
Todd
Top achievements
Rank 1
answered on 24 Feb 2012, 04:59 PM
Answering my own question...

The AJAX error I was seeing when enabling multi row select was caused by the grid's using auto-generated columns.  If I used fixed columns, then I don't get the error.

Whew!
Tags
Grid
Asked by
Todd
Top achievements
Rank 1
Answers by
Todd
Top achievements
Rank 1
Share this question
or