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
close icon

Text GridDataVisibleColumn

Hi all,
How can I create a Text GridDataVisibleColumn programmaticaly?

Best

Francisco


5 Replies

JJ Jawahar Jeevanandan J Syncfusion Team November 2, 2011 10:05 AM UTC

Hi Francisco,

Thanks for using Syncfusion Products.

You can achieve your requirement using the following codes.

Code snippet [C#]:

gridDataControl1.VisibleColumns.Add(new GridDataVisibleColumn() { MappingName = "Name", HeaderText = "Employee Name" });
gridDataControl1.VisibleColumns.Add(new GridDataVisibleColumn() { MappingName = "ID", HeaderText = "Employee ID" });

We have prepared a sample based on this and you can find the sample under the following location.

Sample : http://www.syncfusion.com/downloads/Support/DirectTrac/86591/VisibleColumn902495389.zip

Please let us know if this helps.

Thanks,
Jawahar.



FR Francisco November 2, 2011 02:26 PM UTC

OK, it's working thanks!



JJ Jawahar Jeevanandan J Syncfusion Team November 3, 2011 04:33 AM UTC

Hi Francisco,

Thanks for your update. Also, please let us know if you would require any assistance on this.

Thanks,
Jawahar.



FR Fredrik Remaeus February 14, 2012 11:59 AM UTC

Is it possible to bind several columns to the same value in the viewmodel and then useing a converter like this:

ValueConverter="{StaticResource mdlMethodPositionContentConverter}"
ValueConverterParameter="0" HeaderText="Needle 1" IsReadOnly="True" Width="Auto" >










I always get the first columns valueparameter to my converter.

regards F




RA Rajasekar Syncfusion Team February 15, 2012 09:26 AM UTC

Hi Fredrik,

Thank you for your update.

We have checked with your requirement and we have found that, you are trying to bind the Complex objects in the same and different column. Yes, you can achieve this by using DataTemplates and binding the mapping name like this Name.FirstName, we have prepared the similar sample based on this and please find the sample in the below location,

Sample: http://www.syncfusion.com/downloads/Support/DirectTrac/89835/SyncfusionGDC-1023203038.zip

Note: The similar query is posted in the incident # 90879, so we request you to update your queries in that respective incident for the better follow up.

Please let us know if you have any queries.

Thanks,
Rajasekar



Loader.
Live Chat Icon For mobile
Up arrow icon