|
How to access DataTable? -- OldGun --
Thanks Albert Weinert ,that is what I wanted. |
|
-- OldGun --
I am sorry,Albert Weinert ,I test your tips,but it doesn't work. alert(oSheet.Name); // This eork well alert(ds.Tables .Name); // This eork well Following doesn't work! alert(ds.Tables .Name); alert(ds.Tables ); alert(ds.Tables .FieldName); alert(ds.Tables .ColumnName); alert(ds.Tables ); Can anyone give me help? |
|
-- AlbertWeinert --
Old Gun schrieb: I am sorry,Albert Weinert ,I test your tips,but it doesn't work. > ); Can anyone give me help? Sorry, i forgot the .Name. var dt = ds.Tables ; alert(dt.Rows ); -- Freundliche Grüße Albert Weinert http://der-albert.com |
|
-- JosephGuadagno --
You can only access a DataTable via the actual column names... dt.Rows .LastName This assumes that the DataTable has two columns names FirstName and LastName Joseph Guadagno http://josephguadagno.net On 7/13/06, Albert Weinert <albert.weinert> wrote: Old Gun schrieb: > I am sorry,Albert Weinert ,I test your tips,but it doesn't work. > > alert(ds.Tables ); > > Can anyone give me help? Sorry, i forgot the .Name. var dt = ds.Tables ; alert(dt.Rows ); -- Freundliche Grüße Albert Weinert http://der-albert.com > -- Joseph Guadagno http://josephguadagno.net |
|
-- AlbertWeinert --
Joseph Guadagno schrieb: You can only access a DataTable via the actual column names... Yes, and no. The column-names are in the DataTable.Columns Array, so that var dt = ds.Tables ; alert(dt.Rows ); works. I tested that before i wrote it. -- Freundliche Grüße Albert Weinert http://der-albert.com |
|
-- OldGun --
Albert Weinert , I test your code, var dt = ds.Tables ; alert(dt.Columns .Name); this works OK, but following doesn't work. var dt = ds.Tables ; alert(dt.Rows ); ---------------------------------------------------------------- all my code : function WriteReport_CallBack(response) { var ds = response.value; //if the response wasn't what we expected if (ds == null || typeof(ds) != "object" && ds.Tables == null) { alert('null'); return; } var dt = ds.Tables ; //alert(dt.Columns .Name); alert(dt.Rows ); //alert(oSheet.Name); //alert(ds.Tables .Name); //alert(ds.Tables .Name); //alert(ds.Tables ); //alert(ds.Tables .FieldName); //alert(ds.Tables .ColumnName); //alert(ds.Tables ); } |
|
-- OldGun --
Hi,Albert Weinert I am sorry,You are right! Here we discuss AjaxPro,But I still use Ajax. It works right when I updated to AjaxPro,Thank you for your help. |