@turricande

@turricande

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • in reply to: Column.AllowExport has no effect (Blazor) #102880
    TurricanDE
    Participant
    Up
    0
    Down

    Hello,

    I can confirm it works now. Thank you!

     

    in reply to: OnFilter Event (Blazor) #102619
    TurricanDE
    Participant
    Up
    0
    Down

    Hello Yavor,

    Thank you for your reply.

    Where can I find all other phrases it seems the documentation is outdated?

    “notcontains” “startswith” and so on…

    Another problem I ran into:

    I use often to change dynamically a column set in the grid. Let’s say I have 3 different sets:

    Set 1 : Column A (with a “contains” filter), Column B, Column C
    Set 2: Column A, Column B (with a “contains” filter), Column C, Column D
    Set 3: Column A, Column B, Column C, Column D, Column E (no filters are set in any column)

    They more I switch between a set with a filter, they more this slows down the grid (every switch is +1 sec slower or so) , a switch to a column set without a filter is immediatley responsive.

    I use the Grid.ClearFilter() method before I set the next columns.

     

     

    in reply to: OnFilter Event (Blazor) #102614
    TurricanDE
    Participant
    Up
    0
    Down

    Hello Yavor,

    Yes I’ve seen this before, I already set the string conditions like you suggested.

    But when I collect the filter string in the Event then the string looks like

    “CONTAINS abc” or “DOES_NOT_CONTAIN abc” and so on…

    But what has the filter string exactly looks like for every condition if we set this collected filter string programmatically somewhere else?

    It works when I set “contains abc”.

    But not if I set “does_not_contain abc” etc. (I user lower case)

    The hamburger menu is gone and the grid didn’t respond anymore.

    I use the Grid Filtering.Filter property like this:

    List<IEnumerable<string>> Filter = new List<IEnumerable<string>>()
    {
    new List<string> { “FirstName”, “contains Andrew” } // => works

    };

    or

    List<IEnumerable<string>> Filter = new List<IEnumerable<string>>()
    {
    new List<string> { “FirstName”, “does_not_contain Andrew” } // => doesn’t work
    };

    MyGrid.Filtering.Filter = filter

    I thought the conditions have to be like as in the documentation:

    https://www.htmlelements.com/docs/grid-filtering-sorting/

    I tried this:

    List<IEnumerable<string>> Filter = new List<IEnumerable<string>>()
    {
    new List<string> { “FirstName”, “startswith Paul” }

    // => the filter is working, but the filter column panel shows me “equal” instead of “starts with” for   the first condition
    };

     

     

     

    • This reply was modified 1 year ago by TurricanDE.
    • This reply was modified 1 year ago by TurricanDE.
    in reply to: OnFilter Event (Blazor) #102602
    TurricanDE
    Participant
    Up
    0
    Down

    Hello Yavor,

    Thank you so much for the example. It is the right direction

    But the example will only work for “contains <sometext>” when you set the filter programmatically. For example “does_not_contains <sometext>” and the others string conditions doesn’ work ( I guess the filter conditions must have other names).

    I found in the Grid API documentation the supported filter conditions :

    https://www.htmlelements.com/docs/grid-filtering-sorting/

    But I’ve tried to set the condition like “notcontains <sometext>” but the filter panel shows me “startsWith” ?

    When I set the filter condition like “startswith <sometext>” the filter panel shows me “equal”?

    What I am doing wrong?

     

     

    in reply to: OnFilter Event (Blazor) #102592
    TurricanDE
    Participant
    Up
    0
    Down

    Hello Yavor,

    Thank you for the example.

    filterEventDetail.Data[0].dataField is exactly what I needed, but

    filterEventDetail.Data[0].filter.filters[0] gives me an Object and not the filter phrase as a string.

    In the debugger I can’t see how to get easily the filter string from this Object.

    Any advice?

    TurricanDE
    Participant
    Up
    0
    Down

    I don’t think it is a dependency problem. I use the current Smart.Blazor 10.2.2.

    As I mentioned, if the ListBox is outside the Window component the selection works like that:

    <h3>ChildComponent</h3>

    <ListBox DataSource=”@myData” SelectedValues=”@selectedValues” Editable=true>
    </ListBox> // Selection works!

    <Window IsOpened=”@OpenDialog” Label=”Test” Modal=true HeaderButtons=”@headerButtons” OnClose=”Closed”>
    <ListBox DataSource=”@myData” SelectedValues=”@selectedValues” Editable=true>
    </ListBox> // Selection not working!
    </Window>

    The “outside” listbox renders (Item 2 and 3)

    <smart-list-item blazor-state-mode=”none” smart-blazor=”” id=”Smart0HMDEDNV87HFN” class=”smart-element smart-list-item” _bl_703cf334-ed07-4727-84a1-38adbe515b0e=”” value=”2″ label=”2″ role=”option” <span style=”text-decoration: underline;”>selected=”” aria-selected=”true”</span>>

    <smart-list-item blazor-state-mode=”none” smart-blazor=”” id=”Smart0HMDEDNV87HFO” class=”smart-element smart-list-item” _bl_c2bb693a-fb93-447a-bed9-fd54d7765e4a=”” value=”3″ label=”3″ role=”option” focus=””<span style=”text-decoration: underline;”> selected=”” aria-selected=”true”</span>>

    But the Listbox inside the Window component renders:

    <smart-list-item blazor-state-mode=”none” smart-blazor=”” id=”Smart0HMDEDNV87HG5″ class=”smart-element smart-list-item” _bl_8e88a510-7f47-4889-9811-dae64596f970=”” value=”2″ label=”2″ role=”option” <span style=”text-decoration: underline;”>aria-selected=”false”</span>>

    <smart-list-item blazor-state-mode=”none” smart-blazor=”” id=”Smart0HMDEDNV87HG6″ class=”smart-element smart-list-item” _bl_f8b55511-a6b5-4600-962a-75390155e7b6=”” value=”3″ label=”3″ role=”option” focus=”” <span style=”text-decoration: underline;”>aria-selected=”false”</span>>

    How could that be? There is no additional logic in the component, I posted the full example above (ParentComponent/ChildComponent)

    I have no idea…

    in reply to: Set items read only (from data source) (Blazor) #102587
    TurricanDE
    Participant
    Up
    0
    Down

    Oh yes, I missed to set the label explicitly for the ListItem. Now it is working as expected.

    Great! Thank you!

     

    in reply to: Insert, Update, Remove methods doesn’t work (Blazor) #102586
    TurricanDE
    Participant
    Up
    0
    Down

    This is great. That is not that far, thank you!

    in reply to: Selection (visually) get lost after editing (Blazor) #102576
    TurricanDE
    Participant
    Up
    0
    Down

    Hello,

    I also couldn’t reproduce the issue again. The selection is visually shown after editing. Don’t know what causes the issue.

     

    in reply to: Set items read only (from data source) (Blazor) #102575
    TurricanDE
    Participant
    Up
    0
    Down

    Hello,

    Thank you for your example.

    I thought this could be done with the same property names in the data source as the ListItem have?

    “The dataSource can be an array of strings/numbers or objects where the attributes represent the properties of a List Item. For example labelvaluegroup”

    With your example, the item is read only now. But what happens now is when you double click an item for editing, the input field

    as some weird spaces before the text of the item then another few spaces and than the edit cursor? This will not happen if you only bind with the datasource, the edit cursor is right after the text without any spaces.

    Could you check your example, when you add Editable=true to the Listbox?

    in reply to: Insert, Update, Remove methods doesn’t work (Blazor) #102574
    TurricanDE
    Participant
    Up
    0
    Down

    Is there any release date for the next version for Blazor? I use the smart components in productive code, so at the moment it is a show stopper for me.

    And I have to replace some smart components (which I do not want) if the fix takes to long.

     

    TurricanDE
    Participant
    Up
    0
    Down

    Thank you for the example. The example is working but unfortunately in my case it is not

    and I can’t figured it out why the initial selection is not working:

    Here is my code example:

    I have the following parent component:

    <h3>ParentComponent</h3>

    <Button id=”openButton” OnClick=”OnClick”>Open/Close</Button>

    <ChildComponent OpenDialog=”@opened” OnClosed=”OnClosed” >

    </ChildComponent>

    @code
    {
    private bool opened = false;

    private void OnClick()
    {
    opened = !opened;
    }

    private void OnClosed()
    {
    opened = false;
    }
    }

    And the child component is:

    <h3>ChildComponent</h3>

    <Window IsOpened=”@OpenDialog” Label=”Test” Modal=true HeaderButtons=”@headerButtons” OnClose=”Closed”>
    <ListBox DataSource=”@myData” SelectedValues=”@selectedValues” Editable=true>
    </ListBox>
    </Window>

    @code {

    [Parameter]
    public bool OpenDialog { get; set; } = false;

    [Parameter]
    public EventCallback OnClosed { get; set; }

    private string[] myData = new string[] { “1”, “2”, “3” };
    private string[] selectedValues = new string[] { “2”, “3” };
    private string[] headerButtons = new string[] { “close” };

    private async Task Closed(Event ev)
    {
    await OnClosed.InvokeAsync();
    }
    }

     

    in reply to: Dynamic columns (Blazor) #102537
    TurricanDE
    Participant
    Up
    0
    Down

    Hi there,

    Do you have found something about it? Setting the sorting and filter features works fine, but as I mentioned adding/removing new columns

    with forcing it with

    grid.Columns = new List<GridColumn>() { }

    results in loosing sort and filter symbols

    in reply to: Dynamic columns (Blazor) #102522
    TurricanDE
    Participant
    Up
    0
    Down

    For a better illustration use this:

    GridSorting sorting = new GridSorting { Enabled = true, Mode = GridSortingMode.Many};

    in reply to: Dynamic columns (Blazor) #102520
    TurricanDE
    Participant
    Up
    0
    Down

    Thanks for the example it works in my use case. Now the new added columns show the data. Great!

    There is one issue left, could you investigate why this line is necessary:

     

    grid.Columns = new List<GridColumn>() { }; //TODO: remove

     

    Without this line, the columns never change. But we bind the columns property

    <Grid DataSourceSettings=”DataSettings” @ref=”grid” DataSource=”dataRecords” Columns=”@columns”></Grid>

    So this should actually trigger to set the new columns when the property changed?

    I do not understand this (you commented it as removal, may this is a workaround)

    grid.Columns = new List<GridColumn>() { }; //TODO: remove

    It has side effects.

    The columns are changed but you lost the symbols in the header (Sort, Filter etc.)

     

    For example:

    <Grid @ref=”grid” DataSource=”dataRecords” Columns=”@columns” Sorting=”@sorting”></Grid>

    GridSorting sorting = new GridSorting { Enabled = true };

    private void AddColumn()
    {

    GridColumn newColumn = new GridColumn(){ Label = columnsList[i], DataField = columnsList[i], SortOrder = GridColumnSortOrder.Desc };
    columns.Add(newColumn);

    grid.Columns = new List<GridColumn>() { }; //TODO: remove

    }

    The sort order symbols get lost here (also sort symbols on existing columns)

     

     

     

     

     

     

     

    • This reply was modified 1 year ago by TurricanDE.
Viewing 15 posts - 1 through 15 (of 22 total)