Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Re: DATAGRID with XML response from the server facing issues

Expand Messages
  • Satyam
    The DataTable draws two headers if it is a scrolling DataTable. The isolated header, with no tbody is the one you will actually see and the one that remains
    Message 1 of 5 , Aug 27, 2009
    • 0 Attachment
      The DataTable draws two headers if it is a scrolling DataTable. The
      isolated header, with no tbody is the one you will actually see and the
      one that remains fixed while the rest of the table scrolls. The header
      that is attached to the rest of the table should not be visible since,
      when the table is scrolled, it would scroll along with it. So, having
      two headers is fine, the problem is why it overlaps the data and that
      might be a CSS issue.

      I see you use tables to format data, this is not a recommended practice
      nowadays. Have you checked YUI Grids ?


      Satyam

      meettarunkumar escribió:
      > Hi Satyam,
      > first,Thanks for your reply and suggestion also :-)
      > The problem is not with key mapping
      > just save the web page and found that my data or first row was their on the page it just got overlap over the header of the datatable/datagrid.
      >
      > both these autogenerated div's have the header as the element
      > <div class="yui-dt-hd" style="background-color: rgb(242, 242, 242);">
      >
      > <div class="yui-dt-bd" style="height: 20em;">
      >
      >
      >
      > my HTML code is :
      >
      > <DIV id=carListGrid>
      > <TABLE class="frei" cellSpacing=0 cellPadding=0 width="100%">
      > <TR>
      > <TD class=gridTD align=left>
      > <DIV id="carList"></DIV>
      > </TD>
      > </TR>
      > </TABLE>
      > <TABLE class="frei" cellSpacing=0 cellPadding=0 width="100%">
      > <TR>
      > <TD class=padfTD style="text-align: justify;">
      > Disclaimer. THE DATA, INFORMATION, ARTICLES, MONOGRAPHS AND OTHER MATERIAL (THE
      > </TD>
      > </TR>
      > </TABLE>
      > </DIV>
      >
      > </DIV>
      >
      >
      > and as mentioned in previous mail my datatable is :
      > var myDataTable = new YAHOO.widget.DataTable("carList",myColumnDefs, myDataSource,datagridConfig);
      >
      > i dont know how the header is overlapping the fist row.
      >
      > Please help
      >
      >
      >
      >
      > --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
      >
      >> JavaScript is case-sensitive, key names in the column defs should match
      >> those in the fields array. I can't even imagine how is it you get even
      >> a single row.
      >>
      >> Suggestion: If you want the headings in bold, set the font weight via
      >> CSS using the className the datatable assigns the header row, do not put
      >> styling tags into the code.
      >>
      >> Satyam
      >>
      >> meettarunkumar escribió:
      >>
      >>> Hi,
      >>> I have to display my xml response in an dattable of YUI
      >>> my XML is like :
      >>> <?xml version="1.0" encoding="ISO-8859-1"?>
      >>>
      >>> <fe>
      >>>
      >>> <ecs>
      >>> <ec>
      >>> <fr>21</fr>
      >>> <cn>Fedex</cn>
      >>> <cc>FTA-1</cc>
      >>> <td>1-2 days</td>
      >>> <am>18</am>
      >>> </ec>
      >>>
      >>> <ec>
      >>> <fr>23</fr>
      >>> <cn>Fedex</cn>
      >>> <cc>FTA-1</cc>
      >>> <td>1-2 days</td>
      >>> <am>18</am>
      >>> </ec>
      >>> </ecs>
      >>> </fe>
      >>>
      >>>
      >>> i am using yui_2.7.0b
      >>> My DATAGRID configuration is :
      >>>
      >>> var datagridConfig = {
      >>> scrollable:false,
      >>> height:"4em",
      >>> zIndex:"1001"
      >>> }
      >>>
      >>> var myColumnDefs = [
      >>> {key:"CN", width:180, label: '<B>CN</B>'},
      >>> {key:"TD", width:120, label: '<B>TD</B>'},
      >>> {key:"FR", width:110, label: '<B>FR</B>'}
      >>> ];
      >>>
      >>> var myDataSource = new YAHOO.util.DataSource(xmldata);
      >>> myDataSource.responseType = YAHOO.util.DataSource.TYPE_XML;
      >>> myDataSource.responseSchema = {
      >>> resultNode: "ec",
      >>> fields: ["fr","cn","cc","td"]
      >>> };
      >>>
      >>>
      >>> var myDataTable = new YAHOO.widget.DataTable("carList",myColumnDefs, myDataSource,datagridConfig);
      >>> var myDataTable = new YAHOO.widget.ScrollingDataTable("carList", myColumnDefs, myDataSource, {height:"10em", width:"100%"});
      >>>
      >>>
      >>>
      >>> When i display this grid using the above configuration on my scrrn i get only one row though an alert tells me that i have two elements in the reponse
      >>>
      >>> if i repeat this with 12 element i get only 11 rows the first row is not shown
      >>>
      >>> Please if any one can help
      >>> its Urgent
      >>>
      >>>
      >>>
      >>>
      >>>
      >>> ------------------------------------
      >>>
      >>> Yahoo! Groups Links
      >>>
      >>>
      >>>
      >>> ------------------------------------------------------------------------
      >>>
      >>>
      >>> No virus found in this incoming message.
      >>> Checked by AVG - www.avg.com
      >>> Version: 8.5.392 / Virus Database: 270.13.69/2328 - Release Date: 08/26/09 12:16:00
      >>>
      >>>
      >>>
      >
      >
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - www.avg.com
      > Version: 8.5.392 / Virus Database: 270.13.69/2328 - Release Date: 08/26/09 12:16:00
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.