Re:Adding a row in a matrix using Lost_Focus event & deleting a row

Dear All,
Iam facing a problem in adding a row in a matrix using last focus event.its like if i keep the cusor in the last coloumn in a matrix n if i press tab it should add a row .the row is getting added the problem here is the cursor is gng to first row but it should come to the second row.
the second problem is while deleting a row the row is getting deleted but the row count is showing the deleted row no.
pls suggest a solution for these problems.
Thanks & Regards
Anand

Hi,
If pVal.BeforeAction = False Then
            Select Case pVal.EventType
                Case SAPbouiCOM.BoEventTypes.et_KEY_DOWN
                    If pVal.ItemUID = "matlab" And pVal.ColUID = "mtimeout" And pVal.CharPressed = 9 Then
                        oMatrix = oForm.Items.Item("matlab").Specific
                        Dim rc As Integer = oMatrix.VisualRowCount
                        If rc = pVal.Row Then
                            addrow()    'funtion for adding row
                            oMatrix.Columns.Item("labc").Cells.Item(oMatrix.RowCount).Click()
                            'SBO_Application.MessageBox(oMatrix.RowCount)
                        End If
                    End If
This is the function i hav used
Private Sub addrow()
        Try
            If (oForm.UniqueID = "updt") Then
                oForm = SBO_Application.Forms.ActiveForm
                oForm = SBO_Application.Forms.Item("updt")
                omatrix = oForm.Items.Item("matlab").Specific
                omatrix.AddRow(1, omatrix.VisualRowCount)
                Dim rc As Integer = omatrix.VisualRowCount
                'SBO_Application.MessageBox(rc)
                otext1 = omatrix.Columns.Item("mdatein").Cells.Item(rc).Specific
                otext1.String = "s" 'RecSet.Fields.Item("date1").Value
                otext1 = omatrix.Columns.Item("mdateout").Cells.Item(rc).Specific
                otext1.String = "s" 'RecSet.Fields.Item("date1").Value
                End If
        Catch ex As Exception
            SBO_Application.MessageBox(ex.Message)
        End Try
    End Sub
this is the code which m using
Regards,
Anand

