First row trouble with datagrid component

Dear all,
I think my question is entirely explained in the topic
summary of this post. I have a datagrid that uses a item renderer.
The main app is defined like in the first part of the attached
code. The itemrenderer looks like the second part of the attached
code.
When I run it, the first item of my dataprovider is not shown
while the first line of my datagrid is always empty... Any idea to
explain this strange behavior ?
Thanks in advance...

Hi WAV;
You might have better luck posting over in the Front Row Forum.
Allan

Similar Messages

  • How do I set only the first row of a DataGrid as the selected row?

    I have a "Go" button on a search form that fetches data into an already data bound grid.  After the data is fetched, I want to make the first row in the Datagrid the selected row, as if the user clicked on it.  If the result set is empty, I don't want the code to crash.  (I only want one row to be able to be selected at a time)
                protected function btnGo_clickHandler(event:MouseEvent):void
                    getSBJsResult.token = baa_data_svc.getSBJs(cmbSrch.text);
                    grdSBJs. //  ?????  What goes here to select the first row?

    This should do it.
    If this post answered your question or helped, please mark it as such.
    if(myDataGrid.dataProvider.length > 0){
      myDataGrid.selectedIndex = 0;

  • To disable first row in a DataGrid

    Hi all,
    I have a data grid displaying 4 rows.In this data grid i want
    to make the first row alone disabled that is the first row should
    not be editable but the remaining rows should be editable.Can
    anyone please help me out in this issue.
    Thanks & Regards,
    Lalitha

    Hi,
    Create a Value Node in the below mentioed structure
    TableNode
    ---value1
    ---value2
    ---value3
    ---TableRowReadOnly(boolean)
    Note: - make sure that the attribute TableRowReadOnly is in the same level as the other attributes in the node
    Create an Action for the onLeadSelect event for the table and in that action, write the following code:
    int leadSelection = wdContext().node<nodename>().getLeadSelection();
    if(leadSelection != -1)
         for(int i = 0; i < wdContext.nodeTableNode().size(); i++)
                 if(condition)
                          wdContext().nodeTableNode().getTableNodeElementAt(i).setTableReadOnly(true);
                else
                          wdContext().nodeTableNode().getTableNodeElementAt(i).setTableReadOnly(false);
    Hope this helps u
    Regards,
    Poojith MV

  • Repetable row trouble with auto sum

    Hi,
    I'm really struggling with this table. Please take a look.
    What I want is to have fields Komada, m2, Iznos be summed up in a corresponding total field thats underneath the table.
    The trouble is I made a button that adds or substracts new table rows. Please check it in LC Designer so I understand your suggestions.
    The form is here.
    udrugasasrcem.com/test4.pdf
    Thanks

    If you use this script
    ($ = Sum(amount[*]))
    in the calculate-event the calculate always recalculate if one of the parameter in the SUM function is changing his value.
    xfa.resolveNodes( "master.Table3.Row1[*].iznos"); --> The [] aren't NO a sign for an array. This square brackets are only from the instances. But it's ok you used it as a name of the varibale.
    I don't use execCalculate(); because this is not so good for the performance in my opinion. Normally everything is working fine with the calculate.event.
    Let me see the next days. I will take a look to your pdf when I have more time.
    Kind regards
    Mandy
    PS:
    In the calculate-event (using Formcalc) of the Footer from Komada use
    $ = Sum(Row1[*].komada)
    In the calculate-event (using Formcalc) of the Footer from m2 use
    $ = Sum(Row1[*].m2)
    In the calculate-event (using Formcalc) of the Footer from iznos use
    $ = Sum(Row1[*].iznos)
    This all three works correct!
    The problem in your script is-..there are a few mistakes...you use in Formcalc "this". "This" you could only use by Javascript. The same in Formcalc is "$"...
    You used too much brackets, for example here..you don't neefd TWO brackets!
    else if ((this.resolveNode("$").rawValue !== null || this.resolveNode("$").rawValue !== "")) {

  • Front Row trouble with new 15" 2.4 MacBook Pro

    I just picked up a MacBook Pro last night. I was very excited, as I've wanted one for a while now, but when I tried to watch a dvd in Front Row a few strange things happened that I've never seen anyone post about on this board.
    First, when I selected play from the DVD's menu, Front Row quit. I launched it again and everything seemed fine as the dvd was now playing, but then I noticed that the backlit keyboard would light up and turn off every minute or two. This went on for the whole time I was watching the disc... about a couple of hours... the keys would light up then they'd be unlit and then light up again.
    Finally, while I was watching the dvd the screen went blank... there was still audio, but no picture to go along with it. After I touched the trackpad the video came back. This happened a couple of times.
    I don't think it should matter, but I'll also mention that I was using the MacBook Pro on battery while all this happened.
    So, has anyone else experienced these issues? I tried looking through all the posted topics, but couldn't find anything related to my experience with Front Row. I'm debating on whether I should exchange my MacBook Pro as I may just have a lemon.
    If anyone has any advice/tips I'd greatly appreciate it. Thanks!

    Hi WAV;
    You might have better luck posting over in the Front Row Forum.
    Allan

  • Trouble with DataGrid's last column width

    I have a datagrid with thirty columns.
    When I use the mouse to drag the window and resize its size,the last column width becomes more and more wide,and the previous column width is squeezed small.
    If anybody else came accross the same problem,can you share your solution?
    Thanks,
    April

    If horizontalScrollPolicy=”off” then there is an attempt to fit all columns within the width of the DG while respecting minWidth of the columns.  Make sure the minWidths allow the columns you want to shrink can shrink.
    However, there is still a chance of round-off error.  I think the only solution may be to set the width of each column as you want it on a resize event from the DG.

  • DataGrid ItemRenderer First Row

    Hi,
    I have a DataGrid:
    <mx:DataGrid  id="gamesGrid" x="10" y="81" width="828" variableRowHeight="false">
            <mx:columns>
                <mx:DataGridColumn headerText="Game" itemRenderer="GameContainer"/>
                <mx:DataGridColumn headerText="Starts"  itemRenderer="StartsContainer"/>
            </mx:columns>
    </mx:DataGrid>
    Its dataProvider is an XMLListCollection.
    Its ItemRenderer are VBox objects (either written in Actionscript or in MXML - either way).
    My problem is, that when the XMLListCollection is updated, my ItemRenderer's are either reinstantiated or reinitialised.
    However, the creationComplete handler of the ItemRenderer (in my case a VBox) is only called for the first row of the DataGrid.
    This is a problem, because it clears the display data.
    If i have the ItemRenderer in code, then i see the constructor called when i update the dataProvider.
    If i have ItemRenderera an MXML component, then i see creationComplete called when i update the dataProvider.
    All i want to do is update the contents of the ItemRenderer - not re instantiate it (especially not JUST the first row of ym datagrid).
    How do i get around this and is this a bug?
    Sounds quite similar to:
    http://forums.adobe.com/thread/604259
    Regards, Sam

    Apologies if I've misunderstood your problem.
    But if you just want to update the data displayed in the renderer when the dataProvider data changes, it's normal to override the "set data" function in the renderer. Simple example based on those found in the docs:
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
        horizontalAlign="center">
        <mx:Script>
            <![CDATA[
                import mx.events.FlexEvent;
                override public function set data(value:Object):void {     
                    if(value != null)  {
                        super.data = value;
                        // do whatever you need to do here
                        // for example
                        var xml:XML = value as XML;
                        myTextArea.text = xml.myProperty
                    // Dispatch the dataChange event.
                    dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
            ]]>
        </mx:Script>
        <mx:TextArea id="myTextArea"/>
    </mx:VBox>
    As renderer instances are recycled in data grids, I think using creationComplete will have unpredictable results.

  • Getting the current row as the DataGrid is created.

    I want to trap the first row of my DataGrid how can I do
    this?

    Amit, shame you didn't include a code example. The first blog does work...though probably not the most effecient mechanism. The 2nd Blog seems to be missing something as referencing e.site isn't enough. I've included a code sample of what it should be. Please include the routine DeleteNil as you can't assign a value to a null node. If theres a more effecient way..by all means post a blog. Cheers
    public void Items_UnitGross_Changed(object sender, XmlEventArgs e)
    // Check if value has changed and not a table insertion
    if (e.Operation == XmlOperation.ValueChange)
    // Get Current Row
    XPathNavigator xNavigator = e.Site;
    bool bParent = xNavigator.MoveToParent();
    // Get Reference to the Gross Value
    XPathNavigator xField = xNavigator.SelectSingleNode("boc:UnitGross", this.NamespaceManager);
    DeleteNil(xField);
    double dGross = Convert.ToDouble(xField.Value);
    // Get Reference and set the Net Value
    xField = xNavigator.SelectSingleNode("boc:UnitNet", this.NamespaceManager);
    DeleteNil(xField);
    xField.SetValue(getNet(dGross).ToString());
    public void DeleteNil(XPathNavigator node)
    if (node.MoveToAttribute("nil", "http://www.w3.org/2001/XMLSchema-instance"))
    node.DeleteSelf();
    private double getNet(double Gross)
    // Calculates the Net Value (without Tax) from the Gross value
    double dNet = Gross / C_VATRATE_DIV;
    return dNet;

  • Textinput in all the colums of the first row of datagrid

    Hi
    i need Textinput in all the colums of the first row of
    datagrid.
    can ayone tell me the solution..
    Thx in advance.

    This will not be easy. i see two possible solutions.
    You could use a custom itemRenderer. This will require that
    you find some way to identify the dataProvider collection index
    from within the renderer, and set the renderer to editable when
    that index is 0.
    Or you could create a composite component using two
    dataGrids, one with a single row for the editable columns. There
    are examples available on combining two DGs this way.
    Again, this will be difficult, so be sure that it is
    absolutely required and consider some other UI approach if posible.
    Tracy

  • How to keep the first row fixed in a JTable, with sorting, and bellow the headers ?

    I am trying to change the following code so then the fixed rows will stay on top(but below the headers!), but when I change getContentPane().add(fixedScroll, BorderLayout.SOUTH); to getContentPane().add(fixedScroll, BorderLayout.NORTH); it stays above the headers. How can I put the first rows on top, but below the headers ? Thanks.
    import java.awt.*; 
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    * @version 1.0 03/05/99
    public class FixedRowExample extends JFrame {
      Object[][] data;
      Object[] column;
      JTable fixedTable,table;
      private int FIXED_NUM = 2;
      public FixedRowExample() {
        super( "Fixed Row Example" );
        data =  new Object[][]{
            {      "a","","","","",""},
            {      "","b","","","",""},
            {      "","","c","","",""},
            {      "","","","d","",""},
            {      "","","","","e",""},
            {      "","","","","","f"},
            {"fixed1","","","","","","",""},
            {"fixed2","","","","","","",""}};
        column = new Object[]{"A","B","C","D","E","F"};
        AbstractTableModel    model = new AbstractTableModel() {
          public int getColumnCount() { return column.length; }
          public int getRowCount() { return data.length - FIXED_NUM; }
          public String getColumnName(int col) {
           return (String)column[col];
          public Object getValueAt(int row, int col) {
            return data[row][col];
          public void setValueAt(Object obj, int row, int col) {
            data[row][col] = obj;
          public boolean CellEditable(int row, int col) {
            return true;
        AbstractTableModel fixedModel = new AbstractTableModel() {     
          public int getColumnCount() { return column.length; }
          public int getRowCount() { return FIXED_NUM; }
          public Object getValueAt(int row, int col) {
            return data[row + (data.length - FIXED_NUM)][col];
        table = new JTable( model );
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        table.setAutoCreateRowSorter(true);
        fixedTable = new JTable( fixedModel );
        fixedTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        fixedTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        JScrollPane scroll      = new JScrollPane( table );
        scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
        JScrollPane fixedScroll = new JScrollPane( fixedTable ) {
          public void setColumnHeaderView(Component view) {} // work around
                                                 // fixedScroll.setColumnHeader(null);
        fixedScroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        JScrollBar bar = fixedScroll.getVerticalScrollBar();
        JScrollBar dummyBar = new JScrollBar() {
          public void paint(Graphics g) {}
        dummyBar.setPreferredSize(bar.getPreferredSize());
        fixedScroll.setVerticalScrollBar(dummyBar);
        final JScrollBar bar1 = scroll.getHorizontalScrollBar();
        JScrollBar bar2 = fixedScroll.getHorizontalScrollBar();
        bar2.addAdjustmentListener(new AdjustmentListener() {
          public void adjustmentValueChanged(AdjustmentEvent e) {
            bar1.setValue(e.getValue());
        scroll.setPreferredSize(new Dimension(400, 100));
        fixedScroll.setPreferredSize(new Dimension(400, 52));  // Hmm...
        getContentPane().add(     scroll, BorderLayout.CENTER);
        getContentPane().add(fixedScroll, BorderLayout.SOUTH);   
      public static void main(String[] args) {
        FixedRowExample frame = new FixedRowExample();
        frame.addWindowListener( new WindowAdapter() {
          public void windowClosing( WindowEvent e ) {
            System.exit(0);
        frame.pack();
        frame.setVisible(true);

    Sorry, this code missed a very important line:
    table.setAutoCreateRowSorter(true);
    So you meant:
    Object[][] header;//class atribute
    header=new Object[][]{//in the constructor
                { "h","i","j","k","l","m"},
                { "h","i","j","k","l","m"}
    public Object getValueAt(int row, int col) {//in the TableModel
            if (row==0){
                return header[row][col];
            else {
                return data[row][col];
    I tried, but when I sort, the first row get sorted with the rest.

  • How to create a first row in crystal report as opening balance which contains two columns with debit and credit

    I have created a crystal report with credit and debit column. Balance column created on the report. Report running with cummulative balance. THis report contain an option for date range. If i filtered this report its not showing the actual balance. I need
    a first row to indicate previous balance as opening balance in this report.  And following is the formula for balance column.
    Whileprintingrecords;
    Shared Numbervar balance;
    Shared Numbervar display;
    balance:={@debit}-{@credit};
    display:=display+balance;
    display

    As this question is out of the T-SQL queue, thus I would suggest you consult Crystal Report questions to the correct forums.
    C#
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral
    VB
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vbgeneral
    people there have more knowledge on Crystal Report.

  • Trouble with slow Macbook Air. I have first generation MacBook Air and have a hard time keeping hard drive from being full. Right now, I have almost 5 gigs available, but mac is slow and I keep getting color wheel when I use Mail. Any suggestions?

    Trouble with slow Macbook Air. I have first generation MacBook Air and have a hard time keeping hard drive from being full. After trashing many docs, I have almost 5 gigs available, but mac is slow and I keep getting color wheel when I use Mail. I'd like to install Lion, but now I'm afraid it will slow down my machine even further. Do I have enough free hard disc space? Is Mail problem related to free hard disc space? Thanks for your help!

    7gb of free disc space is required to install Lion.  Read this about how to free up disc space: http://pondini.org/OSX/DiskSpace.html.  Also, advice on how to speed up your mac: http://www.maclife.com/article/feature/25_ways_speed_your_mac

  • Having trouble with jQuery toggle row to work right

    The results appear in a table and each row when clicked on shows detailed information.  I'm trying to use the jQuery toggle so it can open the detail information under the persons name.
    The jQuery code I have is this...
    <script>
    $(document).ready(function() {
         $("#title").click(function() {
         $("#detail").toggle();
    </script>
    Then my cfoutput table is this...
    <table>
    <thead>
    <tr><th>First Name</th></tr>
    </thead>
    <tbody>
    <cfoutput query="getRecords">
    <tr>
    <td id="title">#getRecords.firstN#</td>
    </tr>
    <tr>
    <td id="detail"><cfdiv bind="url:details.cfm?firstN=#firstN#" /></td>
    </tr>
    </cfoutput>
    </tbody>
    </table>
    Now what happens with that is all the detail records show up with the name and only the first row can toggle.  Everything else doesn't do anything.  Also is there a way to have the toggle show as closed first?  Thank you so much for any help with this.

    This is because you are referencing an ID with jQuery. An ID has to be unique, only one can exist, and after you create multiple cells with the same ID, jQuery just takes the first one.
    You will be better off using a class instead. So you can change you jQuery to look like this:
    $(document).ready(function() {
         $(".title").click(function() {
              $(this).parent().next().find('td').toggle();
    This will get the current clicked cells parent row, then go to the next row and look for the cell, then it will toggle.
    You then need to change your HTML to be something like this:
    <cfoutput query="getRecords">
        <tr>
            <td class="title">#getRecords.firstN#</td>
        </tr>
        <tr>
            <td class="detail"><cfdiv bind="url:details.cfm?firstN=#firstN#" /></td>
        </tr>
    </cfoutput>
    If you want to hide the detail cell first you can add some CSS to the detail class like so:
    .detail {
         display:none;
    Here is an example of it all - JSFiddle

  • Issue with empty value of LOV of first row after clicking on add row button

    JDeveloper 11.1.14
    I have a page with table-form layout.
    In the form I have two detail tables on the same page (tabbed).
    I have an issue with using model-choicelist LOV's in the detail tables.
    I am able to add a new row in the detail table, select a value from the model-choiceList LOV (which is required) and save the new row.
    After adding another row in this table the value of the model-choiceList LOV in the previous row is suddenly empty on the screen. It is not empty in the database,
    I have checked it in the datbase. Only the value of the LOV of the first row on the page is being cleared after clicking on the add row button.
    After saving the new row I get the following error on the screen:
    Error: a selection is required. --> first row
    Does anyone have a suggestion how to solve this issue?

    After adding another row in this table the value of the model-choiceList LOV in the previous row is suddenly empty on the screen. It is not empty in the database, Is the complete LOV blank or only the selected value .. can you try putting autoSubmit=true in the LOV and try ? Also check if you have any partialTriggers on the LOV from the add button ?

  • I've had trouble with my Macbook since the first month I bought it. I've replaced the hard drive 3 to 4 times. Now some programs won't work or shut off by itself. Is it possible to ask for a complete exchange of products?

    I've had trouble with my Macbook since the first month I bought it. I've replaced the hard drive 3 to 4 times. Now some programs won't work or shut off by itself. Is it possible to ask for a complete exchange of products?

    This may help you: http://store.apple.com/us/help/returns_refund
    It would appear that you can ask for an exchange but it doesn't specify any time frame... Hopefully someone more knowledgeable can add to this.
    By the way, if you've replaced the drive so many times, perhaps there's something else going on elsewhere.

Maybe you are looking for

  • When battery is empty my iphone 3GS shuts down and won't turn on for a day!

    Hi, I desperately need your help! When the battery on my iphone runs out, the device, naturally, turns off. But even though I plug it into my charger - nothing happens; the screen is blank and stays like that for some hours, even a day long. I then,

  • URGENT to find back an earlier message

    hope that pros can help me to solved this problem... i sent an urgent message to someone which i need to find back for his phone number but after that oni i realize that my 5530 xpress music oni keeps 20 messages sent!!!!! did any1 noe how to check b

  • SOAP-ERROR: Parsing Schema: element has both 'type' attribute and subtype

    Hi, i have created web service link which deals with calling a Pl/sql procedure with the help of DBAdapter in jdev 10.1.3.4 .here i am trying to insert a row in tables.my webservice is working fine from BPEL console my collegue who is working on PHP

  • F-32 Due Date issue

    In SAP ECC6.0, we use F-28 to apply payments from customers.  We do not apply that payment to an invoie and leave the payment on account. The accounting clerk then clears customr open items (invoices and payments) using F-32.  For partial payments, t

  • API to Maintain User Defined Tables in Oracle Apps

    Hi, Is ther any API to INSERT/UPDATE the Values into the User Defined Tables. I found one API (+AD_DD+) which is all about registring Table/Rows/Columns to it but NOT about VALUES. Please help me out. Thanks !