Editing items in datagrid

Hi,
When hitting enter after editing an item in a datagrid, the
next row is selected and the item editor for the same column is
shown.
I want the enter button to close the item editor keeping the
same row selected.
I'd hoped that I could extend the DataGrid class and override
this functionality but it seems that the code is held in private
methods.
Has anyone come across this before or have any possible
solutions. I've thought of a couple of solutions but they're not
very elegant.
Cheers

Hi,
1. editing should automatically edit dataProvider. If you use default editing it be automatically. If you create you own itemEditor you should check it.
2. Both methods for editing can be. You can save each correction to DB. Also you can detect all changes and save them after pressing special button. The best variant is depends on the task.

Similar Messages

  • I cant editing cells in datagrid in WPF

    I have make some project in wpf data entity frameworks but I cant write or edit crells in Datagrid 
    I need only one cells to edit !
    <DataGrid Name="lvShitjetDetajet" FontSize="14" Margin="10,104,10,68" KeyDown="lvShitjetDetajet_KeyDown" KeyUp="lvShitjetDetajet_KeyUp">
    <DataGrid.Columns>
    <DataGridTextColumn Header="Numri" Width="70" />
    <DataGridTextColumn Header="Emri" Binding="{Binding Path=Emri}" Width="350" />
    <DataGridTextColumn Header="Sasia" Width="100"
    IsReadOnly="False" Binding="{Binding Sasia}">
    </DataGridTextColumn>
    <!--<DataGridTextColumn IsReadOnly="False" Header="Sasia" Binding="{Binding Path=Sasia}" Width="100" />-->
    <DataGridTextColumn Header="Çmimi per njesi" Binding="{Binding Path=CmimiPerNjesi}" Width="150"/>
    <DataGridTextColumn Visibility="Hidden" Header="Totali pa TVSH" Binding="{Binding Path=TotaliPaTVSH}" Width="100"/>
    <DataGridTextColumn Visibility="Hidden" Header="Vlera e TVSH" Binding="{Binding Path=VleraTVSH}" Width="100"/>
    <DataGridTextColumn Header="Totali me TVSH" Binding="{Binding Path=TotaliMeTVSH}" Width="200"/>
    <DataGridTextColumn Header="Rabati %" Width="100"/>
    </DataGrid.Columns>
    </DataGrid>
    When I select cells and write something I cant i have this error message 'EditItem' is not allowed for this view.

    You must set an ItemSource for the DataGrid if you want to be able to edit the items in it. Just set the ItemsSource property to an ObservableCollection<BL.ShitjaDetajet> and add items to this collection instead of lvShitjetDetajet.Items and you will
    be fine:
    private readonly ObservableCollection<BL.ShitjaDetajet> _collection = new ObservableCollection<BL.ShitjaDetajet>();
    public MainWindow()
    InitializeComponent();
    lvShitjetDetajet.ItemsSource = _collection;
    private void ShtoDetajTeShitjes(Artikulli artikulli)
    BL.ShitjaDetajet sd = new BL.ShitjaDetajet();
    sd.ArtikulliID = artikulli.ArtikulliID;
    sd.Emri = artikulli.Emri;
    sd.CmimiPerNjesi = (decimal)artikulli.CmimiShites;
    sd.TVSH = (decimal)artikulli.TVSH;
    sd.Sasia = 1;
    sd.CmimiPerNjesi = artikulli.CmimiShites;
    sd.TotaliPaTVSH = sd.Sasia * sd.CmimiPerNjesi;
    sd.VleraTVSH = sd.TotaliPaTVSH * Convert.ToDecimal(sd.TVSH);
    sd.TotaliMeTVSH = sd.VleraTVSH + sd.TotaliPaTVSH;
    _collection.Add(sd);
    LlogaritTotalet();
    AktivizoButonat();
    You cannot add items directly to the Items property of the DataGrid if you want to be able to edit the items.
    Please remember to mark helpful posts as answer to close the thread.

  • Error while Editing Item - After importing pagegroup

    Hi All,
    We have Oracle Application server 10g (10.1.2) with Oracle Portal 10.1.2.0.0. as a test environment in win 2000 server.
    We installed a new Oracle Application server 10g (10.1.2) (production) with 10.1.2.0.2 in Suse Linux Enterprise server 9. every thing was fine.
    We have migrated one simple page group from source(win) to a new Portal in Linux ( by following the steps of Portal export / import Doc.). This is by exporting transport set, dmp file in source side and importing dmp file and transport set on the target. The import was successful. I checked the Navigator and found the imported page Group. Also all the sub pages and items have been found with proper regions.
    But when i'm trying to edit any item,region or adding region,item, it shows the following error. -----------------------
    ERROR :General invalidation message processing exception: User-Defined Exception (WWC-40018)
    General invalidation message processing exception: Error invalidating content, Non-200 status code returned by Web Cache. Status: 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied. ) (WWC-40018)
    Note:Please kindly note that our repository and portal midtier on same machine. So there is no firewall between portal and repository. Also there is no proxy settings given in Portal. Moreover, I reinitialized the webcache invalidator password in both web cache admin and Portal. Nothing is working.
    Please kindly help me in this regard urgently. and provide me the solution along with the navigation details.
    Thanks in Advance,
    Abdullah Shafi

    HI,
    Pls reply me.did your issue resolved regarding webcache wwc-400018 ,same is the problem for me,webachacheadmin and invalidator pages are not working and while editing items in portal does reflect instaed it gives the error
    Error
    General invalidation message processing exception: An error occurred while closing the HTTP connection after receiving an error while getting the invalidation response from Web Cache: ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1389
    ORA-29261: bad argument
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1231
    ORA-29259: end-of-input reached (WWC-40018)
    General invalidation message processing exception: An error occurred while getting the invalidation response from Web Cache: ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1231
    ORA-29259: end-of-input reached (WWC-40018)
    Thanks and Regards,
    Azeem.

  • JQuery Tutorial needed to customize Add New Item and Edit Item forms

    Hello,
    I need a tutorial to use JQuery to customize the UI Screen of SharePoint to add a new item in a list.
    since I don't have prior UI experience it will be nice if the tutorial is specifically targetted towards customizing the automatic form which is presented by sharepoint when we try to add an item to a custom lists.
    val it: unit=()

    Hi,
    According to your post, my understanding is that you want to customize the New Item and Edit Item forms using jQuery.
    The following examples for your reference:
    http://ankursharepoint.blogspot.com/2012/10/jquery-for-tabbed-navigation-in.html
    http://social.technet.microsoft.com/wiki/contents/articles/21730.sharepoint-2010-conditionally-hide-fields-on-standard-list-forms-using-jquery.aspx
    https://www.nothingbutsharepoint.com/sites/eusp/Pages/10-jQuery-Snippets-for-SharePoint-2010.aspx
    jQuery Tutorial
    http://www.w3schools.com/jQuery/
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Edit Items in TestStand Sequence File Combo Box?

    Hello All,
      I am creating a basic user interface VI Project, based off of the examples included with TestStand.  In the "Simple" example, there is a Open Seq File button, and an associated combo box to select the Sequence File to run.  For my application, I would like to limit the sequence file options from which the operator can choose (not allow the operator to browse the entire hard drive to find a sequence file).  Using basic Labview functions, I would have done this with a regular combo box, and use the "Edit Items" option to load file options into the drop-down menu.  However, the TestStand UI combo box does not allow this, presumably because it is an ActiveX control, and configuration is different from normal Labview functions.  Is it possible to pre-load the TestStand UI combo box with allowed sequence files?  Or, if there are other suggestions on how to accomplish the requirement, I am open to them as well. 
    Thanks in advance,
    GSinMN       

    One idea is to use the native LabVIEW controls.  Then hide the TestStand UI controls and update them from the events triggered by the native LabVIEW controls. I have had to do this before on UIs when the customer wanted a certain look and feel.
    So basically have the native LabVIEW combo box set like you want.  When the user makes a selection, in the event for that selection update the hidden TestStand Sequence File Combo Box witht he correct sequence file.
    Another option is to use events for the Sequence File Combo Box and just filter and force certain behavior.
    Hope this helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Automatically perform calculations in report for editable items

    Hello,
    I have a report which consists of some editable text items. These editable items correspond to different columns in the table. Now in the report I want to make one column item to be automated so that it can perform some calculations based on other columns data entered by the user in the report. Like, for example if the user changes text item data for col3, col4 then it should automatically perform the calculations for col10 ; similar to onchage event. Consider a situation where in a user comes and enters data in the report throught the text item for col3, so whenever user changes the data for col3 it should perform the calculations for col10 automatically.
    Can anyone please help me with this issue.
    Thanks,
    Orton

    Shijesh,
    Sorry for the delay in getting back to you.
    In my case its a normal report but the thing is I need to calculate based on the data entered by the users in different text items which are present in different regions.
    I have five fields to calculate on the fly like based on the data entered by the users. Below are the five columns. I have the item Ids specified for each of these editable items present across different regions.
    PITIA's (f20) = First P And I Amount(25) + County Tax amount(f26) + Hazard Ins Amount(f27) + Over or Short Amount(f28)
    F/E Ratio(f21) = PITIA's(f20) / (Borrower 1 Income(f29) + Borrower 2 Income(f30)) (This should be %)
    B/E Ratio(f22) = ( PITIA's(f20) + MI Payment(f31) + 2nd Mort Payment(f32) + Revolving Liabilities(f33) + Installment Liabilities(f34) ) /( Borrower 1 Income(f29) + Borrower 2 Income(f30) ) (should be %)
    LTV(f23) = First Principal Balance(f35) /Current Value(f36)
    Net Disposable(f24) = ( Borrower 1 Income(f29) + Borrower 2 Income(f30) ) - ( PITIA's(f20) + MI Payment(f31) + 2nd Mort Payment(f32) + Revolving Liabilities(f33) + Installment Liabilities(f34) )
    shijesh can you please help me out with these calculations.
    Thanks,
    Orton

  • Want to customize Menu Bar - Where can I find explanations of the almost 200 editable items in the Properties for "ul.MenuBarHorizontal" ?

    I want to design/customize a horizontal Menu Bar. However I'm flying blind on what the meanings (parameters) of each of the almost 200 editable items are in the Properties for "ul.MenuBarHorizontal" ?
    Where can I find each item explained? Have looked on line and in the library.
    Thanks.

    Here's a link to the help pages for the Spry Menu Bar: http://help.adobe.com/en_US/Dreamweaver/10.0_Using/WS90E6DF98-60A3-41a4-B427-CD057D57BB7A. html#WS37318579-3916-46db-80D1-A8C5E6777BE5a
    Understanding the CSS for a Spry Menu Bar is an exercise in understanding descendant styles. David Powers has just published a good tutorial on the Spry Menu Bar. His explanations are very good.
    http://foundationphp.com/tutorials/sprymenu/customize1.php will get you there.
    Beth

  • Cancel edition in a Datagrid Column

    What i´m wishing to do is very simple, i just want to cancel an edition in a DataGrid column,
    Loosing focus of the textbox confirms the edition, i wanted to place 2 buttons above the edition text box, cancel and confirm, but it seems to be impossible...
    any idea?
    thanks in advance!!

    Yea that seems to work fine for me so in full, with editing features
    Custom Comp
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="182" height="72"  >
    <mx:Script>
    <![CDATA[
    private function handleOk():void {
    this.data.someText = textInput.text
    override public function set data(value:Object):void {
    super.data = value;
    textInput.text = data.someText
    private function cancel():void {
    textInput.text = data.someText;
    ]]>
    </mx:Script>
    <mx:TextInput id="textInput" x="10" y="10" />
    <mx:Button x="10" y="40" label="Update" click="handleOk()"/>
    <mx:Button x="85" y="40" label="Cancel" click="cancel()"/>
    </mx:Canvas>
    Application
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:local="*">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    [Bindable]
    private var ac:ArrayCollection = new ArrayCollection([
    {someText : 'Line 1'},
    {someText : 'Line 2'},
    {someText : 'Line 3'},
    {someText : 'Line 4'},
    {someText : 'Line 5'},
    {someText : 'Line 6'},
    {someText : 'Line 7'},
    {someText : 'Line 8'},
    {someText : 'Line 9'},
    {someText : 'Line 10'}
    ]]>
    </mx:Script>
    <mx:DataGrid x="71" y="90" dataProvider="{ac}">
    <mx:columns>
    <mx:DataGridColumn headerText="Column 1" dataField="someText" itemRenderer="Comp1" width="182"/>
    <mx:DataGridColumn headerText="Column 2" dataField="col2"/>
    <mx:DataGridColumn headerText="Column 3" dataField="col3"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Application>
    Hope this helps
    Andrew

  • Items in dataGrid

    Hello EveryOne
    I've datagrid & it is binded to dataProvider.
    when it displays data. I want to count the no. of rows
    visible.
    or should I say, i would like count items in datagrid similar
    as we do in .NET
    can anyOne help me.
    Thanks

    First this forum is intended for questions about Flex
    Builder. Flex language questions should be posted in the Flex
    General Discussion forum.
    Also, do not use Array as a dataProvider unless you are
    certain you will never be updating the data dynamically. Array does
    not dispatch the events necessary to cause the bound controls to
    update. Instead, use ArrayCollection. (or XML or XMLListCollection)
    A safe, generic way to get the length is:
    myDataGrid.dataProvider.length;
    Tracy

  • Can the Ring Properties/Edit Items/Labels be populated by array values?

    Can the Ring Properties/Edit Items/Labels be populated by array values?
    I'm trying to troubleshoot an existing LabView 7.0 application at our office (this is only the beginning of my nightmare) and I'm finding that there is an array being created out of discrete Elements, which is then being indexed using the Indexed Array function, using a Ring control as the Index input. 
    What I'm seeing is that whoever created this "Appication" seems to require that any new 'elements' that need to be added to the array need to added in AT LEAST two locations (add the element to the array and add a label on the Edit Items tab of the Ring control used to index the array) and there may be more locations I haven't found that also needs the same information.  Since I can't see any way for the array and the ring control to 'compare' the text strings, I'm assuming the array is being indexed using the 'values' from the Edit Items tab.  Ths would allow different text in the Ring dropdown than is actually contained in the text of the array.
    This is contrary to most of the coding practices I've learned, so I'm wondering if I could use the text strings contained in the array itself to populate Item list in the Ring control?
    Later I can create an 'entry form' that would allow new parts to be added by staff that doesn't require knowledge of LabView programming. (The "Users" should NEVER have to see the underlying block diagrams/code to add or edit parts ot test parameter values.)
    Thanks

    In 8.2 you can do this with a property node and the "Strings [ ] Property".  It accepts an array of strings.  Order of strings in array sets the order in the control.  Should work in 7.0 as well.

  • Cant edit items in combo box

    I cannot edit items in my combo box when i click on it. I just see whit box . Can anybody help me ? 

    Dear Skooty,
    in such cases, as the previous poster had said, recreating the control/VI in question usually fixes the problem. If it persists, a repair of your LabVIEW installation might be necessary.
    Please let us know of your results.
    Regards,
    Andrew Valko
    National Instruments Hungary

  • Problems with editing items in ical

    I use ical with icloud on my Imac, Ipad and 3 Iphones.
    When i change an item on one of these devices and you press OK, you get to see your edited item for just a few seconds before ical changes the item back tot its old settings.
    So lets say you want to change the time of an item in your agenda from 12.00 to 02.00 for example, it will show your changes for a few seconds before the item is back on 12.00 again.
    This does not happen all the time. I thought it had something to do with editing items while ical is synchronizing but when you wait till its finished synchronizing it still happends sometimes. Eventually after editing the **** item 3 -5 times ical approves the changes but **** its annoying when you are in a hurry or dont have time to check up after you edited an item and it changes back without you seeing it.
    All devices have had their latest updates and are all connected to the internet either by 3G, WiFi or LAN.
    Anyone has an idea about how this is possible?
    Thanks

    Sorry I am having terrible trouble with even working out how to reply to these forums. I use photoshop elements 8 (and I have also tried Gimp) as I cannot afford CS5. The photo seem to be edited as TIFF and they do get imported. The photos seem to stack, but I am unable to open the stack to view the edited image - I thought when you click the stack it should expand and show all the editions of the photos next to each other. Sometimes - rarely - this works, but most of the time only the original raw file shows up. The crazy thing is even searching for the filename.tif doesn't find the file, even when I copy and paste the file name from Windows Explorer. But the edited file is in the catalogue somewhere because after deleting the original, the edited file shows up as above.
    I dread having to edit the files in PE8 because of this, but sometimes this is necessary to be able to use layers and filters.
    Note that using Gimp is just the same. I think the problem is in Lightroom.

  • Manage Editable Items to Read only by Backing Bean!!

    Hi,
    JDeveloper/ADF 11g update 2
    I am finding such solution that how can I manage editable items by any action listener against button/link/object.
    Details:_
    Suppose I have a entry form of EMP tables' VO and want to show as read only during form load but when I will enter/click a edit button(manually created) then all items will be editable to be edited. and after submit and commit records then all items will be appear as like read only.
    I want to manage editable and read only by backing class/ action listener of edit button(manually created) . Is it possible ? if possible please give me a such solution.
    Please help me.
    zakir
    ===

    Ok here you go:
    Bean code (put this bean in session or page flow scope): package demo.clickenable;
    import javax.faces.event.ActionEvent;
    import oracle.adf.view.rich.component.rich.input.RichInputText;
    public class ClickEnableBean
        Boolean enable = Boolean.TRUE;
        public ClickEnableBean()
        public void setEnable(Boolean aEnable)
            this.enable = aEnable;
        public Boolean getEnable()
            return enable;
        public void flipEnable(ActionEvent actionEvent)
            if (getEnable().booleanValue())
                setEnable(Boolean.FALSE);
            else
                setEnable(Boolean.TRUE);
    }JSPX page:<?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document>
          <af:form>
            <af:panelGroupLayout layout="vertical">
              <af:panelGroupLayout partialTriggers="bte">
                <af:inputText label="Label 1" disabled="#{ClickEnable.enable}"/>
                <af:inputText label="Label 2" disabled="#{ClickEnable.enable}"/>
                <af:inputText label="Label 3" disabled="#{ClickEnable.enable}"/>
              </af:panelGroupLayout>
              <af:panelGroupLayout>
                <af:commandButton text="#{ClickEnable.enable ? 'Click to enable' : ' Click to disable'}" actionListener="#{ClickEnable.flipEnable}"
                                  id="bte" partialSubmit="true" partialTriggers="bte"/>
              </af:panelGroupLayout>
            </af:panelGroupLayout>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>The real work is done by a partial trigger on the button (id=bte). This trigger is used to update the panelGroupLayout holding the input text fields which are enabled/disabled via the boolean value of the bean. Each click on the button toggles the boolean value and updates the page.
    Timo

  • Render  not-editable item

    Hi ,
    i use oracle forms 10g, win xp pack2 ..
    hi ,
    how to render not-editable item(its value unchanged) when i press a boutton ??
    Edited by: 979155 on 1 janv. 2013 16:27
    Edited by: 979155 on 1 janv. 2013 18:43

    so you have two options.
    you can disable the item:
    SET_ITEM_PROPERTY('YOUR_ITEM',ENABLED,PROPERTY_FALSE);or you can disable the navigation for that item (keyboard navigation):
    SET_ITEM_PROPERTY('YOUR_ITEM',NAVIGABLE,PROPERTY_FALSE);Hope this helps you :)
    Regards
    Carlos

  • Hiding Add/Edit Item

    Hi,
    I have a page with a single Item Region. I want to have two users - User A and User B - User A should only be able to add an item, but not edit it. And, User B should only be able to edit an item but not add any. Is this possible in Oracle Portal?
    Thanks,
    Vijay.

    Hi Vijay -
    Portal default functionality does not support this level of granularity. Have a look at the following whitepaper given at Oracle Open World 2004. (section Adding and Editing Items in Page View mode)
    http://www.openworld2004.com/published/1336/1336_FENDER_DOC.pdf
    It shows you how to create your own Add-item button. If you follow the technique in this paper, you can place item level security on your new "Add Item" link so only UserA has access to it.
    It also shows how to create an Edit item link using an associated funtion. You will need to add code to do an IF check for the correct user before outputting anything with the HTP.P( ) function.
    Hope this helps,
    Candace

Maybe you are looking for

  • Awful Experience with Delivery and Installation of Appliances from BBY

    I went to the Best But in College Park, MD on 02 March 2015 with the intention of buying an appliance suite (refrigerator, range, and dish washer). A sales associated assisted me promptly upon entering the store, and I let him know what I needed to p

  • Locked out of mail have to unlock every time I try to access it.

    I have been using my mac (mini) for a couple years and have always had macs, so I;m not an idiot (meh)-Just recently I have been locked out of my mail every time I try to use it, with either "disabled for security reasons" or "unable to connect to iC

  • ISE 1.2 Authentication Failures at First time Connection

    Hi,  I have a trouble with ISE 1.2 when trying to authenticate for first time an end-device, this device might be either a Workstation or IP Phone or Printer,etc. it fails or staying in running mode. The result is the same it can not access the netwo

  • My MacBook Pro get warm and has low battery capasity

    Apple say MacBook Pro early 2011 should have 7+ hour capasity. Mine dries out in less than 2 hour. Beside: The computer gets very warm, cannot contact to a table without damage the table.

  • What do i need to open programs???

    hi all i have stuffit expander and it works fine. however, there are things i need to open but i cant and was wondering what i need to do. i want to open an icon. it is a black rectangle with a little green bit on it. looks a bit like a credit card.