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

Unbound mode

Hello,

I would like to know which grid control is best for use in unbound mode with code
grid formating and value insertion. Also any example could help.

Best regards!

3 Replies

MA Mahendran Annamalai Syncfusion Team January 4, 2016 01:35 PM UTC

Hi Danilo,

Thanks for using Syncfusion products,

You can use Syncfusion  GridGroupingControl for unbound mode.  You can add the unbound column using UnboundFields property from GridTableDescriptor class. if you want to save the values in unbound column you can use theSaveValue and QueryValue event.

Refer to the following code example.


//Add the UnboundFields in GridGroupingControl

this.gridGroupingControl1.TableDescriptor.UnboundFields.Add("UnboundField");


void TableDescriptor_SaveValue(object sender, FieldValueEventArgs e)

{

    if (e.Field.Name == "UnboundField") //&& RecordIndex >= 0)

    {

        UnboundValues[e.Record.Id] = e.Value;

    }

}


void TableDescriptor_QueryValue(object sender, FieldValueEventArgs e)

{

    if (e.Field.Name == "UnboundField")

    {

        e.Value = UnboundValues[e.Record.Id];

    }

}


Sample:  CS588448740



We have published KB article to this,  please refer to the following KB documents.

https://www.syncfusion.com/kb/5942

https://www.syncfusion.com/kb/725


Regards,
Mahendran.A


DA DaniloS January 4, 2016 01:46 PM UTC

Hello, tahnks for info.

So, if on this way possible to work only with completly unbound grid, no bounded columns?

Best regards!

Danilo


JP Jagadeesan Pichaimuthu Syncfusion Team January 5, 2016 01:35 PM UTC

Hi Danilo,

The GridControl is the best for using unbound mode in Grid formatting and value insertion. If you want to use data source to the grid, you can use the GridGroupingControl. And also, if you want to use sorting, filtering and grouping options in the Grid, you can use the GridGroupingControl, since GridControl does not support this.


Please refer to the following KB to choose the best grid,

KB Link : https://www.syncfusion.com/kb/403/how-to-choose-the-best-grid 


Please let us know if we had misunderstood your query.


Regards
,
Jagadeesan P.

Loader.
Live Chat Icon For mobile
Up arrow icon