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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridDataControl

Thread ID:

Created:

Updated:

Platform:

Replies:

109172 Jun 1,2013 05:16 PM UTC Jun 6,2013 09:41 AM UTC WPF 1
loading
Tags: GridControl
Abdalla Nayer
Asked On June 1, 2013 05:16 PM UTC

I have two issues:
1-How to assign a dynamic resource from code-behind for visible columns ?i cannot find the appropriate method like SetResourceReference() for example

2-How to make bindings from code-behind for visible columns different dependency properties ? i cannot find the appropriate method like SetBinding() for example

Thank You


Rajasekar G [Syncfusion]
Replied On June 6, 2013 09:41 AM UTC

Hi Abdalla,

 

Thank you for your interest in Syncfusion products.

 

Query

Syncfusion Comments

1-How to assign a dynamic resource from code-behind for visible columns ?i cannot find the appropriate method like SetResourceReference() for example

We are not able to use SetResourceReference() to visible column but you can  apply style to visible column in code behind using resource key like below code snippet.

 

Code snippet[C#]:

this.SyncGrid.VisibleColumns["CustomerID"].ColumnStyle = (GridDataColumnStyle)this.Resources["ColumnStyle"];

//Here CustomerID is the MappingName of GridDataVisibleColumn

2-How to make bindings from code-behind for visible columns different dependency properties ? i cannot find the appropriate method like SetBinding() for example

We have analyzed your query and you can bind the HeaderText in code behind as below the code snippet.

Code snippet[C#]:

GridDataVisibleColumn column = new GridDataVisibleColumn();

column.Binding = new Binding("Quantity");

Binding bind = new Binding

{

     ElementName = "Combo",

     Path = new PropertyPath("Text")

};

BindingOperations.SetBinding(column, GridDataVisibleColumn.HeaderTextProperty, bind);

 

We have prepared the sample based on your requirement and please find the sample under the following location.

Sample: Binding.zip

 

 

Please let us know if you have any questions.

 

Regards,

Rajasekar


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;