Posts

html to Excel

        public void button_click_Excel(object sender, EventArgs e) {             Response.Clear();             Response.ClearHeaders();             Response.ClearContent();             Response.ContentType = "application/force-download";             Response.AddHeader("content-disposition", "attachment; filename=Print.xls");             Response.Write(" ");             Response.Write(" ");             Response.Write("");             Response.Write(" ");             Response.Write(this.htmlData());             Response.Write(" ");            Response.Flush();         } ...

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!

custom modal in ext.net

in ext.net you can use window for modal http://examples.ext.net/#/Window/Basic/Show/ but also sometimes this is handy :p     var winPanel = Ext.getCmp('panelWindowId');     if (!winPanel) {         winPanel = new Ext.Window({             title: 'SLA-Einhaltung gesamt in % nach Onsite Gruppen', //Title of the Window             id: 'panelWindowId', //ID of the Window Panel             autoHeight: true, //Height of the Window will be auto             width: 450, //Width of the Window             x: 400,             y: 120,             resizable: true, //Resize of the Window, if false - it cannot be resized             closable: true, //Hide close button of the Window         ...