FlexGrid: start editing in a cell by simply typing

Posted by: andreas.kren on 18 October 2018, 5:53 am EST

  • Posted 18 October 2018, 5:53 am EST

    When I do a simple demo project with adding a flexgrid bound to a datasource or not it works in both cases that I can simply start editing a cell by typing.

    In a very big project I have lots of flexgrids in which this doesnt work. I dont know why or what I have done that this does not work.

    Any idea which property's (or what else) fault this behaviour is?
    I can only start a cell edit edit via double-click on the cell or pressing <F2> or <Enter>

    Thanx for any help.
  • Replied 19 October 2018, 1:11 am EST

    Hi Andreas,

    does your grid have a custom editor? What is the cell datatype? I don't think that the "EditOptions" property can cause such behavior.

    I can't think of any other property that prevents this editing.

    Best regards

    Wolfgang
  • Replied 19 October 2018, 11:55 pm EST

    Hi Wolfgang, seems the thread has whyever been copied, so I didnt see your answer, since I "favourited" the other thread.

    The cell datatype of the (many) flexgrids in this project vary, so I dont see a single certain datatype.

    During writing I had the idea to test whether its the docking tab's "fault", since most grids are on such a docking tab pane ...
  • Replied 19 October 2018, 11:56 pm EST

    And no, there are no custom editors...
  • Marked as Answer

    Replied 21 October 2018, 5:03 pm EST

    Hi Andreas,

    I could not replicate the issue you described.
    Can you please describe how the grids are laid out in your project so I can try the same at my end? If it's possible, then please send a small sample replicating the behavior you are observing so I can further investigate it.

    Regards,
    Jitender
  • Replied 8 May 2019, 12:58 pm EST

    Dear Sir/Mam,

    Please help me to convert bound flexgrid to unbound without clearing its data content so that I can edit cells directly.

    1) I have thousands of rows coming from sql queried datatable.
    2) when i load in unbound mode it's taking long to load the form.
    3) that's why loaded the data as follows:
    flxDetail.DataSource=mydatatable
    4) now I want to clear only datasource not the displayed data so that I can edit its some content.
    5) when i do
    flxDetail.DataSource=null
    the whole data being cleared. what I don't want...
    6) I also tried below but still nothing happened.
    flxDetail.DataBindings.Clear();


    please help me...

    Regards-
    Sanjeeb
  • Replied 8 May 2019, 5:03 pm EST

    Hi Sanjeeb,

    You can first write the data (using WriteXml) to a Stream, set DataSoure to null, then read the data from the Stream (using ReadXml). Here's a sample code snippet:
    using (MemoryStream stream = new MemoryStream())
    {
    c1FlexGrid1.BeginUpdate();

    c1FlexGrid1.WriteXml(stream);
    stream.Position = 0;

    c1FlexGrid1.DataSource = null;
    c1FlexGrid1.ReadXml(stream);

    c1FlexGrid1.EndUpdate();
    }


    You can also refer to the attached sample for a complete example.

    Regards,
    Jitender

    BoundToUnbound.zip
  • Replied 23 May 2019, 4:07 pm EST

    Jitender Sir

    Thankx a lot. you solved my problem.

    I have one more problem that when I set:

    FlexReport.DataSource.Recordset = frm.FlxReport.DataSource;

    I don't know how to format data conditionally like
    1. blank for zero values
    2.conditional fonts and much more...

    kindly request you to suggest the solution.

    Best Regards-
    Sanjeeb
  • Replied 23 May 2019, 9:11 pm EST

    Hello Sanjeeb,

    I have responded to your query on the following forum thread:
    https://www.grapecity.com/forums/winforms-edition/c1report-is-now-obsolete-t#paginate-2
    I request you to respond to the same thread to avoid confusion.

    Thanks and Regards.
  • Replied 8 July 2019, 3:57 am EST

    Dear Esha Mam,

    you r the best guide for me ever i found.

    I want to open CommandLink dropdown submenus when shortcut pressed....
    but it's not working....

    private void C1CommandHolder1_CommandClick(object sender, CommandClickEventArgs e)
    {
    //e.CallerLink getting null after shortcut key pressed
    C1Command menu = e.CallerLink.Command;
    e.CallerLink.OpenSubmenu(true);
    }

    Regards-
    Sanjeeb
  • Replied 11 July 2019, 2:39 pm EST

    Hi Sanjeeb,

    Please continue this thread over here:
    https://www.grapecity.com/forums/winforms-edition/c1commandholder-with-ribbo

    Thanks.
  • Replied 14 August 2019, 11:38 pm EST

    Hi Mam,

    1. How to get Filtered C1FlexGrid Datasource after everytime been filtered by user ?

    2. How to Sort C1FlexGrid By Multi-columns (non-sequential like by 3rd asc, then by 5th desc and then by 1st column desc) at once ?

    3. How to copy any column data to other column like I want to copy 3rd column data to 8th column at once ?

    Regard-
    Sanjeeb
  • Replied 17 August 2019, 2:33 pm EST

    Hello Sirs/Mams,

    Please help me.

    Are these such difficult to do that nobody helping ?

    Regards-
    Sanjeeb
  • Replied 18 August 2019, 2:59 pm EST

    please help anybody ....
  • Replied 18 August 2019, 3:04 pm EST

    Hi Sanjeeb,

    Sorry for the late response.

    1. You can use the AfterFilter event to get the visible rows. The attached sample demonstrates this.

    2. This is not supported. You can use the overloaded Sort method which takes an IComparer object but please note that this can only be used if the grid is in unbound mode.

    3. This cannot be done directly. You would need to copy the column values.

    Regards,
    Jitender

    FilteredDataView.zip
  • Replied 20 August 2019, 4:12 am EST

    Dear Jitendra Sir,

    1. it worked.
    2. Multi-columns (non-sequential like by 3rd asc, then by 5th desc and then by 1st column desc) is highly required by client.

    But IComparer as you say works only for unbound
    and I think IComparer approach is to define for every report individually which is not proper solution.

    Thus, if possible, please guide me the best way to get the result ...

    Regards-
    Sanjeeb



    Regards-
    Sanjeeb
  • Replied 20 August 2019, 7:15 pm EST

    Hi Sanjeeb,

    As FlexGrid has no support for non-sequential multi-sorting, it can only be done manually. I've attached a sample which demonstrates an approach to get what you want.

    The sample uses DataView's Sort property to manually sort the grid programmatically. Also, since the grid only shows the Sort glyph on a single column, we need to draw the sort glyphs manually (either by drawing or using an Image).

    The sample draws an appropriate triangle (similar to the default glyph icon). Please note that this does not take into account any theme applied on the grid. You would need to consider that before using this.

    I hope that helps you get started on this.

    MultiColumnSort.zip

    Regards,
    Jitender
  • Replied 1 September 2019, 3:56 am EST

    Dear Sir/Mam,

    Please help me to get filter options
    for first row if second row is merged
    which is not showing ?

    the below values are already set which works if 2nd row not merged..

    FlxReport.AllowFiltering = true;
    FlxReport.AllowMerging = AllowMergingEnum.FixedOnly;
    FlxReport.Rows[1].AllowMerging = true;


    Regards
    Sanjeeb

  • Replied 1 September 2019, 5:50 pm EST

    Hi Sanjeeb,

    This is by-design. The grid only shows the glyphs on the last fixed row (which in your case is merged, so it cannot show the glyphs for the columns).

    However, you can show the glyphs manually (the approach is similar to the earlier solution of showing sort glyphs for your multi-column sort query).
    Additionally, you can use the EditFilter method (specifying the column index to show the Filter menu for that column) when a mouse click is performed in the glyph area.

    Please refer to the attached sample which shows how you can do this.

    ShowFilterMenu_MergedFixedRow.zip

    Regards,
    Jitender
  • Replied 2 September 2019, 5:54 pm EST

    Dear Jitender Sir,

    Thankx a lot for such a great solution.

    But there is a problem that
    1. after filtered glymph to filtered type
    2. and after clear glymph to be clered which is only being seen
    which is not showing..

    can you please help to solve this issue with filtering as well ?

    Regards-
    Sanjeeb
  • Replied 2 September 2019, 11:29 pm EST

    Hi Sanjeeb,

    Please see the updated sample which takes care of this issue.

    Let us know if you find any other issue with the sample.

    ShowFilterMenu_MergedFixedRow_2.zip

    Thanks,
    Jitender
  • Replied 5 September 2019, 3:51 am EST

    Dear Jitender Sir,

    Thankx a lot.

    you solved my problem.

    if possible please help me here also ...
    https://www.grapecity.com/forums/winforms-edition/c1flexviewer---set-printer#dear-prabhat-sirplease-fin


    regards-
    sanjeeb
  • Replied 8 September 2019, 2:26 pm EST

    Hello,

    Your case has been replied on the link given below :
    https://www.grapecity.com/forums/winforms-edition/c1flexviewer---set-printer#dear-prabhat-sirplease-fin

    Regards,
    Prabhat Sharma.
  • Replied 12 September 2019, 10:07 pm EST

    Dear Please help me on

    1.
    https://www.grapecity.com/forums/winforms-edition/c1flexviewer---set-printer

    2.
    https://www.grapecity.com/forums/winforms-edition/c1report-is-now-obsolete-t#paginate-2

    Regards-
    Sanjeeb
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels