We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Using Converter with Columns

Hi,

I have a DataGrid populated by a sylite database. The data is displayed correctly.
I have the proble, that one of my columns contains GUIDs that are very long.
In other parts of my app I use a converter to shorten the GUID-string.
Is it possible to use Converters for grid-columns?
I checked auto generated columns and I tried GridTextColumns.
But I did not find a way to use a Converter.

Thanks

Jens

5 Replies

SL Sathya Lakshmanan Syncfusion Team March 18, 2016 05:42 PM UTC

Hi Jens,

Thank you for contacting Syncfusion support.

We have analyzed your requirement. Yes, is it possible to use converters for a GridColumn. Your requirement can be achieved by using the DisplayBinding property of a GridColumn and writing a converter for the Binding of the column. You will get the cell value as an argument in the converter and you can return the value to be displayed in the cell as per your requirement.

For your reference, we have prepared a sample based on your requirement in which we have returned only the first name of the UserName column it the cell value exceeds 12 characters. You can download the sample from the below link and modify it based on your requirements.

Sample link: http://www.syncfusion.com/downloads/support/directtrac/123438/ze/SampleDemo680279867

Regards,
Sathya.



SL Sathya Lakshmanan Syncfusion Team March 18, 2016 05:44 PM UTC

Hi Jens,

Thank you for contacting Syncfusion support.

We have analyzed your requirement. Yes, is it possible to use converters for a GridColumn.Your requirement can be achieved by using the DisplayBinding property of a GridColumn and writing a converter for the Binding of the column. You will get the cell value as an argument in the converter and you can return the value to be displayed in the cell as per your requirement.

For your reference, we have prepared a sample based on your requirement in which we have returned only the first name of the UserName column it the cell value exceeds 12 characters. You can download the sample from the below link and modify it based on your requirements.

Sample link: http://www.syncfusion.com/downloads/support/directtrac/123438/ze/SampleDemo680279867

Regards,
Sathya.



AH Amir H replied to Sathya Lakshmanan January 2, 2022 03:27 AM UTC

Hi,


Could you please check the link?


I have the license but it says my account is not accociated with this download 




SV Suja Venkatesan Syncfusion Team January 3, 2022 01:43 PM UTC

Hi Amir, 

Currently, we are validating the reported issue in our end. We will update you the further details on or before January 5, 2022. We appreciate your patience until then. 

Regards, 
Suja 



SV Suja Venkatesan Syncfusion Team January 5, 2022 02:02 PM UTC

Hi Amir, 

We have attached a modified download link for the above sample. Please check with the below sample link whether you are able to download it, if not please revert us with more details about your issue. 


Regards, 
Suja 


Loader.
Up arrow icon