[CLOSED] V2.0 beta RowEditing & ClicksToEdit

  1. #1

    [CLOSED] V2.0 beta RowEditing & ClicksToEdit

    Hi, it's possibile disable the editing the click or doubleclick on the row ?, actually the value of property ClicksToEdit is 2, i have test with value 0, but then double click on the row the editing appear.

    Thanks
    Aurelio
    Last edited by geoffrey.mcgill; Mar 25, 2012 at 1:07 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Do you need to disable editing for both - single click and double click?

    Only "1" or "2" values are supported for ClicksToEdit.
  3. #3
    Hi, Daniil
    yes, need to disable editing for both - single click and double click.

    I have the same problem with the property "ClicksToMoveEditor", open a new thread ?

    Thanks
  4. #4
    I think a new thread is not required since it's a tightly related issue.

    As far as I can understand you are going to start editing programmatically.

    If so, I can suggest the following solution:

    Example
    <ext:RowEditing ID="RowEditing1" runat="server">
        <Listeners>
            <BeforeEdit Handler="return !this.locked;" />
        </Listeners>
        <CustomConfig>
            <ext:ConfigItem Name="locked" Value="true" Mode="Raw" />
        </CustomConfig>
    </ext:RowEditing>
    And you will need to unlock the RowEditing1 before starting editing.
    #{RowEditing1}.locked = false;
    #{RowEditing1}.startEdit(...);
    #{RowEditing1}.locked = true; // to avoid moving an editor on click
  5. #5
    HI, Daniil, work OK

    Thanks
    Aurelio
  6. #6

    Disable ClicksToEdit

    Thanks! works form me. Hard to seek on forum but finally I found here how to disabled ClicksToEdit.

    I change a little this code, and now you can edit another record with mouse click(s), only if aren't editing.
    Hope it help others!

    <BeforeEdit Handler="
    	if (this.editing)    
    	{    
    		return !this.locked;    
    	}
    	else
    	{
    		// Disbale toolbar (add / remove button)
    		Ext.getCmp('tbrSocios').setDisabled(true); 
    	}" />
    <CancelEdit Handler="    
    	if (this.editing)    
    	{                    
    		this.cancelEdit()
    	}                    
    
    	if (e.record.phantom)
    	{
                    // Send edit index (and don't take selected index)
    		removeRow(e.rowIdx);
    	}
    
    	Ext.getCmp('tbrSocios').setDisabled(false); 
    	" />
  7. #7
    Hi @equiman,

    Thank you for sharing!

Similar Threads

  1. [OPEN] [#103] RowEditing Plugin - Format bug?
    By adelaney in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Dec 29, 2012, 6:57 AM
  2. [CLOSED] ClicksToEdit gridPanel property doesn't found
    By Daly_AF in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 15, 2012, 10:21 AM
  3. [CLOSED] RowEditing Save Button
    By adelaney in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 17, 2012, 6:57 PM
  4. [CLOSED] GridPanel RowEditing Feature
    By Timothy in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: May 03, 2012, 8:45 PM
  5. [CLOSED] [1.0]GridPanel ClicksToEdit
    By bethc in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 10, 2009, 4:30 AM

Posting Permissions