Extra row in data grid

after I load a object into data grid created from a web
service it will always seem to create a new blank row. When I get a
error after clicking on it, it always says "-1" for the rows count.
when I shrink the size of the datagrid it elminates some of the
extra row, but still there is a bit of it showing. how do I resize
the datagrid so it doesn't spit out a extra row, or a part of one.
http://www.ctrlzsc.com/other/pic.png
this is a pic showing the extra row, just look where my badly drawn
arrow is pointing to.

hi, xyco45
you can set the dataGrid's height and the rowHeight. In my
experience, for example, first, you set the headerHeight="25" and
rowHeight="22", the height will be setted
(headerHeight+rowHeight*(rowNumbers)+1) or
(headerHeight+rowHeight*(rowNumbers)+2), I thought this question
will be solved.

Similar Messages

  • How to manually insert an extra row of data in to a record set

    hi there, i have a standard query which gets me some rows of
    data
    is there a way to manually add in an extra row of data (an
    position that as row number 1 in the recordset)?
    i've tried to find something on this in google / live docs -
    but alas to no avail
    if anyone could give me a pointer in the right direction
    (just a tag would be a help) i'd be very grateful indeed.
    thanks very much

    thank you very much for your replies, this "union query"
    sounds like the way forward for me - thank you very much i shall go
    and investiage this now.
    the reason i was a bit slow in replying was that in interim i
    had coded around my problem
    <cfif recordset.currentrow eq 1>
    #output the extra row i wanted to add here#
    </cfif>
    which, whilst being a bit crude did do the job - however i
    will check out this union query and if that does what it sounds
    like it will - i'll document my final solution here in case this
    helps anyone else
    thanks again for your help guys

  • FillBy always fills in the same row in data grid view. How to make it fill in a new row for each click of the Fillby Button? VB 2010 EXPRESS?

    Hi there, 
    I am a beginner in Visual Basic Express 2010. I have a Point of Sale program that uses DataGridView to display records from an external microsoft access
    database using the fillby query. 
    It works, but it repopulates the same row each time, but i want to be able to display multiple records at the same time, a new row should be filled for
    each click of the fillby button. 
    also I want to be able to delete any records if the customer suddenly decides to not buy an item after it has already been entered. 
    so actually 2 questions here: 
    1. how to populate a new row for each click of the fillby button 
    2. how to delete records from data grid view after an item has been entered 
    Thanks 
    Vishwas

    Hello,
    The FillBy method loads data according to what the results are from the SELECT statement, so if there is one row then you get one row in the DataGridView, have two rows then two rows show up.
    Some examples
    Form load populates our dataset with all data as it was defined with a plain SELECT statement. Button1 loads via a query I created after the fact to filter on a column, the next button adds a new row to the existing data. When adding a new row it is appended
    to the current data displayed and the primary key is a negative value but the new key is shown after pressing the save button on the BindingNavigator or there are other ways to get the new key by manually adding the row to the backend table bypassing the Adapter.
    The following article with code shows this but does not address adapters.
    Conceptually speaking the code in the second code block shows how to get the new key
    Public Class Form1
    Private Sub StudentsBindingNavigatorSaveItem_Click(
    sender As Object, e As EventArgs) Handles StudentsBindingNavigatorSaveItem.Click
    Me.Validate()
    Me.StudentsBindingSource.EndEdit()
    Me.TableAdapterManager.UpdateAll(Me.MyDataSet)
    End Sub
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    'TODO: This line of code loads data into the 'MyDataSet.Students' table. You can move, or remove it, as needed.
    Me.StudentsTableAdapter.Fill(Me.MyDataSet.Students)
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Me.StudentsTableAdapter.FillBy(Me.MyDataSet.Students, ComboBox1.Text)
    End Sub
    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
    Me.MyDataSet.Students.AddStudentsRow("Jane", "Adams", "Female")
    End Sub
    End Class
    Get new key taken from
    this article.
    Public Function AddNewRow(ByVal sender As Customer, ByRef Identfier As Integer) As Boolean
    Dim Success As Boolean = True
    Try
    Using cn As New OleDb.OleDbConnection With {.ConnectionString = Builder.ConnectionString}
    Using cmd As New OleDb.OleDbCommand With {.Connection = cn}
    cmd.CommandText = InsertStatement
    cmd.Parameters.AddWithValue("@CompanyName", sender.CompanyName)
    cmd.Parameters.AddWithValue("@ContactName", sender.ContactName)
    cmd.Parameters.AddWithValue("@ContactTitle", sender.ContactTitle)
    cn.Open()
    cmd.ExecuteNonQuery()
    cmd.CommandText = "Select @@Identity"
    Identfier = CInt(cmd.ExecuteScalar)
    End Using
    End Using
    Catch ex As Exception
    Success = False
    End Try
    Return Success
    End Function
    In closing I have not given you a solution but hopefully given you some stuff/logic to assist with this issue, if not perhaps I missed what you want conceptually speaking.
    Additional resources
    http://msdn.microsoft.com/en-us/library/fxsa23t6.aspx
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • Adding row to Data Grid

    Hi,
    I would like to add rows(more than one) dynamically to my data grid in list tile.
    Pls let me know if any work have work on this.
    Thanks in advance.
    Harish

    Hi,
    depending from the scenario you better add these new business objects to the business collection which is the underlying BCOL of the grid anchor.
    Do you want to have this working for bound objects (like BOCAPGEN) or unbound objects (e.g. fields to calculate/display a sum within the grid)?
    Regards,
    Wolfhard

  • Issues with Data Grid Combo Boxes

    Hi,
    I am trying to implement, 3 combo boxes for each row in extended data grid but unable to find the solution. Can someone please help?
    Problem in detail:
    The issue is after populating the data grid i want to give users 3 options  using 3 combo boxes(i.e each row in data grid will now have 3 options , which is basically converting 1 row into 3 rows with 3 options),so that they are able to do their computations.
    This is reallly urgent, any help would be highly appreciated.
    Thanks & Regards
    Pankaj

    "In this new release of SQL Dev, when I execute a SQL in the SQL Worksheet and click in the Data Grid in the Results tab and try to navigate within a record using arrow keys, the grid cell enters into edit mode by default and so I cannot use the Left or Right arrow keys to navigate the grid. I am forced to use tab key to navigate. This is counter intuitive in my opinion."
    In the "Results" tab, Click Ctrl & Tab keys (at the same time) or with mouse click on any cell other than the first column (a sequence or rownum), you will be able to navigate using the arrow keys.
    "Another issue that I have come across is with SQL syntax checking. In some cases, when I press F9 to execute a SQL, it shows the SQL as executed i.e. shows something like 0.0134 seconds in the toolbar and no results displayed. In reality, the SQL had some syntax error which were NOT reported. This can be frustrating since now I have to fall back to SQL*Plus or TOAD just for syntax check."
    The 0.0134 seconds could be the result of the most recently executed successful statement. Check the Script Output tab for errors. Use F5 (Run Script option) instead of F9.
    "I like the fact that SQLDev highlights the current SQL but it would be more useful if it just indicated the first line of the current sql instead of highlighting the whole sql."
    On the SQL statement (or code), Right Click -> Format SQL (or press Ctrl & B), proper formatting would help.
    I use version 1.0.0.15.57 and seems to be working allright.
    - Babu Rangasamy

  • Update one row at a time, Data Grid

    Is it possible to update one row of a mx:DataGrid at a time.  I want to be able to have a user push a button and info populates one row of the data grid, user changes some properties and pushes the button again and another row of values populate the DataGrid.  Everything I see does a mass population from an XML or what have you.
    Thanks

    I did this this to work, so for those of you who may find this info helpfull here is how I solved the issue.
    I instantiated an ArrayCollection object like so:
    private var _rowValues:ArrayCollection = new ArrayCollection();
    I simply referenced the .addItem() property of my ArrayCollection.
    I then added values to the ArrayCollection as follows
    _rowValues.addItem({Ingredient:ingredient, Amount:amount, Category:category}); //dataField:value
    and referenced the dataField proerpty of the DataGrid... so in my case my 3 dataField properties (in my mxml compontent) were as fillows:
    dataField="Ingredient"
    dataField="Amount"
    dataField="Category"
    all done, and it works.

  • How to avoid blinking / moving of rows in a data grid when you restore the scroll positions

    By Default when an update is made on a data grid, it scrolls to top row. To avoid this when we save the vertical and horizontal scroll
    positions and restore the scroll positions after the update, it causes a blink in the grid (or moving / jumping) of rows. Is there a way to
    avoid this jumping of rows?
    In JavaScript this can be achieved by overriding the scrollToTop / OnLoad methods of datagrid to directly scroll to current scroll
    positions instead of top row. Is there a way to achieve similar feature in flex / actionscript?

    I am calling validateNow().. Also, using verticalScrollPosition to restore the scroller as in the link that you posted.. Reposition is working fine, But the bug filed is regarding BLINKING / JUMPING when this happens (i.e. this blinking is caused because after datagrid edit, during reload the scroller tries to move to  the top by default, then it repositions itself to current edited row as the verticalScrollPosition property is overridden ).. I have to get rid of this blinking.
    In Javascript it is dealt by overriding OnLoad method of datagrid to directly scroll to current scroll position instead of top row during reload so that there is no blinking.
    http://www.sencha.com/forum/showthread.php?13898-Is-there-any-way-to-keep-scroll-position- of-Grid-on-load
    Is there a way to achieve similar feature in flex?
    I am not sure what flex datagrid method to override.. Theres no method like load? What is the datagrid method that is called by default during reload (after datagrid edit) that causes the scroller to go to top?

  • Adding a dynamic summary row for a spark data grid

    i'm looking for a solution for a spark data grid.
    by clicking on a row it will become larger and will show under the original row a some kind of a summary text with no realtion to columns.
    is there a summary row option for a spark datagrid that can shown by clicking on the row?

    Why would you need to make this part of the DataGrid? Just create some kind of view and bind it's data to the selectedItem of the DataGrid.
    *edit*
    Ohhhh, I see that you want it to display under the item. I believe you can do what you need in the skin, but I haven't had a chance to use the spark DataGrid yet so I can't say for sure. I know it has a feature to skin the selection, so I'm sure you can use that to do what you need.

  • How to click on linkbuttons in the rows of a data grid

    I'm trying to write automation test cases for a flex application using Flex Selenium.
    The flex selenium API provides only 2 click events: click(String objectId) and click(String objectId, String optionalButtonLabel)
    There are no click events for rows or columns for a data grid.
    The application has a  DataGrid with 2 linkbuttons in a column for each row (besides other columns).
    The linkbuttons have an id. But clicking it only clicks the one in the first row.
    Now, I have to perform these tasks:
    - Click on the link buttons in any row
    -  Click on any row
    -  Click on column  header to sort
    How can I accomplish these?

    Hi Suman,
    thanks for your prompt reply.
    I am trying it but it doesn't work. I started to run the query for a while but it is still running and there is no result for it. I still see the variable popup I filled after the first running of the query.
    Any other idea?
    Kind regards,
    Ali

  • Rows and column limit on Data Grids

    Hello,
    anyone know if there's a limit for the number of rows and columns per page in the Data Grids?
    Thanks in advance

    There is not a limit. There is a default of 1024 rows, but you can change this.
    -- Chris

  • Using drag/drop to build data grid rows from multiple lists ?

    Hi,
    I have implemented some simple drag and drop between grids and lists, including images.
    What I need to do now is quite a bit more complex:
    Create rows in a data grid by dragging and dropping from multiple lists. That is, for a given
    row, column 1 receives data from list A and rows in column 2 - 5 receive data from List B
    I haven't found any examples that do this and my initial hacks haven't been successful.
    If you have any suggestions, they would be most appreciated !!!
    Thanks !  

    This does the trick...
    For my destination grid
    protected function dg_dragDropHandler(e:DragEvent):void
    // Dynamically add columns to the grid by dragging them from the new column list
                    if (e.dragInitiator["id"] == "lNewColumn")
                        e.preventDefault();    // handle this manually
                        var Id:Number;
                        var Name:String;
                        var numCols:int = e.dragInitiator["selectedItems"]["length"] as int;
                        for (var i:int=0; i < numCols; i++)
                            Id = e.dragInitiator["selectedItems"][i]["id"];
                            Name = e.dragInitiator["selectedItems"][i]["Name"];
                            addGridColumn(Id, Name);
    private function addGridColumn( Id:Number, Name:String ):void
                    var dgc:DataGridColumn;
                    var cols:Array = dg.columns;
                // not a duplicate column
                        dgc = new DataGridColumn(Name);
                        dgc.width=150;   
                        dgc.headerWordWrap = true;
                        dgc.itemRenderer=new ClassFactory(MyLovelyItemRenderer);    // unlike mxml, must explicitly cast
                        dgc.width=156;
                        dgc.headerText = Name + "\n Message";
                        dgc.dataField="messageId_" + Id.toString();    // allows split on '_' later to get Id
                        dgc.setStyle("textAlign","center");
                        cols.push(dgc);
                        dg.columns = cols;

  • Data Grid - Row background colour

    Hi All,
    I want to change the background if each row of a data grid
    object individually. what can I do?
    thx

    Hello Sasi,
    I have never touched an Oracle Application before, but in Report builder, i don't think there is a way to change the background color of the Data Model query to anything other than the standard blue.
    -Marilyn

  • How to add a checkbox coulmn to my Data Grid row?

    Dear All ,
    I have a Data Grid which have lets says 6 columns. I want to add anew column which allow the user to select it or not. Meaning if the user select the box a hack will be shown.
    I want to you this coz I have a function which send an email to the user if the line (Invoice line) if selected. Now if there is more than one invoice (Line) I want the user to first select the checkbok and send press the send function button.
    Later on I will create a loop in the Send function which will only send mails if the line check box is checked.
    Would you please help me :)
    Ps: I am using ligth switch 2008   (C#)
    Thanks,
    Zayed

    Hello Zayed
    I would recommend that you read through this brilliant article by
    Paul van Bladel here or even look at a post on
    this forum by Sven Elm. I have looked at and followed these in the past and it works perfectly.
    If you found this post helpful, please mark it as helpful. If by some chance I answered the question, please mark the question as answered. That way you will help more people like me :)

  • Really Urgent: List with Data Grid  rowcount issue i added the full code below

    Thanks in advance
    Exactly wat i need is
    1.if i click the open button want to visible all datagrid ,its working perfectly.
    2.if i click the close button want to close all data grid ,its working perfectly.
    3. if i click a particular  list means want to visible particular datagrid..some times working good but some times not visible ...
    4.if i click the list if datagrid already open means want to close .some times creates extra space below the datagrid........
    if u cont get clearly please copy the below code and check it.....i think there is row count not working properly...any other way to solve this problem?.......
    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" >
    <fx:Declarations>
    </fx:Declarations>
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    [Bindable]
    public var ArrUserList:ArrayCollection;
    [Bindable]
    public var listDB:ArrayCollection = new ArrayCollection([ {label: "2011", data:"jan",day:"saturday",date:"1-4-11"},
    {label: "2011", data:"jan",day:"monday",date:"13-4-11"}, {label: "2013", data:"jan",day:"monday",date:"1-5-11"}, {label: "2013", data:"jan",day:"wednesday",date:"14-5-11"}, {label: "2015", data:"jan",day:"tuesday",date:"11-5-11"}, {label: "2015" ,data:"jan",day:"friday",date:"1-6-11"} ]);
    public var loc_first_last_name:String;
    function Load():void
    ArrUserList=Find_Duplicate(listDB);
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=0;
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount=ArrUserList.length;
    function Clink_lnk_open():void
    if(lnk_open.label=="Open")
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=1;
    lnk_open.label="Close";
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount = ArrUserList.length ;
    else
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=0;
    lnk_open.label="Open";
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount = ArrUserList.length ;
    function Click_UserName1(event:MouseEvent,data:Object):void
    loc_first_last_name=event.currentTarget.text;
    var str:String;
    for(var i:int=0; i<ArrUserList.length; i++)
    str=ArrUserList[i].label;
    if(loc_first_last_name==str)
    if(ArrUserList[i].click == 0)
    ArrUserList[i].click=1;
    else
    ArrUserList[i].click=0;
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount=ArrUserList.length;
    public function Find_Duplicate(test_arr:ArrayCollection):ArrayCollection
    var res_arr:ArrayCollection=new ArrayCollection();
    var flag:Boolean;
    for(var i:int=0;i<test_arr.length;i++)
    var j:int=0
    flag=false;
    for(;j<res_arr.length;j++)
    if(res_arr[j].label==test_arr[i].label)
    res_arr[j].dataCollection.addItem(test_arr[i]);
    flag=true;
    break;
    if(!flag)
    var myItem:Object = new Object() ;
    myItem.label=test_arr[i].label;
    myItem.dataCollection=new ArrayCollection();
    myItem.dataCollection.addItem(test_arr[i]);
    res_arr.addItem(myItem) ;
    return res_arr;
    ]]>
    </fx:Script>
    <s:Scroller id="id_scroller" width="100%" height="100%">
    <s:VGroup id="id_Vgroup" paddingLeft="50" paddingTop="10" paddingBottom="10"   width="100%" height="100%" >
    <mx:VBox width="850" paddingLeft="0" paddingTop="1"    color="black"  backgroundColor="#FFFFFF">
    <mx:HBox width="850" left="50" paddingBottom="3"  paddingLeft="5" backgroundColor="#6D6C6C"   paddingTop="3" color="#FFFFFF" >
    <mx:LinkButton id="lnk_open" label="Open" textDecoration="underline" click="Clink_lnk_open();"/>
    <mx:Button id="load_btn" label="Load" click="Load()"/>
    </mx:HBox>
    <mx:VBox id="Vbox_main" width="850"   horizontalScrollPolicy="off" verticalScrollPolicy="off"  >
    <mx:List variableRowHeight="true"   width="850" id="Lst_userlist" paddingTop="-3" verticalScrollPolicy="off"  horizontalScrollPolicy="off"
    buttonMode="true"  >
    <mx:itemRenderer>
    <fx:Component>
    <mx:VBox paddingTop="-5"  horizontalScrollPolicy="off" verticalScrollPolicy="off" >
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    override public function set data(value:Object):void
    super.data = value;
    Membership_Grid.dataProvider=data.dataCollection;
    Membership_Grid.rowCount=data.dataCollection.length;
    lbl_userhead.text=data.label;
    lbl_userhead1.text=data.dataCollection.length+" Datas";
    if(data.click==1)
    Vbox_main.visible=true;
    Vbox_main.includeInLayout=true;
    else
    Vbox_main.visible=false;
    Vbox_main.includeInLayout=false;
    Membership_Grid.validateNow() ;
    ]]>
    </fx:Script>
    <mx:HBox id="vbox_grid"  horizontalScrollPolicy="off"  height="25" verticalScrollPolicy="off" width="850"  paddingLeft="10" paddingTop="5"  backgroundColor="#6D6C6C" color="#FFFFFF">
    <s:Label id="lbl_userhead" click="outerDocument.Click_UserName1(event,data)" buttonMode="true"   width="250"  paddingTop="3" />
    <s:Label id="lbl_userhead1"  buttonMode="true"   width="548" paddingTop="3" />
    </mx:HBox>
    <mx:VBox id="Vbox_main" width="850" horizontalScrollPolicy="off" verticalScrollPolicy="off"  visible="false" includeInLayout="false" >
    <mx:DataGrid id="Membership_Grid"   alternatingItemColors="[#DCDCDC,#F8F8FF]"  paddingLeft="5"  horizontalScrollPolicy="off" color="black"
    horizontalGridLines="false" verticalScrollPolicy="auto"  verticalGridLines="false"  rowHeight="25" width="850"  borderSkin="{null}"
    borderVisible="false" >
    <mx:columns>
    <mx:DataGridColumn width="150" headerText="Year" dataField="label"/>
    <mx:DataGridColumn width="150" headerText="Month" dataField="data"/>
    <mx:DataGridColumn width="150" headerText="Day" dataField="day" />
    <mx:DataGridColumn width="150" headerText="Date"  dataField="date"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:VBox>
    </mx:VBox>
    </fx:Component>
    </mx:itemRenderer>
    </mx:List>
    </mx:VBox>
    </mx:VBox>
    </s:VGroup>
    </s:Scroller>
    </s:Group>

    Hi,
    You already wrote the same exact post 4 times! Don't you think it's enough?
    May 12 : http://forums.adobe.com/message/3672269#3672269
    May 20 : http://forums.adobe.com/message/3690500#3690500
    May 23 : http://forums.adobe.com/message/3696874#3696874
    May 25 : http://forums.adobe.com/message/3701649#3701649
    If you want someone help you, from my point of view it surely not the right way of doing, especially by writing Really Urgent. It just annoys people (and btw it seems not to be so urgent as you stay with it since the May12). If you want a "urgent" answer, hire a Flex expert or just be patient.
    Kind regards,
    Mich

  • Extra row in Ready input query.

    Hi gurus,
    I have developed a  Ready input query and its working fine but in the report i mean after the over all Result row at the end there should be extra row get added by default for entering the data iam not getting the extra row for entering the Data. How to bring that extra row please suggest accordingly
    Regards

    In analyzer, check that Analysis Grid property 'Suppress New Lines' is unchecked.
    Also, check this link http://help.sap.com/SAPHELP_NW70/helpdata/EN/43/f234619e3c4c5de10000000a155369/frameset.htm
    It explains the prerequisites for new input-ready rows for BEx Analzer as well as WAD.

Maybe you are looking for

  • I bought the app Dark Knight Rises and I can not download

    I bought the app Dark Knight Rises and I can not download, always gives error in the middle. Can someone help me

  • Mouse Issues and Everyone Blaiming Themselves!

    I've been having problems with my mouse.  It simply stops moving completely for anywhere from a few seconds up to a minute.  I've been tracing the problem and came to one of three conclusions, it's either Video Related, USB Related, or Mouse Related.

  • Flicker on monitor

    Hello,   As soon as I hook up the coaxial cable for the cable TV on my TV@nywhere my monitor starts to flicker. It doesn't matter if I'm watching TV or not. I have two computers and it happens on both of them. I ran a different cable from a different

  • Video after In and Out points Changed

    After opening up a video in the Viewer and setting In and Out points, and dragging it back to the Browser afterwards: 1. I tried changing the name of the clip that I dragged back to the Browser, though it changed the names of the other clips in the B

  • Java Change After WebLogic Installation

    Hello, I've installed WebLogic 10.3.6 with FMW 11.1.1.6 running on OEL 6.3. I'm running Java 1.7.0_5. I'm trying to deploy a vendor's web application. The deployment is fine. However, when I try to run the web application, I get various java errors.