Exemple #1
0
        protected async override Task OnInitializedAsync()
        {
            DataFactory = new TheGridDataFactory <Item>(Columns, this);
            var baseAttributes = new Dictionary <string, object>()
            {
                { "class", TableClass }
            };

            if (UnknownParameters?.ContainsKey("class") == true)
            {
                baseAttributes["class"] = TableClass + " " + UnknownParameters["class"];
                baseAttributes.Union(UnknownParameters.Where(x => x.Key != "class") ?? new Dictionary <string, object>()).ToDictionary(x => x.Key, x => x.Value);
            }

            Attributes = baseAttributes;
            await Update();
        }
Exemple #2
0
        protected override void OnInitialized()
        {
            DataFactory = new TheGridDataFactory <Item>(Columns, this);

            if (Hover)
            {
                TableClass += " table-hover";
            }

            var baseAttributes = new Dictionary <string, object>()
            {
                { "class", TableClass }
            };

            if (UnknownParameters?.ContainsKey("class") == true)
            {
                baseAttributes["class"] = TableClass + " " + UnknownParameters["class"];
                baseAttributes.Union(UnknownParameters.Where(x => x.Key != "class") ?? new Dictionary <string, object>()).ToDictionary(x => x.Key, x => x.Value);
            }

            Attributes = baseAttributes;
        }