On cell editing Cell display the default value.

  1. #1

    On cell editing Cell display the default value.

    Hi i have a grid panel which i have one column with textfield in editor when click on this cell . The default assigned value to cell is always display.
    I want the column to be blank on user clicks in it.
    I have used the beforeEdit method
     <ext:CellEditing runat="server" ClicksToEdit="1">
                                <Listeners>
                                    <BeforeEdit Fn="beforeEdit" " />
                                    <Edit Fn="afterEdit"></Edit>
                                    
                                </Listeners>
                            </ext:CellEditing>
    in this clientside side event i have following code
     var beforeEdit = function (editor, e)
                {
                    debugger;
                    var number =e.record.data.Number;
                    if(number=='0' )
                    {
                        e.record.data.Number="";                   
                    }
                   
                };
    Please suggest me what I am missing .
  2. #2
    Hello,

    Try using just e.value = "" instead of e.record.data.Number = "".

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3

    Editing cell get empty using

    while editing i have used this code and cell get empty .
    <Editor>
                                  <EditorOptions>
                                        <Listeners>
                                            <StartEdit Handler="this.field.clear();" Delay="1" />
                                        </Listeners>
                                    </EditorOptions>
                                    </Editor>
    but due this code i ran into another issue . if there is some real data in the cell say "1" and i edit that cell then above code remove the 1 value from cell . In case user do not input any value then that "1" should be displayed. But this is not happening . How could i do it please suggest.

Similar Threads

  1. Return value to an editing cell
    By Ahtu in forum 2.x Help
    Replies: 3
    Last Post: Oct 27, 2014, 6:59 AM
  2. Cell Editing startEdit problem
    By glenh in forum 2.x Help
    Replies: 1
    Last Post: Dec 17, 2013, 4:55 AM
  3. [CLOSED] Disabling cell editing based on cell value in Ext.Net 2.1
    By bayoglu in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 30, 2013, 5:35 PM
  4. Replies: 4
    Last Post: Jul 10, 2012, 5:35 PM
  5. [CLOSED] ColumnTree cell editing
    By kenanhancer in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 04, 2011, 7:38 AM

Posting Permissions