Hi Expert, Matrix row enable false
Hi ,
I Want to enable false matrix row for my some condition.
If u have any idea share with me.
thanks in adva.
Regards
Rajkumar Gupta
Hi Rujkumar,
You need to catch the GotFocus ItemEvent, for the matrix, and in the pVal.BeforeAction, check if the row should be enable or not. If it should not be enabled, you cancel the event (GotFocus) by setting BubbleEvent = False.
Regards,
Vítor Vieira
Similar Messages
-
Greetings All,
Does anyone know how i can check if a matrix row is enabled or disabled prior to updating the field? I need to know because my add on is throwing an exception stating invalid form item if the matrix row is disabled.
Any ideas?Hi Curtis
I'm not aware if you can make a row enabled or disabled...never seen it. I know you can make a whole matrix enabled or disabled. Also if you want an extra line in the matrix you add a extra one and that then becomes available. When you say disabled is this when you haven't said you want an extra row and it doesn't allow to add the row details?
Well, to check if a matrix is enabled you do something like
Dim item As SAPbouiCOM.Item
item = oForm.Items.Item("matrixID")
If item.Enabled = False Then item.Enabled = True
Then to see how many records are in your matrix use
oMatrix.RowCount
It will return the number of records in the matrix. But remeber if its your own matrix you should always add a line omatrix.addrow before specifying the row contents.
Hope this helps -
Hi
I have been observing that my matrix row deleted before executing my code for delete the matrix row. I write my code in BeforeAction=False and I use the menu id to delete the row in matrix.
Some code snap
If pval.BeforeAction = False Then
Select Case pval.MenuUID
Case MenuID.Add_Row
BubbleEvent = Me.AddRow
Case MenuID.Delete_Row
BubbleEvent = Me.DeleteRow
Case MenuID.Duplicate_Record
'oForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE
End Select
Else
And My Delete Row logic is
Private Function DeleteRow() As Boolean
If iRow <= 0 Then
Return False 'If no row selected
End If
'oSIONMstDtl = oForm.DataSources.DBDataSources.Item("@INCM_SIONDTL")
oExeMatDtl.Clear()
Try
oMatrix = oForm.Items.Item("MtxExeMat").Specific
oMatrix.DeleteRow(iRow)
' oForm.DataSources.DBDataSources.Item("@INCM_SIONDTL").RemoveRecord(iRow)
Catch ex As Exception
MsgBox(ex.Message)
End Try
For i As Integer = oMatrix.RowCount To 1 Step -1
oEdit = oMatrix.Columns.Item("ColSr").Cells.Item(i).Specific
oEdit.Value = i
oMatrix.GetLineData(i)
Next
If oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE Then
oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
End If
Return False
End Function
Edited by: Manmath Das on Feb 10, 2010 1:26 PM
Edited by: Manmath Das on Feb 10, 2010 1:28 PMI use this code in deleting row. and it works fine in all may addon. I use C# in my development.
public virtual void menuevent(string FormUID, ref SAPbouiCOM.MenuEvent pVal, ref bool BubbleEvent)
if (pVal.BeforeAction)
switch (pVal.MenuUID)
case "1293": // deleterow
ondeleterow(is_CurrentMatrixUID, il_CurrentMatrixRow, ref BubbleEvent, false);
break;
public override void ondeleterow(string matrixuid, int row, ref bool BubbleEvent, bool innerevent)
base.ondeleterow(matrixuid, row, ref BubbleEvent, innerevent);
int li_rowcount;
SAPbouiCOM.Matrix oMatrix;
GC.Collect();
oForm.Freeze(true);
oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item(matrixuid).Specific;
oForm.DataSources.DBDataSources.Item("@FAIAC1").RemoveRecord(row - 1);
oMatrix.DeleteRow(row);
li_rowcount = oMatrix.RowCount;
for (int li_row = 1; li_row <= li_rowcount; li_row++)
setColumnString(matrixuid, "LineId", li_row, li_row.ToString());
oForm.Freeze(false);
BubbleEvent = false;
Hope this will help you.
Regards
John Wilson de los Santos -
Can't catch the matrix row for Deleting Rows
Hi,
I've already read related topics but couldn't solve the problem.
I catch the Delete Row menu event 1293, but then I can't save the deleted row in an array since it's no longer listed as a selected row.
All the matrix rows return
oMatrix.IsRowSelected(i) = False after catching that 1293 event.
Trying BeforeAction True or false didn't solve that problem.
What am I missing ?
Güit sounds like a bug.
here is workaround: in oMatrix-itempress event try to store selected rowIndex in your variable - so, when you catch 1293-menuEvent you'll know which row you should save - it'll be value of your variable. -
Hello,
My form is in ADD Mode and i'm deleting some rows from it thru my code using the following code:
matItems = SBO_Application.Forms.ActiveForm.Items.Item("38").Specific
matItems.DeleteRow(intMatRow)
Now,
This deletes the row at intMatRow, but the matrix row numbers do not reset as they do when we select and delete a row manually.
For. eg.: if there are 3 rows in my matrix and i delete the first row, then the row numbers remain 2 and 3 for the remaining rows.
I want them to change to 1 and 2 as there are only 2 rows now.
Please help me with this.Hi Rohan
try This
in menu event pval before action false
If pVal.MenuUID = "1293" Then
If objForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
For intCurrentRow = 1 To objMatrix.VisualRowCount
objMatrix.Columns.Item("V_-1").Cells.Item(intCurrentRow).Specific.Value = intCurrentRow
Next
End If
End If
in item event for any validation regarding matrix use visualrowcount
ex code:
If objMatrix.Columns.Item(1).Cells.Item(objMatrix.VisualRowCount).Specific.Value = "" Then
Call objMain.objUtilities.MatrixDeleteRow(FormUID, "11", objMatrix.VisualRowCount)
End If
Rgds
Micheal
Edited by: micheal willis on Aug 11, 2009 8:06 PM -
Another Delete matrix row thread
I have read some threads with Q&A on the delete matrix row subject but I cant make it work properly. Deleted rows have a tendency to return.
I first tried to make my own:
If pVal.MenuUID = "RmLine" And pVal.BeforeAction = True Then
Set oMatrix = m_oForm.Items("MatrixM").Specific
i = 1
While i <= oMatrix.RowCount
If oMatrix.IsRowSelected(i) Then
If oMatrix.RowCount = 1 Then
oMatrix.AddRow
End If
oMatrix.DeleteRow i
m_oForm.DataSources.DBDataSources("@ITCCR_DM").Clear
oMatrix.LoadFromDataSource
m_oForm.Mode = fm_UPDATE_MODE
End If
i = i + 1
Wend
End If
Problem here is that I cant remove last row without having it return right after.(Thats why I tried the addrow)
Then I tried using SAP's function:
m_oForm.EnableMenu "1293", True
But as soon I hit "Update" the row returns so what do I need to add to the menu event to make it work?I use the two following standard methods for add and delete of rows... so far no problems with them (½ a year)
(Please not that I've have wrapped the entire UI for faster use, so not every method in here are core SDK, but hope you get the idea for the approach)
public int Add(B1ItemEvent pVal,B1DBDatasource Dbds, bool SwitchToUpdateMode, string ColumnToSelect) {
InnerMatrix.FlushToDataSource();
if(Dbds.GetValue_String(0,0)!="" || InnerMatrix.RowCount!=0) {
Dbds.InsertRecord(Dbds.Size);
Dbds.SetValue_String(0,Dbds.Size-1,"");
InnerMatrix.LoadFromDataSource();
InnerMatrix.Update();
if(SwitchToUpdateMode) {
if(pVal.IsFormModeOK) {
InnerForm.SwitchToUpdate();
InnerMatrix.Columns[ColumnToSelect].Focus (InnerMatrix.RowCount);
return Dbds.Size-1;
public bool RemoveSelected(B1ItemEvent pVal, B1DBDatasource Dbds, bool SwitchToUpdateMode, string WarningIfNoRowsSelected) {
InnerMatrix.FlushToDataSource();
int row = InnerMatrix.GetNextSelectedRow(0,BoOrderType.ot_RowOrder);
if(row!=-1) {
InnerForm.Freeze(true);
while(row != -1) {
InnerMatrix.DeleteRow(row);
if(InnerMatrix.RowCount==0) {
Dbds.BlankRecord(0);
row = InnerMatrix.GetNextSelectedRow(0,BoOrderType.ot_RowOrder);
InnerForm.Freeze(false);
InnerMatrix.FlushToDataSource();
InnerMatrix.Update();
if(SwitchToUpdateMode) {
if(pVal.IsFormModeOK) {
InnerForm.SwitchToUpdate();
return true;
else {
Notification.Statusbar_Warning (WarningIfNoRowsSelected);
return false; -
Can't delete matrix row in UDO form
Hi all,
i have a problem. I've already searched the forum and found a couple of solutions, but they didn't work.
I can't delete a matrix row. I'm on patch level 39, i've read that patches from 32 to 38 gave some problems with matrix row delete.
Any one has notice regarding same problems with patch 39?
I post the code i'm using for the delete.
matrix.FlushToDataSource()
dbDataSource.RemoveRecord(row - 1)
matrix.LoadFromDataSource()
UIForm.Update()
'Removes the change trace row
changeTrace.RemoveAt(row - 1)
UIForm.Mode = BoFormMode.fm_UPDATE_MODE
Thanks in advanceHi,
I'm using PL39 and I can delete rows in matrix (you are right in previous patch there was an error, and it´s imposible to delete rows). I saw the code you put and I doesn´t undestand what you are trying to do. I explain what I do:
- I enable the menu 1293 to delete row in a matrix, in the menu event i put the following code
Dim oMtx As SAPbouiCOM.Matrix =
oMtx.FlushToDataSource()
This works for me. -
I noticed that Firefox with version 23 removed option to turn OFF JavaScriipt from Tools > Options > Content menu
http://www.extremetech.com/computing/163291-firefox-23-finally-kills-the-blink-tag-removes-ability-to-turn-off-javascript-introduces-new-logo
Recent events when allegedly FBI used JavaScript in iframe to exploit bug in Firefox with intentions to uncover identity of users of TOR network encouraged me to play with security settings a bit.
More about how FBI exploited Firefox bug to execute malitious JavaScript on users computers: https://lists.torproject.org/pipermail/tor-announce/2013-August/000089.html More biased articles can be found in popular media articles. Just google "TOR exploit FBI"
ISSUE:
Symptoms:
I noticed that turning iFrames OFF in about:config > browser.frames.enabled;false seems to not be working as expected. Iframes are still shown and JavaScript in them is executed. Doesnt work even after resterting Firefox.
Testing:
I used this pages to test iFrames:
•https://sites.google.com/site/annuairevin/test-page
•http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe
•http://www.quirksmode.org/iframetest.html
After I turned browser.frames.enabled OFF and restarted I noticed that iFrames are still shown on all 3 pages and JavaScript in them would be executed.
By blocking IFRAMES with NoScript blocking turned ON (you have to turn forbidding IFRAMES on manually in options http://i.imgur.com/7jctoTW.png) I managed to block IFRAMES on google and w3school pages.
!!!Text in iframe "Test page in iframe" on quirksmode test page was still shown even after I have frames turned OFF in about:config and I block all scripts and frames and iframes with NoScript.
If I open same page (http://www.quirksmode.org/iframetest.html) with Opera with iFrames blocked in Preferences, iFrame is not shown at all, browser doesnt even render empty square; but JavaScript in it is executed, if you dont disable JavaScript in Preferences > Advanced.
I didnt test Chrome at all.
Possible things that can cause bug:
•I am using NoScript 2.6.7, I turned it off and on but it is possible that it is overriding Firefox settings in about:config. when you serach about:config for "frames" there are many settings mentioning frames from NoScript and AdBlockPlus.
•AdBlock Plus 2.3.2? Same reason as NoScript.
•Fot the first time I noticed Shield in the address bar with "Firefox has blocked content that isnt secure" bubble. http://i.imgur.com/K4FL65n.png. I dont know how long this feature is implemented or what exactly it does, here are some details: https://support.mozilla.org/en-US/kb/how-does-content-isnt-secure-affect-my-safety?as=u&utm_source=inproduct
P.S. Just small remark. If that is true: "Finally, Firefox 23 removes the option to disable JavaScript from the Options pane — and if you had JavaScript turned off, it has been turned back on." There should be some warning when Firefox is updated that JS was turned ON. I think that for me FF updated silently without any messages. OR maybe I blatantly closed some windows, i dont remember well.The documentation I find on browser.frames.enabled is very vague, but I can't see that it does anything currently. Is this a feature you used successfully in an earlier version?
The Mixed [Active] Content Blocker was turned on by default in Firefox 23. That would explain the shield icon. Not sure whether implementing that might have changed how iframes are handled. -
How do I uninstall Front Row Enabler (Andrew Escobar) ??
hey everybody
im on a powerbook g4 (power pc) and on 10.4.7
i did that stupid andrew escobar - Front Row Enabler so I could have Front Row on my non-infared powerbook.
it seemed like a cool idea for awhile, now i am in desperate need to update to 10.4.11.
it says in many forums that if you install any 10.4.8 - 10.4.11, front row's bezel patches will crash your computer into a blue screen and you will not be able to login.
i am nervous to update, but i am in desperate need to. does anyone here know how to uninstall this Front Row Enabler? if you would be so kind, that would be great.
thanks,
smittactually i answered my own question
i located the front row app, deleted it
then i redownloaded my 10.4.7 PPC pkg from Apple
then using pacifist (free DL at versiontracker) i extracted the 2 bezel files (that front row enabler patched to get Front Row to work on a non-Front Row working machine)
i then replaced the corrupted 2 bezel files with the original 10.4.7 bezel files (non-patched) and simply restarted and now it allowed me to update to 10.4.11
here's the specific instructions, smittay
Manually Uninstalling Front Row:
1. Delete Front Row (/System/Library/CoreServices/Front Row.app).
2. Download Mac OS X Update 10.4.7 Combo PPC from Apple.
3. Open the disk image
4. Download Pacifist and copy application to the Application folder.
5. Use Pacifist to open the Mac OS X Update Installer package file (which ends in .pkg)
6. Search for “bezel” and install only these two specific files folders:
/System/Library/PrivateFrameworks/BezelServices.framework/
/System/Library/LoginPlugins/BezelServices.loginPlugin/
7.Restart. -
Has anyone downloaded Ralph Perdomo's Front Row Enabler to Lion, and was it successful?
There are limitations. See http://www.mac-hatter.com/blog/frontrowenablerforlion for details.
-
Udo matrix rows saving problem
Hi,
i am creating a form by using UDO form generator.
in that documet and doucument rows are existed. if user select the combobox value from the form, by taking that value and i am generating a query, i am generating a recordset. by using Userdatasources i am binding each column in matrix.
i binded all values to the matrix successfully. but
but when i press Add button, this matrix rows are not getting saved. and also if i have two rows, when i press add, in database only one row is adding with NULL values. how to save that matrix data?
i am sending my code here. plz help me
ds = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
ds.DoQuery("select a.code as Code,b.Itemname as Desc1,a.quantity as Quantity from itt1 a,oitm b where a.code=b.Itemcode and a.code=' " & oComboBox.Selected.Value & ' "")
'User datasources creation
oForm = SBO_Application.Forms.Item("TBL_JOBWORK_")
oUserDataSource = oForm.DataSources.UserDataSources.Add("dsItemcode", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 40)
oUserDataSource = oForm.DataSources.UserDataSources.Add("dsItemdesc", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 40)
oUserDataSource = oForm.DataSources.UserDataSources.Add("dsQuantity", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 40)
ds.MoveFirst()
oForm = SBO_Application.Forms.Item("TBL_JOBWORK_")
oItem = oForm.Items.Item("mtx_0")
oMatrix = oItem.Specific
oColumns = oMatrix.Columns
Dim oColumn1 As SAPbouiCOM.Column
Dim oColumn2 As SAPbouiCOM.Column
Dim oColumn3 As SAPbouiCOM.Column
' Dim oColumn4 As SAPbouiCOM.Column
oColumn1 = oColumns.Item("col_0")
oColumn2 = oColumns.Item("col_1")
oColumn3 = oColumns.Item("col_2")
' oColumn3 = oColumns.Item("col_3")
While Not ds.EoF
oMatrix.FlushToDataSource()
oForm.DataSources.UserDataSources.Item("dsItemcode").Value = ds.Fields.Item("Code").Value
oColumn1.DataBind.SetBound(True, "", "dsItemcode")
oForm.DataSources.UserDataSources.Item("dsItemdesc").Value = ds.Fields.Item("Desc1").Value
oColumn2.DataBind.SetBound(True, "", "dsItemdesc")
oForm.DataSources.UserDataSources.Item("dsquantity").Value = ds.Fields.Item("Quantity").Value
oColumn3.DataBind.SetBound(True, "", "dsQuantity")
oMatrix.AddRow()
ds.MoveNext()
End While
plz help me any suggesions. in that. i want to save that matrix data in to tables. plz help me urgent asap
regards,
nagababu.Hi,
UDOs don't save data from UserDataSources (UDS) (and BTW: your code is wrong: you mustn't bind the UDSs to to columns time after time in the loop; that's just wrong). YOu have to handle such data in your code.
Regards,
Frank -
Hi
I have a UDForm whith a Matrix in it.
And i need to close the matrix row's as sales order
are generated for the row data 1 sale order per row
like for example a sales order when it is pratialy ivoiced
Can i dataBind the row status to a UDF in a UDT
some thing like the LineStatus in the RDR1 system table 'Sales Order lines'
Thanks for any help you can provied
Pedro GomesIf you mean that you want to gray out (disable) a line in a matrix, then I would say that it is not possible. But you can catch events on the matrix and prevent editing of your closed lines (if you forsee a 'state' field in your UDT).
Maybe you can do something with the grid object, and use the collapselevel to visualize the difference between closed and open lines.
regards,
Jurgen -
Button.enabled = false (but still clickable?!)
Hello Dear Forum,
Got a button (imported png defined as a button in the library).
The button is dragged onto the stage, given an instance name "btn".
Clicking the button fires an eventListener which is doing all the right things, except...
btn.enabled = false;
...only changes the cursor from a pointing finger to an arrow. What?! It is still clickable.
My intention is to disable the button so it cannot be clicked. But it can still be clicked. Not good.
QUESTION: How do I disable a button and prevent it from being clicked?
Thanks for your support,
///johan
REASON: I am temporarily disabling the button so that it cannot be clicked multiple times while loading other stuff. Makes sense.To disable the button (a homegrown SimpleButton) use its mouseEnabled property. I think enabled only applies to Button components in AS3.
-
Bouton.enabled = false; doesn't work
hi ,
I have a datagrid in witch i put button in some culomns.
I want that when I press a button in one culomn the other buttons in others culmns are disactivated.
I tried this code , but I have the following error: id attribute is not allowed on the root tag of a component.
<mx:DataGridColumn
headerText="Global" dataField="bouton_global" editable="false" width="80">
<mx:itemRenderer>
<mx:Component>
<mx:Button label="B_Global" width="80" id="BoutonGlobal" height="30" click="document.doo1();"/>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn headerText="Métier" dataField="metier" editable="false" width="80" >
<mx:itemRenderer>
<mx:Component>
<mx:Button label="B_Métier" width="80" id="BoutonMetier" height="30" click="document.doo2();"/>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
and in my AS:
public function doo1(): void {
BoutonMetier.enabled = false;
Alert.show("coucou1");
public function doo2(): void {
BoutonGlobal.enabled=false;
Alert.show("coucou2");
Can you help me plzThank you for your reply .
I tried this:
in my script :
Bindable] private var boutonMetierEnabled:Boolean=true;[
Bindable] private var boutonGlobalEnabled:Boolean=true;
then
<mx:DataGridColumn
headerText="Global" dataField="bouton_global" id="BoutonGlobal1" editable="false" width="80">
<mx:itemRenderer>
<mx:Component>
<mx:Button label="B_Global" width="80" height="30" enabled="{(boutonMetierEnabled)?(boutonGlobalEnabled):false}"/>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
I have the following error:
Multiple markers at this line:
-1120: Accès à la propriété non définie boutonGlobalEnabled.
-1120: Accès à la propriété non définie boutonMetierEnabled.
-1120: Accès à la propriété non définie boutonMetierEnabled.
-1120: Accès à la propriété non définie boutonGlobalEnabled. -
How to Diasble JLabel since enable(false) method is deprecated in jdk1.4
Hi friends
i am using jdk1.4 in which enable method is deprecated.
i am disabling my jlabel using jlabel.enable(false); method
however this is deprecated.
what method should i then use
please do helpYou just try with the .setEnabled(false); This will
help to solve your problem.Hey Thanks Mr. Sumode , its working with .setEnabled(false);
Maybe you are looking for
-
Smart collection drop down does not include keywords
I must have gotten this right once, because I have a smart collection whose only condition is a keyword, which is at the top of the drop down for that collection. Likewise there is a default smart collection that LR must have created, which is calle
-
Data migration scripts problems
Hello, I've been using SQL Developer for a couple of months now ; I'm working on the migration from a SQL Server database to Oracle 10g, and the migration features of the product really saved me a lot of time so far. However, there is a couple of sma
-
hi friends in process chain after <b>rollup</b> if it possible to include <b>execute infopackage</b> process type. regards siva
-
Front Row Incorrectly Reads iTunes Metadata under Snow Leopard?
There is a serious problem with Front Row under Snow Leopard. The program is unable to correctly read the TV metadata from iTunes and does not correctly filter/organize the data. TV episode/season/title data is not read resulting in a completely diso
-
Hi, Getting Runtime Error 6034. When I attepmt ot follow the suggetions to rectify this issue, I get the erroe message that anothe program is tryin to install. Wait until it's finish and try install again. 'Install'????? I clicked UNinstall!!! How ca