alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class DataUtil

    Provides utility method used by data manager.

    Inheritance
    object
    DataUtil
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.Data
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public static class DataUtil

    Methods

    GetDynamicValue(DynamicObject, string)

    Gets the property value from the DynamicObject.

    Declaration
    public static object GetDynamicValue(DynamicObject obj, string name)
    Parameters
    Type Name Description
    DynamicObject obj

    Input dynamic object.

    string name

    Property name to get.

    Returns
    Type Description
    object

    object.

    GetExpandoValue(IDictionary<string, object>, string)

    Gets the property value from the ExpandoObject.

    Declaration
    public static object GetExpandoValue(IDictionary<string, object> obj, string name)
    Parameters
    Type Name Description
    IDictionary<string, object> obj

    Input Expando object.

    string name

    Property name to get.

    Returns
    Type Description
    object

    object.

    GetFormattedValue(object, string)

    Formats the given value.

    Declaration
    public static string GetFormattedValue(object value, string format)
    Parameters
    Type Name Description
    object value

    Value to be formatted.

    string format

    Format string.

    Returns
    Type Description
    string

    string.

    GetGroupValue(string, object)

    Gets the property value from object.

    Declaration
    public static object GetGroupValue(string nameSpace, object from)
    Parameters
    Type Name Description
    string nameSpace

    Property name to be accessed.

    object from

    Source object.

    Returns
    Type Description
    object

    object - property value.

    GetKeyValue(string, object)

    Gets the property value with the given key.

    Declaration
    public static string GetKeyValue(string key, object value)
    Parameters
    Type Name Description
    string key

    Property name.

    object value

    Source object.

    Returns
    Type Description
    string

    string.

    GetObject(string, object)

    Gets the property value from object.

    Declaration
    public static object GetObject(string nameSpace, object from)
    Parameters
    Type Name Description
    string nameSpace

    Property name to be accessed.

    object from

    Source object.

    Returns
    Type Description
    object

    object - property value.

    Remarks

    For accessing complex/nested property value, given the nameSpace with field names delimited by dot(.).

    GetUrl(string, string, string)

    Resolves the given base url and relative url to generate absolute url. And merge query string if any.

    Declaration
    public static string GetUrl(string baseUrl, string relativeUrl, string queryParams = null)
    Parameters
    Type Name Description
    string baseUrl

    Base address url.

    string relativeUrl

    Relative url.

    string queryParams

    Query string.

    Returns
    Type Description
    string

    string - absolute url.

    GetVal(IEnumerable, int, string)

    Gets the property value from list of object.

    Declaration
    public static object GetVal(IEnumerable jsonData, int index, string field)
    Parameters
    Type Name Description
    IEnumerable jsonData

    List of object.

    int index

    Index of the item to be processed.

    string field

    Property name to get value.

    Returns
    Type Description
    object

    object.

    GroupSorting<T>(IEnumerable, List<Sort>)

    Sorts the grouped data source based on the specified sort descriptors and returns the sorted records, when the EnableLazyLoading property is set to true.

    Declaration
    public static IEnumerable GroupSorting<T>(IEnumerable dataSource, List<Sort> sortedColumns)
    Parameters
    Type Name Description
    IEnumerable dataSource

    Data source to be sorted.

    List<Sort> sortedColumns

    List of sort criteria.

    Returns
    Type Description
    IEnumerable

    IEnumerable - sorted records.

    Type Parameters
    Name
    T

    Group<T>(IEnumerable, string, List<Aggregate>, int, IDictionary<string, string>, bool, bool)

    Groups the given data source with the field name.

    Declaration
    public static IEnumerable Group<T>(IEnumerable jsonArray, string field, List<Aggregate> aggregates, int level, IDictionary<string, string> format, bool isLazyLoad = false, bool isLazyGroupExpandAll = false)
    Parameters
    Type Name Description
    IEnumerable jsonArray

    Input data source.

    string field

    Specifies the group by field name.

    List<Aggregate> aggregates

    Aggregate details to aggregate grouped records.

    int level

    Level of the group. For parent group it is 0.

    IDictionary<string, string> format

    Specifies the format and handler method to perform group by format.

    bool isLazyLoad

    Specifies the isLazyLoad property as true to handle lazy load grouping.

    bool isLazyGroupExpandAll

    Specifies the isLazyGroupExpandAll as true to perform expand all for lazy load grouping.

    Returns
    Type Description
    IEnumerable

    IEnumerable - Grouped record.

    Type Parameters
    Name Description
    T

    Type of the data source elements.

    PerformAggregation(IEnumerable, List<Aggregate>)

    Performs aggregation on the given data source.

    Declaration
    public static IDictionary<string, object> PerformAggregation(IEnumerable jsonData, List<Aggregate> aggregates)
    Parameters
    Type Name Description
    IEnumerable jsonData

    Input data source.

    List<Aggregate> aggregates

    List of aggregate to be calculated.

    Returns
    Type Description
    IDictionary<string, object>

    Dictionary of aggregate results.

    Result<T>(object[], bool, List<Aggregate>, Group<T>)

    Declaration
    public static IEnumerable Result<T>(object[] jsonData, bool isLazyLoad, List<Aggregate> aggregates, Group<T> groupedArray)
    Parameters
    Type Name Description
    object[] jsonData
    bool isLazyLoad
    List<Aggregate> aggregates
    Group<T> groupedArray
    Returns
    Type
    IEnumerable
    Type Parameters
    Name
    T

    ToQueryParams(IDictionary<string, object>)

    Converts dictionary of key/value pair to query string.

    Declaration
    public static string ToQueryParams(IDictionary<string, object> Params)
    Parameters
    Type Name Description
    IDictionary<string, object> Params

    Input dictionary value.

    Returns
    Type Description
    string

    string - Query string.

    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved