Could you give me a hint on how to add it to my code? thx, -Art
Quoting Matt Chotin <[EMAIL PROTECTED]>:
Did you see getColumnIndex(name) in the ASDoc?
And each DataGridColumn has a columnName property too.
Matt
_____
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, February 17, 2005 10:44 AM To: [email protected] Cc: [EMAIL PROTECTED] Subject: [flexcoders] How to reference column name in my code?
Hi All,
included is a snippet of code that hides & shows columns in the datagrid.
How do I reference columnName instead of columns[i] ?? I also have code that switches columns ( thanks Manish ;) ) but when I switch a column my code hided the wrong column because it is referencing the columns[i] instead of the columnName.
help would be nice.
thanks, -Art
// Hide Columns Code: var initialRender : Boolean = true; var columns : Array = new Array(); var columnWidths : Array = new Array();
function getAllColumns() { if ( initialRender ) { for ( var i=0; i < historyDg.columnCount; i++ ) { columns[i] = historyDg.columns[i]; } initialRender = false; } } function layoutColumns() { tabNav_1.selectedChild = details; var count : Number = 0; historyDg.removeAllColumns(); if ( wMonthCheck.selected ) { historyDg.addColumnAt(count, columns[0]); count++; } if ( hoursCheck.selected ) { historyDg.addColumnAt(count, columns[1]); count++; } }
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://us.ard.yahoo.com/SIG=1296svtnm/M=298184.6018725.7038619.3001176/D=gr oups/S=1705007207:HM/EXP=1108752136/A=2532114/R=2/SIG=12k1ughh6/*http:/clk.a tdmt.com/NFX/go/yhxxxnfx0020000014nfx/direct/01/&time=1108665736108444>
<http://view.atdmt.com/NFX/view/yhxxxnfx0020000014nfx/direct/01/&time=110866 5736108444>
<http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S= :HM/A=2532114/rand=927294198>
_____
Yahoo! Groups Links
* To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <http://groups.yahoo.com/group/flexcoders/>
* To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
* Your use of Yahoo! Groups is subject to the Yahoo! <http://docs.yahoo.com/info/terms/> Terms of Service.

