Posts

Showing posts from February, 2013

for get data with the variable c#

json = X.GetCmp ("Hidden1").Value.ToString();

pass extra parameter into the renderer FN

and the function will be:     var saveData = function (Hidden, GrPanel) {         //console.log(Ext.getCmp(param));         var gr = Ext.getCmp(Hidden);         Ext.getCmp(Hidden).setValue(Ext.encode(App.gr.getRowsValues({ selectedOnly: false })));     };

string to double c#

double number ; string value = "1,097.63" ; NumberStyles style = NumberStyles . Number | NumberStyles . AllowCurrencySymbol ; CultureInfo culture = CultureInfo . CreateSpecificCulture ( "en-US" ); if ( Double . TryParse ( value , style , culture , out number )) Console . WriteLine ( "Converted '{0}' to {1}." , value , number ); else Console . WriteLine ( "Unable to convert '{0}'." , value );

Two dimensional Array into DataTable

string   [,] mdArray = new string   [ 3 , 3 ]{{ "a" , "b" , "c" },{ "d" , "e" , "f" },{ "g" , "h" , "i" }};         ArrayList arList = new ArrayList ();         DataTable table = new DataTable ();        table . Columns . Add ( "C1" );        table . Columns . Add ( "C2" );        table . Columns . Add ( "C3" );         //Multi Dimension Array into DataTable         for ( int outerIndex = 0 ; outerIndex < 3 ; outerIndex ++)         {               DataRow newRow = table . NewRow ();             for ( int innerIndex = 0 ; innerIndex < 3 ; innerIndex ++)             {                newRow [ innerIndex ] = mdArray [ outerIndex , innerIndex...

escaping character in javascript

escape ( "It's me!" ) Have Fun!