- Home
- Forum
- Xamarin.Forms
- Using Converter with Columns
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
SIGN IN To post a reply.
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.
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.
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.
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.
Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/SampleDemo680279867_(1)-1303917279.zip
Regards,
Suja
SIGN IN To post a reply.
- 5 Replies
- 4 Participants
-
JB Jens Bohrmann
- Mar 17, 2016 11:53 AM UTC
- Jan 5, 2022 02:02 PM UTC