Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #102243
    xyzzy
    Member

    Looks like a bug in the Grid.
     
    The OnRowClick and OnCellClick both throw the following exception when I click on a row:
     
    Unhandled Exception:
    Newtonsoft.Json.JsonReaderException: Input string ‘398.5714416503906’ is not a valid integer. Path ‘pageX’, line 1, position 23394.
    at Newtonsoft.Json.JsonTextReader.ParseReadNumber(ReadType readType, Char firstChar, Int32 initialPosition)
    at Newtonsoft.Json.JsonTextReader.ParseNumber(ReadType readType)
    at Newtonsoft.Json.JsonTextReader.ReadNumberValue(ReadType readType)
    at Newtonsoft.Json.JsonTextReader.ReadAsInt32()
    at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
    at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
    at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
    at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
    at Newtonsoft.Json.JsonConvert.DeserializeObject[GridRowClickEventDetail](String value, JsonSerializerSettings settings)
    at Newtonsoft.Json.JsonConvert.DeserializeObject[GridRowClickEventDetail](String value)
    at Smart.Blazor.Grid.RowClickHandler(String args)
    at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_1(Object state)
    at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
    at System.Threading.ThreadPoolWorkQueue.Dispatch()
    at System.Threading.ThreadPool.Callback()
    ThreadPool Callback threw an unhandled exception of type Newtonsoft.Json.JsonReaderException
     
    Given this:
    <template id=”colourTemplate”>
    <div style=”width: 100%; height:100%;”>
    <!– Note: this shows a few designer errors but works–>
    <div style=”background:{{value}};”>&nbsp;</div>
    </div>
    </template>
    <Grid @ref=”cdfGrid1″ OnRowClick=@cdf_OnRowClick DataSource=@dsColourDifference Appearance=@appearance>
    <Columns>
    <Column DataField=”illuminant” Label=”Illuminant”></Column>
    <Column DataField=”observer” Label=”Observer”></Column>
    <Column DataField=”primary” Label=”Primary”></Column>
    <Column DataField=”textile” Label=”Textile”></Column>
    <Column DataField=”source1″ Label=”Source1″></Column>
    <Column DataField=”notation1″ Label=”Sample1″></Column>
    <Column DataField=”source2″ Label=”Source2″></Column>
    <Column DataField=”notation2″ Label=”Sample2″></Column>
    <Column DataField=”sample1″ Label=”Colour1″ Template=”@colourTemplate”></Column>
    <Column DataField=”sample2″ Label=”Colour2″ Template=”@colourTemplate”></Column>
    <Column Visible=@CIE94 DataField=”CIE94″ Label=”CIE 94″></Column>
    <Column Visible=@CIED2000 DataField=”CIED2000″ Label=”CIE D2000″></Column>
    <Column Visible=@CIELab DataField=”CIELab” Label=”CIELab”></Column>
    <Column Visible=@CIELuv DataField=”CIELuv” Label=”CIELuv”></Column>
    <Column Visible=@CMC DataField=”CMC” Label=”CMC(l:c)”></Column>
    <Column Visible=@DIN99 DataField=”DIN99″ Label=”DIN99″></Column>
    <Column Visible=@FMC1 DataField=”FMC1″ Label=”FMC1″></Column>
    <Column Visible=@FMC2 DataField=”FMC2″ Label=”FMC2″></Column>
    <Column Visible=@HunterLab DataField=”HunterLab” Label=”HunterLab”></Column>
    <Column DataField=”Status” Label=”Status”></Column>
    </Columns>
    </Grid>
     
     

    #102249
    YavorDashev
    Member

    Hi xyzzy,
    I wasn’t able to reproduce the issue as you do, that is why I would like to ask for a code example which reproduces the error that you are having so that we can evaluate your use case.
    Please, do not hesitate to contact us if you have any additional questions.
    Best regards,
    Yavor Dashev
    Smart UI Team
    https://www.htmlelements.com/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.