Similar Messages

  • Use Preparedstatement to delete several rows from database

    Hello everyone,
    I am trying to delete multiple rows from database at one time using Preparedstatement.
    It works well when I tried in SQL directly,the sql query is as follows:
    delete from planners_offices where planner ='somename' and office in ( 'officeone', 'officetwo', 'officethree')
    I want to delete those 3 rows at one time.
    But when I am using preparedstatement to implement this function, it does not work. It did not throw any exception, but just does not work for me, the updated rows value always returns "0".
    Here is my simplified code:
    PreparedStatement ps = null;
    sqlStr = " delete from PLANNERS_OFFICES where planner = ? and office in (?) "
    Connection con = this.getConnection(dbname);
    try
    //set the sql statement into the preparedstatement
    ps = con.prepareStatement(sqlStr);
    ps.setString(1,"somename");
    ps.setString(2,"'officeone','officetwo','officethree'");
    int rowsUpdated =ps.executeUpdate();
    System.out.println(rowsUpdated);
    //catch exception
    catch (SQLException e)
    System.out.println("SQL Error: " + sqlStr);
    e.printStackTrace();
    catch (Exception e) {
    e.printStackTrace();
    } finally {
    this.releaseConnection(dbname, con);
    try{
    ps.close();
    }catch (SQLException e){
    e.printStackTrace();
    rowsUpdated always give me "0".
    I tried only delete one record at one time, "ps.setString(2, "officeone");", it works fine.
    I am guessing the second value I want to bind to the preparedstatement is not right, I tried several formats of that string, it does not work either.
    Can anyone give me a clue?
    Thanks in advance !
    Rachel

    the setString function in a preparedStatement doesn't just do a replace with the question mark. It is doing some internal mumbojumbo(technical term) to assign your variable to the ?.
    If you are looking to do your statement, then you will need to put in the correct of # of question marks as you need for the in clause.
    delete from PLANNERS_OFFICES WHERE PLANNER = ? and office in (?,?,?)
    If you need to allow for one or more parameters in your in clause, then you will need to build your SQL dynamically before creating your prepared statement.
    ArrayList listOfOfficesToDelete ;
    StringBuffer buffer = new StringBuffer("DELETE FROM PLANNERS_OFFICES WHERE PLANNER = ? AND OFFICE IN (");
    for(int i = 0; i < listOfOfficesToDelete.size(); i++ )
       if( i != 0 )
           buffer.append(",");
       buffer.append("?");
    buffer.append(")");
    cursor = conn.prepareStatement( buffer.toString() );
    cursor.setString(1, plannerObj);
    for(int i = 0; i < listOfOfficesToDelete().size(); i++ )
        cursor.setString(i+1, listOfOfficesToDelete.get(i) );
    cursor.executeUpdate() ;

  • Using Powershell to Delete Excel Rows

    Hi everyone.  Again, I am having trouble working with Excel via Powershell.  I am slowly learning my way around but cannot correctly utilize any information I may find that helps me get the correct results.  So far I am working on a project
    at work that is automating the testing of our build process.  I am "borrowing" an excel sheet that I will save to my local machine to save as CSV.  However, before saving to CSV I need to remove the empty rows.  Unfortunately, the cells are
    not really blank but still contain links to the server I pulled the workbook from.
    I'm not sure what is easiest to do, but the "blanks" are within this range: A49:F320  and this is the range I'd like to delete.  The code I am currently working with is:
    $Excel = new-object -comobject excel.application
    $Excel.Visible = $False
    $Workbook = $Excel.Workbooks.Open($BuildXLS)
    $Worksheet = $Workbook.Worksheets.Item(1)
    $i = 1
        If ($Worksheet.Cells.Item($i, 1).Value() -eq "  ") {
            $Range = $Worksheet.Cells.Item($i, 1).EntireRow
            $a = $Range.Delete()
            $i -= 1
        $i += 1
     Incidentally, mjolinor helped with an earlier issue parsing through the CSV.  It was only after looking at the output that I discovered my real issue is working with the Excel.
    $data = import-csv $csv | Where-Object {$_.juris -ne " "}
    #format Juris-Version results
    foreach ($line in $data)
      if ($line.juris -eq 'US'){$line.Version = $FedVerNum}
       else {$line.Version = $ContentVer}
           write-output $line.juris$line.version | Out-File -Append "C:\1_JurisVersion.txt"
    The output from that help session looks like:
    US
    $FedVerNum
    State
    $ContentVer
    State
    $ContentVer
    Is there a away I can get this to read as
    US $FedVerNum
    state $ContentVer
    state $ContentVer
    state $ContentVer
    Many thanks for the help and expertise!

    The Excel constants are "magic" numbers that can be found in Excel via the Object Browser in the Visual Basic Editor.
    There are several that I use all the time, so I made a list of the ones I use most often:
    Const ForReading = 1
    Const xlAscending = 1
    Const xlGuess = 0
    Const xlTopToBottom = 1
    Const xlSortNormal = 0
    Const xlCount = -4112
    Const xlArea = 1
    Const xlBar = 2
    Const xlColumn = 3
    Const xlLine = 4
    Const xlPie = 5
    Const xlRadar = -4151
    Const xlXYScatter = -4169
    Const xlCombination = -4111
    Const xl3DArea = -4098
    Const xl3DBar = -4099
    Const xl3DColumn = -4100
    Const xl3DLine = -4101
    Const xl3DPie = -4102
    Const xl3DSurface = -4103
    Const xlDoughnut = -4120
    Const xlPasteValuesAndNumberFormats = 12
    Const xlpasteFormats = -4122
    Const xlpasteValues = -4163
    Const xlValues = &HFFFFEFBD ' -4163
    Const xlNone   = &HFFFFEFD2 ' -4142
    Const xlSelect = 3
    Const xlCellTypeLastCell = 11 
    Or you can "Include" them like this:
    [reflection.assembly]::loadWithPartialname("Microsoft.Office.Interop.Excel") |
    Out-Null
    $xlConstants = "microsoft.office.interop.excel.Constants" -as [type]
    $ws.columns.item("F").HorizontalAlignment = $xlConstants::xlCenter
    $ws.columns.item("K").HorizontalAlignment = $xlConstants::xlCenter
     If you know what constants you need.
    You can read about this here:
    http://technet.microsoft.com/en-us/magazine/2009.01.heyscriptingguy.aspx

  • Updating a row of a table using rowid

    Hi folks,
    I am trying to update some rows in a table using rowid of the corresponding rows.Sometimes this updates wrong rows. This is because ORACLE by itself makes some statistics on the particular table using "Analyze table..." statement and it changes the order of the rowids. But if I delete the statistics,the updation works fine. Is there any way to update the correct rows and also to keep the statistics created by ORACLE? P.s: I am using ORACLE thin Driver to connect to Oracle 8.1.6
    Thanks,
    Karthi.

    First make it clear: analyze table command never changes ROWIDs. Actually, the ROWID of a row never changes untill it's deleted from its table. So make sure if you are using the correct ROWID.
    Thnx

  • Deleting A Row From Datagrid

    Hai
        I have pasted the mxml below, because i am unable to attach the mxml, pl copy this below file into flex and run the application.
      1. Run the application.
      2. Enter values in the textbox and click add, values will be added to the datagrid.
      3. now click AND or OR and then change the values in the second and thrid combobox and again click add.
      4.Like wise change the combobox values and add five rows to the datagrid.
    5.now if u delete the last row u can see the curent last row in the combobox, so that the AND or Or can be added to it
    6. now if u delete a row in between, the deleted row's value oly maintains in the combobox,so i am unable to add AND or Or to the grid
      7.I need the last row data in the datagrid to be in the second and third combobox, which ever row is deleted.
    Can anyone help me....
    Thanks in advance.
    This is the mxml for sample
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
      <mx:Script>
    <![CDATA[
      // ActionScript file
    import mx.rpc.events.FaultEvent;
    import mx.controls.Alert;
            import mx.managers.CursorManager;
    import mx.collections.ArrayCollection;
    [Bindable]
    public var adhoc:ArrayCollection = new ArrayCollection();
    [Bindable]
    public var serverString = "" ; 
          private function initImage(event:MouseEvent):void {
                  if(adhoc.length > 0){
                CursorManager.setBusyCursor();
              private function onChange():void{
          if(comboBox.selectedIndex == 0){
        }else{
              private function onChange1():void{
              if(combo2.selectedItem == "DATEDEPLOYED" || combo2.selectedItem == "DATEUPLOADED"){
                datepick.visible = true
                txt.visible = false
              }else{
              txt.visible = true
                datepick.visible = false
        private function add():void{
        var str:String = txt.text;
        if(str.length == 0 && txt.visible == true){
            Alert.show("Value Can Not Be Empty");
            return;
          if(combo2.selectedItem != "DATEDEPLOYED" || combo2.selectedItem != "DATEUPLOADED"){
              if(txt.visible == true){
                  var temp:Object = new Object();
        temp.fname = combo2.selectedItem;
        temp.opera = combo1.selectedItem;
        temp.val = "'"+txt.text+"'";
            adhoc.addItem(temp);
              txt.text = "";
          var str1:String = datepick.text;
          if(comboBox.selectedIndex == 1){
            if(combo2.selectedItem == "DATEDEPLOYED" || combo2.selectedItem == "DATEUPLOADED"){
            if(str1.length == 0 && datepick.visible == true){
            Alert.show("Date Cannot Be Empty");
            }else{
            var temp:Object = new Object();
        temp.fname = combo2.selectedItem;
        temp.opera = combo1.selectedItem;
        temp.val = datepick.text;
              adhoc.addItem(temp);
              datepick.text = "";                   
        addbutton.enabled = false;
        addopenbracket.enabled = false;
        combo2.enabled = false;
        combo1.enabled = false;
        private function querydelete():void{
            if (AdHoc.selectedIndex > 0) {
                if(AdHoc.selectedIndex == (adhoc.length-1)){
              adhoc[AdHoc.selectedIndex-1].cond = "";
              addopenbracket.enabled = false;
              addclosebracket.enabled = false;
              addbutton.enabled = false;
              combo2.enabled = false;
              combo1.enabled = false;
              combo2.selectedItem = adhoc[adhoc.length-2].fname
              combo1.selectedItem = adhoc[adhoc.length-2].opera
                adhoc.removeItemAt(AdHoc.selectedIndex);
          //  adhocdetailgridcompilance.dataProvider = null ;
        //    adhocdetailgrid.dataProvider = null ;
            }else if (adhoc.length == 1) {
                adhoc.removeItemAt(AdHoc.selectedIndex);
          //  adhocdetailgridcompilance.dataProvider = null ;
        //    adhocdetailgrid.dataProvider = null ;
                addopenbracket.enabled = true;
              addclosebracket.enabled = true;
              addbutton.enabled = true;
              combo2.enabled = true;
              combo1.enabled = true;
            }else{
                Alert.show("Select The Rows To Delete");
          private function andSubmit():void{
            for each(var obj:Object in adhoc){
                if(obj.fname == combo2.selectedItem && obj.opera == combo1.selectedItem){
                  if(combo2.selectedItem != "DATEDEPLOYED" || combo2.selectedItem != "DATEUPLOADED"){
                if(txt.visible == true){
                  trace("2 equals");
                  var temp:Object = new Object();
                  obj.cond = and.label
                  adhoc.setItemAt(obj,adhoc.getItemIndex(obj));
                }else{
                  trace(obj.fname + ":" + combo2.selectedItem);
                  trace(obj.opera + ":" + combo1.selectedItem);
                  trace(obj.val + ":" + "'"+txt.text+"'");             
              }else if(obj.fname == addclosebracket.label){
                if(combo2.selectedItem != "DATEDEPLOYED" || combo2.selectedItem != "DATEUPLOADED"){
                if(txt.visible == true){
                  trace("2 equals");
                  var temp:Object = new Object();
                  obj.cond = and.label
                  adhoc.setItemAt(obj,adhoc.getItemIndex(obj));
                }else{
                  trace(obj.fname + ":" + combo2.selectedItem);
                  trace(obj.opera + ":" + combo1.selectedItem);
                  trace(obj.val + ":" + "'"+txt.text+"'");             
              if(obj.fname == combo2.selectedItem && obj.opera == combo1.selectedItem){
                if(combo2.selectedItem == "DATEDEPLOYED" || combo2.selectedItem == "DATEUPLOADED"){
            if(datepick.visible == true){
                  trace("2 equals");
                  var temp:Object = new Object();
                  obj.cond = and.label
                  adhoc.setItemAt(obj,adhoc.getItemIndex(obj));
                }else{
                  trace(obj.fname + ":" + combo2.selectedItem);
                  trace(obj.opera + ":" + combo1.selectedItem);
                  trace(obj.val + ":" + datepick.text);             
                }else if(obj.fname == addclosebracket.label){
                if(combo2.selectedItem == "DATEDEPLOYED" || combo2.selectedItem == "DATEUPLOADED"){
                if(txt.visible == true){
                  trace("2 equals");
                  var temp:Object = new Object();
                  obj.cond = and.label
                  adhoc.setItemAt(obj,adhoc.getItemIndex(obj));
                }else{
                  trace(obj.fname + ":" + combo2.selectedItem);
                  trace(obj.opera + ":" + combo1.selectedItem);
                  trace(obj.val + ":" + datepick.text);             
          addbutton.enabled = true;
          addopenbracket.enabled = true;
          combo2.enabled = true;
          combo1.enabled = true;
        private function orSubmit():void{
          for each(var obj:Object in adhoc){
                if(obj.fname == combo2.selectedItem && obj.opera == combo1.selectedItem){
                  if(combo2.selectedItem != "DATEDEPLOYED" || combo2.selectedItem != "DATEUPLOADED"){
                if(txt.visible == true){
                  trace("2 equals");
                  var temp:Object = new Object();
                  obj.cond = or.label
                  adhoc.setItemAt(obj,adhoc.getItemIndex(obj));
              }else{
                  trace(obj.fname + ":" + combo2.selectedItem);
                  trace(obj.opera + ":" + combo1.selectedItem);
                  trace(obj.val + ":" + "'"+txt.text+"'");             
              }else if(obj.fname == addclosebracket.label){
                if(combo2.selectedItem != "DATEDEPLOYED" || combo2.selectedItem != "DATEUPLOADED"){
                if(txt.visible == true){
                  trace("2 equals");
                  var temp:Object = new Object();
                  obj.cond = or.label
                  adhoc.setItemAt(obj,adhoc.getItemIndex(obj));
                }else{
                  trace(obj.fname + ":" + combo2.selectedItem);
                  trace(obj.opera + ":" + combo1.selectedItem);
                  trace(obj.val + ":" + "'"+txt.text+"'");             
              if(obj.fname == combo2.selectedItem && obj.opera == combo1.selectedItem){
                if(combo2.selectedItem == "DATEDEPLOYED" || combo2.selectedItem == "DATEUPLOADED"){
            if(datepick.visible == true){
                  trace("2 equals");
                  var temp:Object = new Object();
                  obj.cond = or.label
                  adhoc.setItemAt(obj,adhoc.getItemIndex(obj));
          }else{
                  trace(obj.fname + ":" + combo2.selectedItem);
                  trace(obj.opera + ":" + combo1.selectedItem);
                  trace(obj.val + ":" + datepick.text);             
                }else if(obj.fname == addclosebracket.label){
                if(combo2.selectedItem == "DATEDEPLOYED" || combo2.selectedItem == "DATEUPLOADED"){
                if(txt.visible == true){
                  trace("2 equals");
                  var temp:Object = new Object();
                  obj.cond = or.label
                  adhoc.setItemAt(obj,adhoc.getItemIndex(obj));
                }else{
                  trace(obj.fname + ":" + combo2.selectedItem);
                  trace(obj.opera + ":" + combo1.selectedItem);
                  trace(obj.val + ":" + datepick.text);             
          addbutton.enabled = true;
          addopenbracket.enabled = true;
          combo2.enabled = true;
          combo1.enabled = true;
          public function addOpenBracket():void{
                var temp:Object = new Object();
              temp.fname = addopenbracket.label
          adhoc.addItem(temp);
          addopenbracket.enabled = false
          addclosebracket.enabled = true
                if(adhoc.length > 1 && addopenbracket.enabled == false){
                    addbutton.enabled = true
        public function addCloseBracket():void{
              var temp:Object = new Object();
              if(adhoc.length > 1){
            temp.fname = addclosebracket.label
            adhoc.addItem(temp);
            addopenbracket.enabled = true
            addclosebracket.enabled = false
          if(adhoc.length > 1 && addclosebracket.enabled == false){
                    addbutton.enabled = true
        private function dateChange(date:Date):void{
            if (date == null){
              }else{
                    txt.text = date.getDate() + '/' + (date.getMonth()+1).toString() + '/' +
                              date.getFullYear().toString() ;
        public function saveadhoc(event:Event):void {
                var AdhocRows:String = "";
        var i:int ;
              var selectedType = comboBox.selectedItem;
              if(adhoc.length == 0){
              Alert.show("Enter The Query");
              }else{
        for(i = 0; i < adhoc.length;i++) {
          if(adhoc[i].fname != null){
          AdhocRows = AdhocRows +adhoc[i].fname+" ";
          if(adhoc[i].opera != null){
          AdhocRows = AdhocRows + adhoc[i].opera+" ";
          if(adhoc[i].val != null){
          AdhocRows = AdhocRows + adhoc[i].val+" ";
          if(adhoc[i].cond != null){
          AdhocRows = AdhocRows + adhoc[i].cond+" ";
            var parameters:Object = {adhocquery:AdhocRows,FlexActionType:"ADHOCQUERYSUBMIT",adhocType:selectedType};
              //  adhocClick.send(parameters);
            private function retrieve():void{         
                datepick.visible = false
              txt.visible = true
    ]]>
    </mx:Script>
            <mx:Array id="comp">
                <mx:String>TYPE</mx:String>
            <mx:String>AUDITRESULT</mx:String>
            <mx:String>CATEGORY</mx:String>
            <mx:String>CHILDRULE</mx:String>
            <mx:String>PARENTRULE</mx:String>
            <mx:String>AUDITGROUP</mx:String>
            <mx:String>LOCATION</mx:String>
            <mx:String>VENDOR</mx:String>
            <mx:String>DEVICECATEGORY</mx:String>
        </mx:Array>
        <mx:Array id="inven">
      <mx:String>VENDOR</mx:String>
      <mx:String>DEVICETYPE</mx:String>
      <mx:String>SERIES</mx:String>
      <mx:String>MODEL</mx:String>
      <mx:String>SUP/CPU</mx:String>
      <mx:String>CODEVERSION</mx:String>
      <mx:String>IMAGENAME</mx:String>
      <mx:String>DATEDEPLOYED</mx:String>
      <mx:String>LOCATIONNAME</mx:String>
      <mx:String>ADDRESS1</mx:String>
      <mx:String>ADDRESS2</mx:String>
      <mx:String>CITY</mx:String>
      <mx:String>STATE</mx:String>
      <mx:String>COUNTRY</mx:String>
      <mx:String>FLOOR</mx:String>   
      <mx:String>CABINET</mx:String>
      <mx:String>CATEGORYNAME</mx:String>
      <mx:String>DEPARTMENT</mx:String>
      <mx:String>CONTACTNAME</mx:String>
      <mx:String>CONTACTNUMBER</mx:String>
      <mx:String>VERSION</mx:String>
      <mx:String>FILENAME</mx:String>
      <mx:String>DATEUPLOADED</mx:String>
    </mx:Array>
    <mx:Accordion x="13" y="55" width="230" height="492">
    <mx:Form label="AdHoc Query Analyzer"  width="100%"  creationComplete="retrieve()" height="100%" color="#F2F8F9" backgroundColor="#020202">
      <mx:Canvas label="Query" width="204" height="440" backgroundColor="#020202">
      <mx:ComboBox x="66" y="287" width="134"  id="comboBox" dataProvider="[COMPLIANCE , INVENTORY]" change="onChange()" color="#050505">
      </mx:ComboBox>
      <mx:ComboBox x="5" y="344" width="109.25" id="combo1" dataProvider="[=,!=,>,>=,&lt;,&lt;=,LIKE]" color="#010101"></mx:ComboBox>
      <mx:TextInput x="119.25" y="344" width="77.75" id="txt" color="#050505"/>
        <mx:Button x="3" y="401" label="Add" width="59" click="add()" id="addbutton" color="#FFFEFE" fillAlphas="[0.6, 0.4, 0.75, 0.65]" fillColors="[#FFFFFF, #CCCCCC, #EEEEEE, #EEEEEE]" borderColor="#B7BABC" themeColor="#009DFF"/>
      <mx:Button x="66" y="401" label="Delete" width="63.25" click="querydelete()" color="#FFFEFE" fillAlphas="[0.6, 0.4, 0.75, 0.65]" fillColors="[#FFFFFF, #CCCCCC, #EEEEEE, #EEEEEE]" borderColor="#B7BABC" themeColor="#009DFF"/>
      <mx:Button x="2" y="373" label="("  id="addopenbracket" click="addOpenBracket()"  width="45" color="#FFFEFE" fillAlphas="[0.6, 0.4, 0.75, 0.65]" fillColors="[#FFFFFF, #CCCCCC, #EEEEEE, #EEEEEE]" borderColor="#B7BABC" themeColor="#009DFF"/>
      <mx:Button x="51" y="373" label=")" id="addclosebracket" click="addCloseBracket()"  width="45" color="#FFFEFE" fillAlphas="[0.6, 0.4, 0.75, 0.65]" fillColors="[#FFFFFF, #CCCCCC, #EEEEEE, #EEEEEE]" borderColor="#B7BABC" themeColor="#009DFF"/>
      <mx:Button x="134.25" y="401" label="Submit" click="saveadhoc(event);initImage(event)" color="#FFFEFE" fillAlphas="[1.0, 0.69, 0.75, 0.65]" fillColors="[#77B97A, #77B97A, #EEEEEE, #EEEEEE]" borderColor="#77B97A" themeColor="#009DFF"/>
      <mx:ComboBox x="66" y="317" width="134" id="combo2" change="onChange1()" dataProvider="{comp}" color="#010101">
      </mx:ComboBox>
      <mx:DateField x="122.25" y="344" width="74.75" initialize="dateChange((event.target).selectedDate)" id="datepick" color="#050505"/>
      <mx:DataGrid x="1" y="1" width="203" height="282" id="AdHoc" dataProvider="{adhoc}" allowMultipleSelection="true" color="#020202">
      <mx:columns>
        <mx:DataGridColumn headerText="Name" dataField="fname" id="fnam"/>
        <mx:DataGridColumn headerText="Operator" dataField="opera" id="ope"/>
        <mx:DataGridColumn headerText="Value" dataField="val" id="valu"/>
        <mx:DataGridColumn headerText="Condition" dataField="cond" id="condt"/>
      </mx:columns>
      </mx:DataGrid>
      <mx:Button x="99" y="373" label="AND" width="52" click="andSubmit()" id="and" color="#FFFEFE" fillAlphas="[0.6, 0.4, 0.75, 0.65]" fillColors="[#FFFFFF, #CCCCCC, #EEEEEE, #EEEEEE]" borderColor="#B7BABC" themeColor="#009DFF"/>
      <mx:Button x="154" y="373" label="OR" width="49" click="orSubmit()" id="or" color="#FFFEFE" fillAlphas="[0.6, 0.4, 0.75, 0.65]" fillColors="[#FFFFFF, #CCCCCC, #EEEEEE, #EEEEEE]" borderColor="#B7BABC" themeColor="#009DFF"/>
      <mx:Label x="7" y="291" text="TYPE" width="59" fontWeight="bold"/>
      <mx:Label x="5" y="319" text="DISPLAY" width="59" fontWeight="bold"/>
        </mx:Canvas>
      </mx:Form>
    </mx:Accordion>
    </mx:Application>

    Ok... but I am a little confused (sorry to be a nuisance ),
    my delete function within my webService requires an ID to be
    passed from the Flex application, thus when a row is selected, the
    ID of the selected row is taken, so when the Delete button is
    pressed it sends this ID to the webService where it is taken and
    used - and therefore deleting the row etc.....
    Do you mean to define the result handler for the deleteOPG
    operation in the main webService tag, i.e. :
    <mx:WebService id="wsData" wsdl=http://...?wsdl>
    <mx:operation name="getRes" result="handleWSR(event)"/>
    <mx:operation name="deleteOPG"
    result="handleWSR_deleteOPG(event)"/>
    </mx:WebService>
    and then call it in my delete function, passing the ID from
    my delete function to my new result handler function ??? :
    Thanks,
    Jon.

  • How to delete a row in ADF Table by pressing "Delete" Key

    I want to delete a row in my ADF table by pressing the "Delete" key..How can i achieve it?

    hai ,
    I write clientListener and ServerListener..But in the script i printed the event.getKeyCode() ...*When i press Delete Key or EnterKey ,it is not printing the value*..
    The code i write is pasted below..
    In the code backing_Comm is my backingbean..Is there any problem in the code that i had written?I want to delete a selected row from my table using keypress Event...pls advice..
    <script type="text/javascript">
    onPressDeleteKey=function(event){
    alert(event.getKeyCode()); // *Here i am not getting the alert, when i press Delete Key or Enter Key..But getting alert when i press A- Z or 1 - 0*
    if(event.getKeyCode()==AdfKeyStroke.ENTER_KEY) {
    var source = event.getSource();
    AdfCustomEvent.queue(source,performDeleteOnPress,{},false);
    </script>
    <*af:table* value="#{bindings.ComMastVO.collectionModel}"
    var="row"
    rows="#{bindings.ComMastVO.rangeSize}"
    emptyText="#{bindings.ComMastVO.viewable ? 'No rows yet.' : 'Access Denied.'}"
    fetchSize="#{bindings.CompMastVO.rangeSize}"
    rowSelection="single"
    id="tblCom"
    columnStretching="last" inlineStyle="width:100%;"
    width="273"
    selectionListener="#{backing_Comm.rowSelectCom}"
    binding="#{backing_Comm.tblCom}"
    clientComponent="true" >
    <*af:column* sortProperty="Com" sortable="true">
    <*af:inputText* value="#{row.bindings.Com.inputValue}"
    label="#{bindings.ComMastVO.hints.Com.label}"
    required="#{bindings.ComMastVO.hints.Com.mandatory}"
    columns="150"
    maximumLength="#{bindings.ComMastVO.hints.Com.precision}"
    shortDesc="#{bindings.ComMastVO.hints.Com.tooltip}">
    valueChangeListener="#{backing_Comm.onValueChange}"
    autoSubmit="true" >
    <f:validator binding="#{row.bindings.Com.validator}"/>
    *</af:inputText>*
    *<af:serverListener type="performDeleteOnPress"*
    *method="#{backing_Comm.goDeleteCurrentRow}"/>*
    </af:column>
    *<af:clientListener type="keyPress"*
    *method="onPressDeleteKey"/>*
    </af:table>
    =================================================
    anybody pls help??
    Edited by: Briston Thomas on Jun 3, 2009 2:25 AM

  • How to delete a row in the table in servlets

    I have met a problem in deleting a row in table using servlets.
    My table looks like this:
    ID Name Type
    12 Milienium S
    15 USIA O
    My code looks like this:
    String query = "SELECT * FROM tb_Funds";
    rs = statement.executeQuery(query);
    while(rs.next()) {          
    StdID=rs.getString("FundID");
    StdName=rs.getString("Name");
    StdType=rs.getString("Type");
    out.print("<td><INPUT TYPE=TEXT NAME=
    myName VALUE=" + StdID + "></td>");
    out.print("<td>" + StdName + "</td>");
    out.print("<td>" + StdType + "</td>");
    buf.append("<td>" + "<INPUT TYPE=SUBMIT
    NAME=Delete VALUE=DELETE>" + "</td></tr>");
    There is a delete button in every row. May I know how to delete the row that I want by getting the ID from the table and delete it from the database.
                                       

    Deleting from a table is simple -> delete from tb_funds where id = <value>. Obviously replace <value> with the appropriate ID or use a bind variable (a ?) and prepared statements.
    Are you asking how to pass the id associated with the table row from the browser when the button is pressed?

  • How to delete multiple rows from ADF table

    How to delete multiple rows from ADF table

    Hi,
    best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
    Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
    Frank

  • I created a repeating table but want to add a "do you really want to delete this row" prompt.

    Let me clarify, I created a repeating table which allows users in Adobe Reader to add or delete rows.  However, if user inadvertently hits delete, the row and any data is lost with no way to undo.  So, I'd like to either add a pop up prompt for user to confirm they want to execute action or create an undu option somewehre else on the form.  Can this be done?
    Message was edited by: deanotn

    Yes you can do it using app.alert().
    var nButton = app.alert({
    cMsg: "Warning: This will delete the row and all data in it. \n\nDo you want to continue?",
    cTitle: "Delete Row",
    nIcon: 1, nType: 2
    if (nButton == 4) {
              deletion code here
    Description of app.alert() options:
    http://acrobatusers.com/tutorials/popup_windows_part1

  • Deleting 1 row from a table takes too long...why?

    We are running the following query...
    delete gemdev.lu_messagecode where mess_code ='SSY'
    and it takes way too long as there is only 1 record in this table with SSY as the mess_code.
    SQL> set timing on;
    SQL> delete gemdev.lu_messagecode where mess_code ='SSY';
    1 row deleted
    Executed in 293.469 seconds
    The table structure is very simple as you can see below.
    CREATE TABLE GEMDEV.LU_MESSAGECODE
    MESS_CODE VARCHAR2(3) NOT NULL,
    ROUTE_CODE VARCHAR2(4) NULL,
    REPORT_CES_MNEMONIC VARCHAR2(3) NULL,
    CONSTRAINT SYS_IOT_TOP_52662
    PRIMARY KEY (MESS_CODE)
    VALIDATE
    ORGANIZATION INDEX
    NOCOMPRESS
    TABLESPACE IWORKS_IOT
    LOGGING
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE(BUFFER_POOL DEFAULT)
    PCTTHRESHOLD 50
    NOPARALLEL
    ALTER TABLE GEMDEV.LU_MESSAGECODE
    ADD CONSTRAINT LU_ROUTECODE_FK3
    FOREIGN KEY (ROUTE_CODE)
    REFERENCES GEMDEV.LU_ROUTECODE (ROUTE_CODE)
    ENABLE
    ALTER TABLE GEMDEV.LU_MESSAGECODE
    ADD CONSTRAINT MSGCODE_FK_CESMNEMONIC
    FOREIGN KEY (REPORT_CES_MNEMONIC)
    REFERENCES GEMDEV.SYS_CESMNEMONIC (CES_MNEMONIC)
    ENABLE
    My explain reads as follows.
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | DELETE STATEMENT | | | | 1 (100)| |
    | 1 | DELETE | LU_MESSAGECODE | | | | |
    | 2 | INDEX UNIQUE SCAN| SYS_IOT_TOP_52662 | 1 | 133 | 1 (0)| 00:00:01 |
    Also in my AWR Sql Report I see this as well
    Plan Statistics DB/Inst: IWORKSDB/iworksdb Snaps: 778-780
    -> % Total DB Time is the Elapsed Time of the SQL statement divided
    into the Total Database Time multiplied by 100
    Stat Name Statement Per Execution % Snap
    Elapsed Time (ms) 521,102 N/A 12.0
    CPU Time (ms) 73,922 N/A 5.1
    Executions 0 N/A N/A
    Buffer Gets 2,892,144 N/A 3.4
    Disk Reads 2,847,609 N/A 8.6
    Parse Calls 1 N/A 0.0
    Rows 0 N/A N/A
    User I/O Wait Time (ms) 475,882 N/A N/A
    Cluster Wait Time (ms) 0 N/A N/A
    Application Wait Time (ms) 0 N/A N/A
    Concurrency Wait Time (ms) 2 N/A N/A
    Invalidations 1 N/A N/A
    Version Count 1 N/A N/A
    Sharable Mem(KB) 45 N/A N/A
    Now, since the table only has 150 rows, and I am only try to delete 1 row, why is there so much disk read and why does it take 5 minutes to delete? This just weird. Does this have something to do with the Child tables?

    Any triggers on the table?
    If you trace the session, what statement(s) seem to
    be taking all that time?
    JustinWell I traced my session and I noticed that my query does take a while, but I also noticed several other queries that I was not running. Not too sure where it came from. Have a look below. It is a sample from my TKPROF utility report.
    delete gemdev.lu_messagecode
    where
    mess_code ='SSY'
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.01 0.04 0 2 23 1
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 0.01 0.04 0 2 23 1
    Misses in library cache during parse: 1
    Optimizer mode: FIRST_ROWS
    Parsing user id: 57
    Rows Row Source Operation
    1 DELETE LU_MESSAGECODE (cr=3446672 pr=3442028 pw=0 time=309363335 us)
    1 INDEX UNIQUE SCAN SYS_IOT_TOP_52662 (cr=2 pr=0 pw=0 time=35 us)(object id 52663)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    SQL*Net message to client 1 0.00 0.00
    SQL*Net message from client 1 35.87 35.87
    select /*+ all_rows */ count(1)
    from
    "GEMDEV"."TBLCLAIMCHARGE" where "CONTRACT_FEE_MESS_CODE" = :1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 10.53 44.95 381779 382893 0 1
    total 3 10.53 44.95 381779 382893 0 1
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: SYS (recursive depth: 1)
    Rows Row Source Operation
    1 SORT AGGREGATE (cr=382893 pr=381779 pw=0 time=44953436 us)
    0 TABLE ACCESS FULL TBLCLAIMCHARGE (cr=382893 pr=381779 pw=0 time=44953403 us)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file scattered read 47795 0.03 37.87
    db file sequential read 101 0.00 0.02
    select /*+ all_rows */ count(1)
    from
    "GEMDEV"."TBLCLAIMCHARGE" where "FEE_INEL_MESS_CODE" = :1

  • HOW TO DELETE THE ROW FROM DATABASE

    hI,
    Iam pasting my code below.My problem isi retrieve rows from database and display them in jsp page in rows.For each row there is delete hyperlink.Now when i click that link i should only delete the row corresponding to that delete link temporarily but it should not delete the row from database now.It should only delete the row from database when i click the save button.How can i do this can any one give some code.
    thanks
    naveen
    [email protected]
    <%@ page language="java" import="Utils.*,java.sql.*,SQLCon.ConnectionPool,java.util.Vector,java.util.StringTokenizer" %>
    <html>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>Item Details</title>
    <script>
    function submitPage()
    document.details.action = "itemdetails.jsp" ;
    document.details.submit();
    </script>
    </head>
    <body>
    <form name="details" action="itemdetails.jsp" method="post">
    <%
    ConnectionPool pool;
    Connection con = null;
    Statement st;
    ResultSet rs =null;
    %>
    <table border="0" cellpadding="0" cellspacing="0" width="328">
    <tr>
    <td width="323" colspan="4"><b>Reference No :</b> <input type="text" name="txt_refno" size="14">
    <input type="submit" value="search" name="search" ></td>
    </tr>
    <tr>
    <td width="81" bgcolor="#000099"><font color="#FFFFFF"><b>Item Code</b></font></td>
    <td width="81" bgcolor="#000099"><font color="#FFFFFF"><b>Item No</b></font></td>
    <td width="81" bgcolor="#000099"><font color="#FFFFFF"><b>Amount </b></font></td>
    <td width="80" bgcolor="#000099"> </td>
    </tr>
    <%
    pool= new ConnectionPool();
    Utils utils = new Utils();
    double total =0.00;
    String search =utils.returnString(request.getParameter("search"));
    if(search.equals("search"))
    try
    String ref_no =utils.returnString(request.getParameter("txt_refno"));
    String strSQL="select * from ref_table where refno='" + ref_no + "' ";
    con = pool.getConnection();
    st=con.createStatement();
    rs = st.executeQuery(strSQL);
    while(rs.next())
    String itemcode=rs.getString(2);
    int item_no=rs.getInt(3);
    double amount= rs.getDouble(4);
    total= total + amount;
    %>
    <tr>
    <td width="81"><input type=hidden name=hitem value=<%=itemcode%>><%=itemcode%></td>
    <td width="81"><input type=hidden name=hitemno value=<%=item_no%>><%=item_no%></td>
    <td width="81"><input type=hidden name=hamount value=<%=amount%>><%=amount%></td>
    <td width="80"><a href="delete</td>
    </tr>
    <%
    }catch(Exception e){}
    finally {
    if (con != null) pool.returnConnection(con);
    %>
    <tr>
    <td width="323" colspan="4">
    <p align="right"><b>Total:</b><input type="text" name="txt_total" size="10" value="<%=total%>"></td>
    </tr>
    <tr>
    <td width="323" colspan="4">                   
    <input type="button" value="save" name="save"></td>
    </tr>
    </table>
    </form>
    </body>
    </html>

    You mean when you click on the hyperlink you want that row to disappear from the page, but not delete the row from the database until a commit/submit button is pressed?
    Personally, I think I'd prefer that you have a delete checkbox next to every row and NOT remove them from the display if I was a user. You give your users a chance to change their mind about their choice, and when they're done they can see exactly which rows will be deleted before they commit.
    You know your problem, of course, so you might have a good reason for designing it this way. But I'd prefer not removing them from the display. JMO - MOD

  • How to find and delete matching row in ADF BC

    Hi,
    I have a table with simple fields and I have created the java class for this entity also
    Person
         - Person_Id (PK)
         - Person_NameI wanted to create an application module method to search for the entity that matches certain name
    but I cant find the code to do this.
    public class AppModuleImpl{
      public boolean deletePersonByName(String personName)
        EntityDefImpl personDef = PersonImpl.getDefinitionObject();
        //How to get all rows and find the matching name then delete the row
        return false;
    }Thanks
    Jdev 11.1.1.5

    Ramandeep Nanda wrote:
    getfilteredRows does that, you can iterate and delete the rows after filtering on any attribute in view object it does not have to be a primary key.Hi Ramandeep,
    I got the idea and I somehow was able to do what I want.
      public boolean deletePersonByName(String personName)
        PersonViewImpl personView = this.getPersonView();
        Row[] matchingRows = personView.getFilteredRows("PersonName", personName);
        if(matchingRows!=null)
          for(Row rowTemp : matchingRows)
            PersonViewRowImpl personRow = (PersonViewRowImpl) rowTemp;
            personRow.remove();
            try
              getDBTransaction().commit();
            }catch(JboException ex)
              throw ex;
        return true;
      }But somehow I got this idea, supposed I have this data
    PersonId          PersonName
    1               MANDER
    2               MANDERRY
    3               JERRYThe code getFilteredRows somehow only perform an 'exact' match but what if I want to delete both of the data
    with PersonName 'MANDER' above.
    My current code only removes the person with name 'MANDER' and not the 'MANDERRY'
    Thanks

  • SSRS Get value of previous row in a matrix (cannot use previous function because it's a matrix)

    I have a SSRS report which uses a matrix for a crosstab effect.
    Each row contains about 10 score values in 10 columns respectively. I need each row to check against the previous row, and i need each score value in each column to be compared to the corresponding column score value in the previous row. 
    If the current score is greater than the corresponding previous score (in the previous row), then i want to change the background of the cell.
    if the current score is smaller than the previous, then it's a different color.
    if they are equal, or it's the first row in the matrix table, then leave white.
    I have found custom code functions to use in the SSRS expression fields, but every single one of them compares against the previous COLUMN value and not the previous ROW value which is what i need. the "Previous" function would be perfect if i
    could use it in a matrix but i can't. (i keep getting error "The use of a Previous aggregate function in a tablix cell is not supported"). looking around it turns out that matrices are arrange in groups and not in rows which is why Previous can't
    be used and the only way is with custom code.
    Please help. if you have any custom code samples that achieve what i need, please share, or give me advice on how to achieve this. 
    Thank you

    I figured it out. Maybe it can help someone else in the future:
    Public Shared count as Integer = 0
    Public Shared currentRow As Integer = 1
    Public Shared MatrixStructures As New System.Collections.Generic.List(Of MatrixStructure)()
    Public Shared Function GetCellColor(row as Integer, score as Integer)
    If (row > currentRow) Then
    count = 0
    currentRow = row
    End If
    count = count + 1
    Dim matrixStructure As New MatrixStructure()
    matrixStructure.RowIndex = row
    matrixStructure.ColumnIndex = count
    matrixStructure.ScoreValue = score
    MatrixStructures.Add(matrixStructure)
    If score = 0 Then
    Return "White"
    End If
    Dim val As MatrixStructure = MatrixStructures.Find(Function(s As MatrixStructure)
    Return s.GetRowIndex() = row - 1 AndAlso s.GetColumnIndex() = count
    End Function)
    If (Not (val Is Nothing)) Then
    If val.scoreValue = 0 Then
    Return "White"
    End If
    If score >= val.scoreValue + 2 Then
    Return "Green"
    ElseIf score <= val.scoreValue - 2 Then
    Return "Red"
    End If
    End If
    Return "White"
    End Function
    Public Class MatrixStructure
    Public rowIndex As Integer
    Property GetRowIndex() As Integer
    Get
    Return rowIndex
    End Get
    Set(ByVal Value As Integer)
    rowIndex = Value
    End Set
    End Property
    Public columnIndex As Integer
    Property GetColumnIndex() As Integer
    Get
    Return columnIndex
    End Get
    Set(ByVal Value As Integer)
    columnIndex = Value
    End Set
    End Property
    Public scoreValue As Integer
    Property GetScoreValue () As Integer
    Get
    Return scoreValue
    End Get
    Set(ByVal Value As Integer)
    scoreValue = Value
    End Set
    End Property
    End Class
    and to pass the current row number from the expression i use this
    Ceiling(RowNumber(NOTHING) / 10)
    i divide the row number by 10 because there are ten columns. if you don't know the number of columns, or it's a variable number, then return it from the stored procedure query in the first place. that's what I had to do

  • UDO: Add and Remove rows to/from Matrix.

    Hi all,
    Yes, I know there are lots of topics about adding and removing rows but I was having trouble with these and I need some expert's opinion.
    I'm working with a Document type UDO, with 1 header table (ADAT_ONR) and 1 child table (ADAT_NR1 -  MatrixUID = "mtx_NR").
    I add the first row when the user chooses the business partner.
    If oMatrix.RowCount = 0 Then
         oMatrix.AddRow()
          oMatrix.AutoResizeColumns()
         oMatrix.Columns.Item("V_LineId").Cells.Item(1).Specific.Value = 1
    End If
    Then, the user has to press the AddRow button to add new rows, and the user can only add 1 new blank row. Later I'll change the row adding behavior to mimic B1s.
                If pVal.BeforeAction = False Then
                    Select Case pVal.ItemUID
                        Case "AddRow"
                            'ItemHandler_Click = AddRow(oCompany, oApplication, oForm, oForm.Items.Item("mtx_NR").Specific.RowCount())
                            oMatrix = oForm.Items.Item("mtx_NR").Specific
                            If oMatrix.RowCount > 0 Then
                                If Trim(oMatrix.Columns.Item("V_PltCode").Cells.Item(oMatrix.RowCount).Specific.Value) = "" Then
                                    oApplication.StatusBar.SetText(TranslateStr(oApplication, MustChoosePallet), BoMessageTime.bmt_Short)
                                    Exit Function
                                End If
                            End If
                            ItemHandler_Click = NewLine(oCompany, oApplication, oForm)
                            Exit Function
        Private Function NewLine(ByRef oCompany As SAPbobsCOM.Company, ByRef oApplication As SAPbouiCOM.Application, _
            ByRef oForm As SAPbouiCOM.Form) As Boolean
            NewLine = False
            Try
                oMatrix = oForm.Items.Item("mtx_NR").Specific
                Dim Index As Integer = oMatrix.RowCount
                With oForm.DataSources.DBDataSources.Item("@ADAT_NR1")
                    .Clear()
                End With
                oMatrix.AddRow()
                oMatrix.Columns.Item("V_LineId").Cells.Item(Index + 1).Specific.Value = (Index + 1).ToString
                oMatrix.FlushToDataSource()
                oMatrix.LoadFromDataSource()
                oForm.Refresh()
                NewLine = True
            Catch ex As Exception
                oApplication.MessageBox("NewLine(): " & oCompany.GetLastErrorCode.ToString & ", " & ex.Message)
            End Try
        End Function
    When I Add or Update the data, I clear the last blank row, if it exists.
               '// In the Click Event
               If pVal.BeforeAction = True Then
                    Select Case pVal.ItemUID
                        Case "1"
                            If oForm.Mode <> BoFormMode.fm_FIND_MODE Then
                                oMatrix = oForm.Items.Item("mtx_NR").Specific
                                oMatrix.FlushToDataSource()
                                oMatrix.LoadFromDataSource()
                                If Trim(oMatrix.Columns.Item("V_PltCode").Cells.Item(oMatrix.RowCount).Specific.Value) = "" Then
                                    oForm.DataSources.DBDataSources.Item("@ADAT_NR1").RemoveRecord(oMatrix.RowCount - 1)
                                    oMatrix.DeleteRow(oMatrix.RowCount)
                                    'oMatrix.FlushToDataSource()
                                End If
                            End If
                    End Select
    My question is, Is there an easier way to Add and Delete Rows??
    BTW, I still have a problem so solve. With this code, when the user deletes a row the row numbering is incorrect. Example: if I have to rows in a matrix and I delete row nº1, row nº2 will hold the same number...
    Any Ideas?
    Thanks in advanced,
    Vítor Vieira

    Hi Victor,
    there is a Form Data event which you ca use in that try to write the code for adding a row after updating and delete a row while inserting and add a row while traversing.
    sample code.
    Sub FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean)
            Try
                Select Case BusinessObjectInfo.EventType
                    Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD, SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE
                        If BusinessObjectInfo.BeforeAction = True Then
                            objForm = objMain.objApplication.Forms.Item(BusinessObjectInfo.FormUID)
                            oDBs_Head = objForm.DataSources.DBDataSources.Item("@Header")
                            oDBs_Detail= objForm.DataSources.DBDataSources.Item("@Line")
                            objMatrix = objForm.Items.Item("83").Specific
                            If objMatrix.VisualRowCount <> 0 Then
                                objMatrix.DeleteRow(objMatrix.VisualRowCount)
                                objMatrix.FlushToDataSource()
                            End If
                            If BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD Then
                                End If
                        ElseIf BusinessObjectInfo.ActionSuccess = True Then
                            objForm = objMain.objApplication.Forms.Item(BusinessObjectInfo.FormUID)
                            If BusinessObjectInfo.EventType =                    SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE Then
                                objMatrix = objForm.Items.Item("83").Specific
                                objMatrix.AddRow()
                                SetNewLineCharge(objForm.UniqueID, objMatrix.VisualRowCount)
                                objMatrix.FlushToDataSource()
                              End If
                        End If
                    Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD
                        If BusinessObjectInfo.ActionSuccess = True Then
                            oDBs_Head = objForm.DataSources.DBDataSources.Item("@Header")
                           oDBs_Detail = objForm.DataSources.DBDataSources.Item("@Line")
                            objMatrix = objForm.Items.Item("83").Specific
                            objMatrix.AddRow()
                            SetNewLineCharge(objForm.UniqueID, objMatrix.VisualRowCount)
                            objMatrix.FlushToDataSource()
                           End If
                End Select
                End Sub
    Hope this helps,
    OM Prakash

  • How to select a rows in system matrix

    Hi All
    Iam trying to select a particular rows in a system matrix
    I added a edittext item on the system form A/R Invoice
    what i have to do is i have to search the text  in edittext item whether it is there in the matrix .
    if text matches to  text in any column in the matrix then that particular row should be select
    I done the searching text with matrix but i didnt get the row selection
    i used
    sbomatrix.selectrow(1,true,false)
    but it showing error message
    "Item-Item is not a User -Defined Item [66000-8]"
    thanks in advance

    Hi
    Thnks For ur Reply
    According to ur suggestion i tried but only one row is selecting
    i used shift and also control Key
    but only one row is selecting
    I tried Following Code
    sbomatrix.Columns.Item("0").Cells.Item(i).Click(SAPbouiCOM.BoCellClickType.ct_Regular, SAPbouiCOM.BoModifiersEnum.mt_CTRL)
    and also with shift
    sbomatrix.Columns.Item("0").Cells.Item(i).Click(SAPbouiCOM.BoCellClickType.ct_Regular, SAPbouiCOM.BoModifiersEnum.mt_SHIFT)
    but Only One Row is Selecting not Multiple Row
    Thanks in Advance

Maybe you are looking for

  • Satellite Pro M10 will not boot again and comes up with the error message

    My Toshiba Satellite Pro M10 notebook will not boot again and comes up with the error message "load error" when I push the power button. The problem arised after installation of "symantec system works" and trying to restart windows XP professional to

  • Wireless Connection Trouble - Apple Card Installed

    Hello: I recently installed a 60gb hard drive on this laptop. I reinstalled my Panther OS and upgraded to 10.3.9 . I have verified and repaired my permissions. I am not able to connect to the internet via my apple wireless card. I am using an sbc mod

  • Impossible to save reduction of red eye

    Last Saturday I installed iLife 05 in my mac and I checked the program discovering it was impossible to save the reduction of red eye: I could edit the photo and apparently the program saved the changes, but when I re opened the photo the reduction o

  • Agentry Connector Studio

    Hi Experts,           Iam trying to develop an application by following the  link How-to Build an Agentry based mobile app from scratch connecting to an SAP back-end Part1. I have created a class in java perspective,started the agentry connector stud

  • When posting an invoice,a line itemthat is already invoiced is still coming

    Hi, When I am trying to post an invoice against above PO, a line item that is already fully invoiced is still pulling through. Could you please let me know why this is happening? Thanks Venkat