@boikom

@boikom

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 776 total)
  • Author
    Posts
  • admin
    Keymaster
    Up
    0
    Down

    Hi Cher Toggy,

    This is a bug in the DataGrid. We added a work item about it. Workaround unfortunately is not available as in order to resolve this, we will need to modify the Grid’s code for handling date filtering in the filtering panel.

    Thank you for the feedback!

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    in reply to: ‘Format’ button not rendered #103248
    admin
    Keymaster
    Up
    0
    Down

    Hi Cher Toggy,

    The format button is displayed only when you have Numeric columns in the Grid.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    in reply to: find a specific row in a grid #103238
    admin
    Keymaster
    Up
    0
    Down

    Hi oliver.aldrian,

    You do not need Grid.Rows. You need Grid.DataSource. In the current version 14 Grid.Rows = Grid.DataSource.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    in reply to: Blazor DataGrid Aggregate lines #103236
    admin
    Keymaster
    Up
    0
    Down

    Hi Oliver,

    The property is called SummaryRow and each column has Summary property.

    Example how to use it:

    @page "/grid"
    
    @using Smart.Blazor.Demos.Data
    @inject WeatherForecastService ForecastService
    
    <Example Name="Grid">
    	<h1>Weather forecast</h1>
    
    	<p>This component demonstrates fetching data from a service.</p>
    
    	@if (forecasts == null)
    	{
    		<p><em>Loading...</em></p>
    	}
    	else
    	{
    		<Grid OnReady="GridReady" SummaryRow="summary" Sorting="@sorting" Appearance="@appearance" Selection="@selection" Style="width: 80%;">
    			<Columns>
    				<Column DataField="Date" Label="Date"></Column>
    				<Column DataField="TemperatureC" Label="TemperatureC"></Column>
    				<Column DataField="TemperatureF" Label="TemperatureF"></Column>
    				<Column Summary="@columnSummary" DataField="Summary" Label="Summary"></Column>
    			</Columns>
    			<Rows>
    				@foreach (var forecast in forecasts)
    				{
    					<Row>
    						<Cell Content="@forecast.Date.ToShortDateString()"></Cell>
    						<Cell Content="@forecast.TemperatureC"></Cell>
    						<Cell Content="@forecast.TemperatureF"></Cell>
    						<Cell Content="@forecast.Summary"></Cell>
    					</Row>
    				}
    			</Rows>
    		</Grid>
    	}
    </Example>
    
    @code {
        string[] columnSummary = new string[] { "count" };
    
    	GridSummaryRow summary = new GridSummaryRow() { Visible = true };
        GridSorting sorting = new GridSorting() { Enabled = true };
        GridAppearance appearance = new GridAppearance() { AlternationCount = 2 };
        GridSelection selection = new GridSelection()
        {
            Enabled = true,
            Mode = GridSelectionMode.Many,
            CheckBoxes = new GridSelectionCheckBoxes()
            {
                Enabled = true
            }
        };
    
        void GridReady(Grid grid)
        {
            var rows = grid.Rows;
            grid.SelectRows(new int[] { 0, 1, 2 });
        }
        private WeatherForecast[] forecasts;
    
        protected override async Task OnInitializedAsync()
        {
            forecasts = await ForecastService.GetForecastAsync(DateTime.Now);
        }
    }

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    in reply to: find a specific row in a grid #103235
    admin
    Keymaster
    Up
    0
    Down

    Hi Oliver,

    SelectRows expects an array of Row ids. The method’s description is Selects multiple rows by their ids. It will not work with row objects i.e. passing List will not work, passing the IDs in a List would be ok.

    Example how to use SelectRows

    @page "/grid"
    
    @using Smart.Blazor.Demos.Data
    @inject WeatherForecastService ForecastService
    
    <Example Name="Grid">
    	<h1>Weather forecast</h1>
    
    	<p>This component demonstrates fetching data from a service.</p>
    
    	@if (forecasts == null)
    	{
    		<p><em>Loading...</em></p>
    	}
    	else
    	{
    		<Grid OnReady="GridReady" SummaryRow="summary" Sorting="@sorting" Appearance="@appearance" Selection="@selection" Style="width: 80%;">
    			<Columns>
    				<Column DataField="Date" Label="Date"></Column>
    				<Column DataField="TemperatureC" Label="TemperatureC"></Column>
    				<Column DataField="TemperatureF" Label="TemperatureF"></Column>
    				<Column Summary="@columnSummary" DataField="Summary" Label="Summary"></Column>
    			</Columns>
    			<Rows>
    				@foreach (var forecast in forecasts)
    				{
    					<Row>
    						<Cell Content="@forecast.Date.ToShortDateString()"></Cell>
    						<Cell Content="@forecast.TemperatureC"></Cell>
    						<Cell Content="@forecast.TemperatureF"></Cell>
    						<Cell Content="@forecast.Summary"></Cell>
    					</Row>
    				}
    			</Rows>
    		</Grid>
    	}
    </Example>
    
    @code {
        string[] columnSummary = new string[] { "count" };
    
    	GridSummaryRow summary = new GridSummaryRow() { Visible = true };
        GridSorting sorting = new GridSorting() { Enabled = true };
        GridAppearance appearance = new GridAppearance() { AlternationCount = 2 };
        GridSelection selection = new GridSelection()
        {
            Enabled = true,
            Mode = GridSelectionMode.Many,
            CheckBoxes = new GridSelectionCheckBoxes()
            {
                Enabled = true
            }
        };
    
        void GridReady(Grid grid)
        {
            var rows = grid.Rows;
            grid.SelectRows(new int[] { 0, 1, 2 });
        }
        private WeatherForecast[] forecasts;
    
        protected override async Task OnInitializedAsync()
        {
            forecasts = await ForecastService.GetForecastAsync(DateTime.Now);
        }
    }

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    in reply to: applyTemplate DropdownList Angular error #103228
    admin
    Keymaster
    Up
    0
    Down

    Hi Àngel,

    We resolved the reported issue in the today’s smart-webcomponents-angular build. You can update your version.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    in reply to: Column CSS class not working #103226
    admin
    Keymaster
    Up
    0
    Down

    Hi mastercs999,

    There is an issue with the ClassName and CellsClassName properties. We will do our best to resolve it for the next patch release of Smart.Blazor.

    You can use the following as a workaround:

    smart-grid-column[data-field="FirstName"] { 
      // your CSS goes here.
    }

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    in reply to: Browser Context Menu surpression on DataGrid #103222
    admin
    Keymaster
    Up
    0
    Down

    Hi oliver.aldrian,

    We tested this and we confirm that this is a bug. We will add a work item for this and it will be resolved in the next version of the blazor grid.

    Thanks for the feedback!

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    admin
    Keymaster
    Up
    0
    Down

    Hi Pavan,

    The query builder uses smart-input internally. In smart-input, the auto-complete logic displays results matching a query and the maximum number of items is determined by the smart-input’s items property which defaults to 8. If you want to change the behavior of the query builder, you can make queryBuilder.querySelectorAll(‘smart-input’), loop through the found elements and update the “items” property to a value which you need.

    Hope this helps.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    in reply to: applyTemplate DropdownList Angular error #103220
    admin
    Keymaster
    Up
    0
    Down

    Hi Angel,

    I checked our support mail and could not find an email by you. If it is more convenient, you can also share a small stackblitz example which uses dummy data and just shows an issue. That will be enough for us.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    in reply to: Multi column header #103219
    admin
    Keymaster
    Up
    0
    Down

    Hi Ali,

    Multi column header is demonstrated in our Grid Overview example – https://www.htmlelements.com/blazor/blazor-ui/demos/blazor-grid?id=overview

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    in reply to: don't work a wrap for virtual Tree-grid #103218
    admin
    Keymaster
    Up
    0
    Down

    Hi Oleg,

    The reported issues are already resolved in the current version.

    Example:

    
    function GetData() {
        const data = new Array();
        const generatekey = function () {
            const S4 = function () {
                return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
            };
            return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
        };
        for (let i = 0; i < 100; i++) {
            const row = {};
            const tasks = ["Shopping", "Housewares", "Kitchen supplies", "Groceries", "Cleaning supplies", "Office supplies", "Remodeling", "Paint bedroom", "Paint wall", "Fitness", "Decorate living room",
                "Fix lights", "Fix front door", "Clean kitchen"];
            const firstNames = [
                "Andrew", "Nancy", "Shelley", "Regina", "Yoshi", "Antoni", "Mayumi", "Ian", "Peter", "Lars", "Petra", "Martin", "Sven", "Elio", "Beate", "Cheryl", "Michael", "Guylene"
            ];
            const lastNames = [
                "Fuller", "Davolio", "Burke", "Murphy", "Nagase", "Saavedra", "Ohno", "Devling", "Wilson", "Peterson", "Winkler", "Bein", "Petersen", "Rossi", "Vileid", "Saylor", "Bjorn", "Nodier"
            ];
            const taskindex = Math.floor(Math.random() * tasks.length);
            row["id"] = generatekey();
            row["firstname"] = firstNames[Math.floor(Math.random() * firstNames.length)];
            row["lastname"] = lastNames[Math.floor(Math.random() * lastNames.length)];
            row["name"] = row["firstname"] + " " + row["lastname"];
            row["task"] = tasks[taskindex];
            row["duration"] = 1 + Math.floor(Math.random() * 10);
            data.push(row);
        }
        return data;
    }
    Smart('#grid', class {
        get properties() {
            return {
                dataSource: new Smart.DataAdapter({
                    virtualDataSourceLength: 20,
                    virtualDataSourceCache: true,
                    virtualDataSourceOnExpand: function (resultCallbackFunction, details) {
                        setTimeout(function () {
                            const data = GetData().slice(0, 3);
                            if (details.row.level === 1) {
                                for (let i = 0; i < data.length; i++) {
                                    data[i].leaf = true;
                                }
                                resultCallbackFunction({
                                    dataSource: data
                                });
                            }
                            else {
                                resultCallbackFunction({
                                    dataSource: data
                                });
                            }
                        }, 300);
                    },
                    virtualDataSource: function (resultCallbackFunction, details) {
                        setTimeout(function () {
                            resultCallbackFunction({
                                dataSource: GetData().slice(0, 20)
                            });
                        }, 300);
                    },
                    id: 'id',
                    dataFields: [
                        'id: string',
                        'name: string',
                        'duration: number',
                        'task: string'
                    ]
                }),
                layout: {
                    rowHeight: 'auto',
                    allowCellsWrap: true
                },
                behavior: { columnResizeMode: 'growAndShrink' },
                columns: [
                    { label: 'Task', dataField: "task", align: 'center', width: 300 },
                    { label: 'Person Name', dataField: "name", cellsAlign: 'center', align: 'center', width: 300 },
                    {
                        label: 'Duration', dataField: "duration", cellsAlign: 'center', align: 'center', formatFunction: function (row, column, value) {
                            const hour = value > 1 ? " hours" : " hour";
                            return value + hour;
                        }
                    }
                ]
            };
        }
    });

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    in reply to: initialize grid with empty dataSource #103205
    admin
    Keymaster
    Up
    0
    Down

    Hi Dark Beccio,

    Thanks, we will take a look. Grazie.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    in reply to: applyTemplate DropdownList Angular error #103204
    admin
    Keymaster
    Up
    0
    Down

    Hi Angel,

    Could you share stackblitz sample as it seems you’re using a combination of components like toast, grid, dropdownlist and it is not easy to reproduce this?

    For example, you can modify and share this sample https://stackblitz.com/github/htmlelements/smart-webcomponents-angular/tree/master/demos/dropdownlist/basic/?file=src%2Fapp%2Fapp.component.ts

    Looking forward to your reply.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    in reply to: Problem with carousel #103189
    admin
    Keymaster
    Up
    0
    Down

    Hi Joseph,

    There is some misunderstanding here. All the code samples are runnable as is. We shared a code sample in codesandbox without errors so we do not understand what is different in our environment and yours. In fact the ListItem has value attribute and all components have theme attribute, too. Sorry to learn that your evaluation is not going well.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

Viewing 15 posts - 1 through 15 (of 776 total)