Queries |
Details | |
The worksheets is created dynamically and Each time Image logo is added and data is appended.
As it running for 800+ records , execution is timing out. (It's going upto 4 Minutes)
Without image embedding, it finishes in 30-60 seconds for the same data and number of records.
Can we add image only once using AddPicture method and use it or copy it at multiple locations using Indices. (Exact location where to copy will be available) ?
This is to improve performance. Or is there any other way add logo images so that performance is not affected drastically.
PFA of code file required.
Attachment: Data_c03ecf88.zip |
We are not facing performance issue while adding pictures multiple times. We have prepared sample for adding pictures as per your scenario and it gets added in few seconds. Please find the sample for the same from following link.
So, please get back to us with below details to validate further from our side.
| |
How to display custom text in grid column based on Column value ?
eg. IsTestRun is boolean column.
If it is true display Yes , and No if false.
How do we specify column type is boolean and add custom text for it ?
col.Field(p => p.IsTestRun).HeaderText("IsTestRun").Type("bool").TextAlign(TextAlign.Left).Add();
|
We can achieve your requirement using the ValueAccessor property of Grid.
Here we have modify the “Verified” column value into Yes/No based on those column value.
| |
How to format date display ?
Eg. Startzeit is of string datatype and has date value.
How to format it look like as below ?
How to handle check for null values? If Null display NA
col.Field(p => p.Startzeit).HeaderText("Startzeit").Format("{0:dd/MM/yyyy }").TextAlign(TextAlign.Left).Add();
|
We can achieve your requirement using the Format property of Grid.
Here, we have set the customized format for “OrderDate” column in Grid.
Refer the help documentation.
We have prepared a sample with the solution of both the queries and it can be downloadable from the below location.
|
1. Performance issue:
2. Formatting Queries: Both of the answers for the below queries do not
seem to be working. (Used version EJ and not EJS).
Queries |
Details | |
Performance issue:
|
We are unable to reproduce the issue with the shared details. Shared image is added 800 times in the worksheet within 10 seconds. We request you to share the issue reproducing runnable sample which will be helpful for us to analyse performance issue from our side. | |
Formatting Queries: Both of the answers for the below queries do not seem to be working. (Used version EJ and not EJS).
- Had already tried Format property which seems to be not working.
-ValueAccessor looks like not available in EJ. |
We can display the custom text using the QueryCellInfo event of ejGrid and by defining the format with type in column definition we can show value with desire format. Refer the below code example,
Output:
|
Please find the details below.
Queries | Details |
1. QueryCellInfo - This seems to be working.
| We are glad that the issue is resolved at your end. |
2. Date Formatting - Still, it seems to be not working.
| We need some more additional details to find the cause of the issue. Share us the following details.
1. Complete Grid code example. 2. How do you have bind dataSource for the string datatype date value(Date column). Share your example value. 3. Share Screenshot of the issue. 4. Share us the simple Demo with duplicate values to replicate your issue. |
3. Performance Issue - PFA of running code snippet.
| We are able to reproduce the issue with the shared sample and validating it currently. We will update further details by 4thSeptember 2019. |
Regards,
Abirami