Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
640
How do I set the cursor on the first column filter after loading the datagrid?
posted

Hi,

I have a question thats bothering me.

Can you tell me how to set the cursor on the first column filter after loading the datagrid?

 

Thanks!

Patrick

  • 138253
    Offline posted

    Hello Patrick,

     

    Thank you for your post. I have been looking into it and I suggest you create a Style for the DataRecordPresenter and add EventSetter for the Loaded event like this:

    <Style TargetType="{x:Type igDP:DataRecordPresenter}">
        <EventSetter Event="Loaded" Handler="DRPLoaded"/>
    </Style>
    

     

    And add the following code in the handler:

    if ((sender as DataRecordPresenter).IsFilterRecord)
    {
        CellValuePresenter.FromCell(((sender as DataRecordPresenter).Record as DataRecord).Cells[0]).StartEditMode();                
    }
    

     

    Please let me know if this helps you or you need further assistance on this matter.

     

    Looking forward for your reply.

  • 138253
    Offline posted

    Hello Patrick,

     

    I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.