How to edit cell in a Data Grid
Hai
I have pasted the mxml below.
I need how to edit a cell in a datagrid.
1. Run the mxml, enter the values in the textbox and click add button.
2. then click AND button, now u can see the values displayed in the grid.
3. Then again change the second combobox and enter the values in the textbox and click add
4. Now i need to edit the values for a particular cell in the datagrid.
In the below code u can see the Value column,
i need to edit oly that cell of a particular row .
Can anyone help me.
Thanks in Advance
<?xml version="1.0" encoding="utf-8"?><mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
// ActionScript fileimport
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 =
truetxt.visible =
false}
else{txt.visible =
truedatepick.visible =
false}
private function add():void
You can enable editing in a DG to the whole DG or only to certain columns
http://blog.flexexamples.com/2008/05/11/creating-an-editable-datagrid-control-in-flex/
If you want to enable editing to a very specific cell then you use the event itemEditBegin to prevent editing a cell that doesn't meet your criteria
http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_7.html
Similar Messages
-
Hi All,
I am using the REUSE_ALV_GRID_DISPLAY Function Module to display data in grid and make a column editable using EDIT = 'X' in the fieldcat.Depending on the value in the Column some other column value should change.But the grid values are not getting refreshed.Is there any way to catch the event when the user enters the value in the grid and presses the ENTER button.
I have an idea of how to handle this situation in case of objects but using Function how can I do this?
Thanx in advance.hi, Samson
At first, I must to say I'm very glad to hear that my suggestion is helpful to you.
About the problem on 'DATA_CHANGED'.
You mentioned that 'through a Function Call in which all the other events like TOP OF PAGE'.
I guess the FM is 'REUSE_ALV_EVENTS_GET', right?
hehe, if so, dono't worry, my friend.
you can do like following:
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = ITAB_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.
CLEAR STR_EVENTS.
STR_EVENTS-NAME = SLIS_EV_DATA_CHANGED.
STR_EVENTS-FORM = <b>'DATA_CHANGED'</b>.
APPEND STR_EVENTS TO ITAB_EVENTS.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = ITAB_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.
FORM <b>DATA_CHANGED</b> USING RR_DATA_CHANGED TYPE REF TO CL_ALV_CHANGED_DATA_PROTOCOL.
ENDFORM.
Through you can't find the entry about DATA_CHANGE in 'REUSE_ALV_EVENTS_GET' return, you can add a entry manually by yourself. SAP will care this event.
The FORM will be triggered when the edited cell lost focus.
You can have a try, hope it will be helpful.
thanks -
How to edit inbound idoc with data errors in multiple segments and reproces
Hi friends,
i have a requirement for error handling of inbound sales order(ORDERS04) without using WORKFLOW and WE19.
i have seen some function modules like edic_* ..
but my doubt is how to edit the error data(how can i identify the particular error fileds in the segments)and how to reprocess the same idoc.
Please help me...
Thanks in advanceHi Narasimh,
Please find the following steps to edit IDOC segment after you find the error using WE02.
The example codes can be found in website
http://www.sapgenie.com/sapedi/idoc_abap.htm
STEP 1 - Open document to edit
CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_EDIT'
EXPORTING
document_number = t_docnum
IMPORTING
idoc_control = itab_edidc
TABLES
idoc_data = itab_edidd
EXCEPTIONS
document_foreign_lock = 1
document_not_exist = 2
document_not_open = 3
status_is_unable_for_changing = 4
OTHERS = 5.
STEP 2 - Loop at itab_edidd and change data
LOOP AT itab_edidd WHERE segnam = 'E1EDKA1'.
e1edka1 = itab_edidd-sdata.
IF e1edka1-parvw = 'LF'.
e1edka1-partn = t_eikto.
itab_edidd-sdata = e1edka1.
MODIFY itab_edidd.
EXIT.
ENDIF.
ENDLOOP.
STEP 3 - Change data segments
CALL FUNCTION 'EDI_CHANGE_DATA_SEGMENTS'
TABLES
idoc_changed_data_range = itab_edidd
EXCEPTIONS
idoc_not_open = 1
data_record_not_exist = 2
OTHERS = 3.
STEP 3a - Change control record
CALL FUNCTION 'EDI_CHANGE_CONTROL_RECORD'
EXPORTING
idoc_changed_control = itab_edidc
EXCEPTIONS
idoc_not_open = 1
direction_change_not_allowed = 2
OTHERS = 3.
STEP 4 - Close Idoc
Update IDoc status
CLEAR t_itab_edids40.
t_itab_edids40-docnum = t_docnum.
t_itab_edids40-status = '51'.
t_itab_edids40-repid = sy-repid.
t_itab_edids40-tabnam = 'EDI_DS'.
t_itab_edids40-mandt = sy-mandt.
t_itab_edids40-stamqu = 'SAP'.
t_itab_edids40-stamid = 'B1'.
t_itab_edids40-stamno = '999'.
t_itab_edids40-stapa1 = 'Sold to changed to '.
t_itab_edids40-stapa2 = t_new_kunnr.
t_itab_edids40-logdat = sy-datum.
t_itab_edids40-logtim = sy-uzeit.
APPEND t_itab_edids40.
CALL FUNCTION 'EDI_DOCUMENT_CLOSE_EDIT'
EXPORTING
document_number = t_docnum
do_commit = 'X'
do_update = 'X'
write_all_status = 'X'
TABLES
status_records = t_itab_edids40
EXCEPTIONS
idoc_not_open = 1
db_error = 2
OTHERS = 3.
Hope this will help.
Regards,
Ferry Lianto -
How to edit BI Publisher Report Data Model in Fusion Apps?
Hello All,
I am experiencing issues while modifying the BI Publisher data model in Fusion Apps. Here is the summary of issue, Please assist me.
Issue: I have modified the SQL query of Data Set in Data Model, while saving it is prompting for Flex Filed, Parameter Values. I could find the parameter values from default package , but i dont see the Flex Fields values in package. Can you please assist me where can be these Flex Fields are defined in Fusion Apps.When you go into the Edit Dashboards page, do you see a BI Publisher icon to your left? just drag and drop that into your page and then click on properties to include your BI Publisher report. If you get an error then check(only after doing the above) whether you have these entries in your InstanceConfig.xml
<AdvancedReporting>
<ReportingEngine>XmlP</ReportingEngine>
<Volume>XmlP</Volume>
<ServerURL>http://localhost:9704/xmlpserver/services/XMLPService</ServerURL>
<WebURL>http://localhost:9704/xmlpserver</WebURL>
<AdminURL>http://localhost:9704/xmlpserver/servlet/admin</AdminURL>
<!-- AdminCredentialAlias>bipublisheradmin</AdminCredentialAlias -->
</AdvancedReporting>
Thanks,
Venkat
http://oraclebizint.wordpress.com -
How to display reply in flex data grid?
Hello All,
Frompast couple of months i am working on a Flex Application which used MySQL databse and PHP as server side language. In this application user can login and they can post their comments which will be displayed in a datagrid. This will have a reply button where other users can send their reply. My problem is how i will be displying the reply of a msg in a datagrid. Here is the screenshot of my datagrid
I thought of 2 options:
1. Displaying the reply in the datagrid and disaply in the same row: i don know how we can do this.
2. Store all the replies in data base and display in toher panel though a button. From flex side it is easy to do but i don know how i can store them in database.
Please let me know if you have any ideas/tutorials on thisThis is only in theory, haven't actually checked it but I think it could work
If each one of those posts is done by an itemrender, your renderer can have 2 states stateone and statetwo for example.
The reply state (statetwo) being bigger and containing space for the reply post.
Store your replies in the database and have another boolean column ( Tinyint(1) or something) in your MySql db indicating that a particular post has a reply . When you pull your data from the database and put in in an arraycollection check this column for each post and use it to set the state of the itemrenderer.
That way posts with no reply with be state one, and posts with replies will be state 2 and you can populate the reply field with data from the object in your arraycollection.
I suppose it all does depend on how you get your data from MySQL and how you store it in Flex but I think states is a way you could accomplish things like this. -
Lets say you have two columns one that renders as an image
the other text. Why is it that the image gets distorted when there
is more text. Is there anyway to fix this?"realtime158" <[email protected]> wrote in
message
news:g6b692$ksh$[email protected]..
> Lets say you have two columns one that renders as an
image the other text.
> Why is it that the image gets distorted when there is
more text. Is there
> anyway to fix this?
Try setting maintainAspectRatio to true on the image control.
HTH;
Amy -
How to edit XML parsed data and save on iPhone app
Hi,
How to edit and XML retrieved data that is displayed on an iPhone app and save again in the same XML file using iPhone SDK.
In other words I want to change the XML file data or edit and save.
Thnx in advance.
Regards
AmitHello amit,
No, not at all. Surely you will parse your XML file using the NSXMLParser class. OK! i think i get it now, do you wants to change/modify the value of any tag in the XML file? For that you will be required to parse your XML file using NSXMLParser class, and fill out some data structure (according to the the XML format) do some changes into your data structure, and then write your XML to the file (according to the edited data structure) using the method i told u earlier. This is what my preferred method is, and i am pretty much sure that it is not a bad way to do this at all.
Hope this clarifies some of your queries.
Best regards,
Obaid -
How to determine # of recs in the data grid - with filter being used
Say I'm looking at table or view that has 10,000 rows. I put a filter on the filter line such as state = 'WA'. Let's say the data grid (where I see the data clicking the 'data' button) now has 2,500 rows with the filter in effect.
So, how do I tell how many rows are in the data grid now? I can see how to retrieve the total number of rows for the table or view, but how when a filter is in effect.
Thanks.Okay thanks.
Sure would have preferred to see (dare I say ... like TOAD) where you can just right click in the data grid and choose record count.
But thanks - I'll use the COUNT method (till of course it's added 8-)
Russ -
I'm experiencing an odd problem with a "quick and dirty" test
application I built today using the ColdFusion wizzard in the
production release of Flex 2 Builder. The application connects to a
single datasource, displays a data grid with two fields
(approximately 120 records in the source table), and contains the
wizzard provided buttons for adding, editing, and deleting the data
grid records. When I select a record in the data grid and click the
edit button, a second form (a detail page as defined in the
wizzard) pops open with access to all fields in my table. The
problem is, the data flashes (no pun intended) briefly in the form
fields, and then dissappears so what I'm left with is an "add new
record" form. Now here's the weird part: If I'm using a browser on
the machine where I built the Flex app, the details page displays
fine with all data fields filled out properly with the contents of
the table. If I'm using a browser on the virtual server I'm using
to host the CF server, again, everything displays fine. It's only
when I access the application from another system on the network
that I see the dissappearing data effect. I've verified that each
browser instance is running the most current version of Flash
player 9. I've also ensured that (for testing purposes) the
crossdomain.xml file is set to "*" (thinking that it might be some
strange cross domain issue manifesting itself).
On a seperate note, the "master/detail" version of this
application (where the data grid and detail editor are on the same
form) works perfectly no matter where I'm accessing the
application. Any ideas would be appreciated.
Thanks - Michael McConnellCould be a timing issue with when the data comes back from
CF. I would get into the debugger or add trace statements to find
out when/why the fields are getting set/reset -
BUG in data grid and run script (V1 1467)
Hi,
I found a weird bug in data grid when displaying data defined as NUMBER(10,0).
We have a table with a column defined as NUMBER(10,0). Whenever this column contains data >5000000000 the data in the row shows up as null (empty cell) in the data grid.
I played around a bit and found that running a scrip like select * from testtab where a > 5000000000; with F5 it stops at the first number >5000000000. Running the script with F9 shows all rows correct.
I'm running on WIN2000 using SQL Developer V1 (Build 1467).
The error was not present in Build 1422.I tried the SQL you supplied (by the way, the table name helps in the INSERT statement) and then went to the DATA tab to view the data.
Interesting results.
Even though all of the insert statements executed successfully, only 2 of the rows had any data displaying in columns A and C. All rows had data in column B.
Now for the real fun: by selecting one of the empty cells the "missing" data would appear. Try a commit (yeah, I know nothing has been updated, but SQL Developer doesn't know this) and check out the UPDATE statements that are generated in the log. The cells I selected are being updated with the "missing" data. Refresh the display and the data goes into hiding again.
I don't even want to get into the dangers of a tool updating data when all you've done is to get focus on a field. I've already seen it wipe out the time portion of date/time stamps simply because the default setting for the date/time format does not include the time.
Good start on a tool guys, but it's not quite ready for Prime Time.
BTW...I'm using Oracle 9.i running SQL Developer on Windows 2000. -
Hi all,
I create a vi that inserts in a word template table values .
This work's fine but the table have 4 columns and if i update less than 4 column (example 3) the other is filled with the last column inserted (the last column is replied in the remains column).
I attach the code created.
Another question is why, also if i add an 2d array in the table, if i don't repeat the insertion for each column (for loop) the only column recorded is the first?
I attach the part of code
Bytelabs.it
Attachments:
edit cell to insert data in a exist table on word template.jpg 24 KBThese are expected behaviors. I suggest you to implement an high level API that do what you are planning to do.
Best regards,
Enrico -
I can align text in the body cells of a data grid (using cell
renderer ) but not the headers( tried to use header Renderer). I
can format the styles of all cells incuding headers. Any
ideas?Everything you need to know about styling components:
http://www.flashgods.org/forums/viewtopic.php?f=20&t=76 -
How to remove special characters while typing data in edit cell in datagrid in flex4
Hi Friends,
I am facing this problem "how to remove special characters while typing data in edit cell in datagrid in flex4".If know anyone please help in this
Thanks,
Anderson.Removes any characters from
@myString that do not meet the
provided criteria.
CREATE FUNCTION dbo.GetCharacters(@myString varchar(500), @validChars varchar(100))
RETURNS varchar(500) AS
BEGIN
While @myString like '%[^' + @validChars + ']%'
Select @myString = replace(@myString,substring(@myString,patindex('%[^' + @validChars + ']%',@myString),1),'')
Return @myString
END
Go
Declare @testStr varchar(1000),
@i int
Set @i = 1
while @i < 255
Select
@TestStr = isnull(@TestStr,'') + isnull(char(@i),''),
@i = @i + 1
Select @TestStr
Select dbo.GetCharacters(@TestStr,'a-z')
Select dbo.GetCharacters(@TestStr,'0-9')
Select dbo.GetCharacters(@TestStr,'0-9a-z')
Select dbo.GetCharacters(@TestStr,'02468bferlki')
perfect soluction -
How to make specific cell(s) read-only in a data-grid
Hi there!
Is there a way to make an specific cell read-only in a data-grid?
Best regards,
CiroHi !
After some months... here is the solution:
Private WithEvents _gridTaste As DataGrid
Private Sub MyScreen_Created()
AddHandler FindControl("GridTaste").ControlAvailable,
Sub(s, e)
_gridTaste = CType(e.Control, DataGrid)
End Sub
End Sub
Private Sub _gridTaste_BeginningEdit(sender As Object, e As DataGridBeginningEditEventArgs) Handles _gridTaste.BeginningEdit
' I want do set the cell (2,0) as read only:
If e.Row.GetIndex = 2 AndAlso e.Column.DisplayIndex = 0 Then
e.Cancel = True
End If
End Sub
I hope this post help you too!
Best regards,
Ciro -
How to Edit the CheckBox in Classic ALV GRID Display
Hi,
I want to Edit the checkbox in Grid Display.
I have one checkbox field in my internal Table,
Code Of the Program,
Data :
Begin of itab occurs 0,
CHK type C,
MATNR like MARA-MATNR,
end of itab.
Iam building the fieldcatelog using Merge Funcion module.
After that I am chaning the properties of the field
catelog like below,
loop at I_FCAT assigning <FCAT>.
Case <FCAT>-Fieldname
When 'CHK'.
<FCAT>-Checkbox = 'X'.
<FCAT>-INPUT = 'X'.
I dont have edit option in fieldcatelog.
modify I_FCAT from <FCAT>.
endcase.
endloop.
In the Layout,
I_LAYOUT-box_fieldname = 'CHK'.
I_LAYOUT-box_tabname = 'ITAB'.
It is displaying the Checkbox field.but I couldnt edit the checkBox.
I can able to edit in REUSE_ALV_LIST_DISPLAY.
But I have to use REUSE_ALV_GRID_DISPLAY.How to edit the checkbox.
Thanks in Advance,
SumithraHi vasu,
The below procedure explains you to create a checkbox cloumn in the grid and allows you to edit i hope this will helps u.
The ALV Grid Control displays the cells of a column as checkboxes if the column is marked as a checkbox column in the field catalog.
Add another field to the output table in which you want to display checkboxes
OR
Define an existing field as a checkbox.
Procedure
1. Add a field to your output table:
Data: gt_fieldcat type lvc_t_fcat.
Types: begin of gs_outtab.
Types: checkbox type c. "field for checkbox
Include structure <ABAP Dictionary structure> .
Types: end of gs_outtab.
Data: gt_outtab type gs_outtab occurs 0 with header line.
2 * Add an entry for the checkbox to the field catalog
clear ls_fcat.
ls_fcat-fieldname = 'CHECKBOX'.
* Essential: declare field as checkbox and
* mark it as editable field:
ls_fcat-checkbox = 'X'.
ls_fcat-edit = 'X'.
* do not forget to provide texts for this extra field
ls_fcat-coltext = text-f01.
ls_fcat-tooltip = text-f02.
ls_fcat-seltext = text-f03.
append ls_fcat to gt_fieldcat.
regards,
venu.
Maybe you are looking for
-
How do I add a single song to my iPod now ? I know how to add the song to iTunes but I'm afraid that if I add it to iTunes, then click on "update your iPod" it will erase all the currect songs on my iPod in favor of the single new song. Does that mak
-
Jar files are not exported while PAR Export
Hi Experts, When I am exporting as PAR file, in the par file I am not getting the jar files, which I am adding as external jar files in the java build path - Libraries Please tell me the solution. urgent... Regards, Shyam
-
Help - being overrun by bad MIFs!
I just installed SCCM 2012 SP1 fresh start last week... I've very new to it, but think I understand parts of it pretty well. Today, I'm getting a lot of errors with my SMS_Inventory_Data_Loader. The errors are 2703: Inventory Data Loader failed to
-
A good password app for my 3GS
Does anyone know of a good password manager/app that will do the following? Backup on to my PC Sync with password store on PC The ability to have categories like Credit Cards, Web Sites, Desktops, and Servers etc. Free is better if there is one but a
-
Shared component Report Queries
Hi All, Can anybody tell how to add report queries(shared components) in button or how to access report queries. Thanks