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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Using GridModel with gridControl

Thread ID:

Created:

Updated:

Platform:

Replies:

82695 Jun 19,2009 04:22 AM UTC Jun 20,2009 07:15 AM UTC Windows Forms 1
loading
Tags: GridControl
Erlan Bekenov
Asked On June 19, 2009 04:22 AM UTC

Hello there.
I am trying to attach a GridModel to a gridControl,
the problem is that all the settings I did don't work after attaching.
I mean
ActivateCurrentCellBehavior, AllowSelection and ShowCurrentCellBorderBehavior.
I set both gridControl's settings and gridModel options but it doesn't work.

In the attached sample you can see the GridControl looking just like I want,
but after you uncomment the "gridControl1.Attach(data);" is shows the border across selected cell which I need to avoid.

Can anyone help me with this?

Thanx.



WindowsApplication7_24aa9e16.rar

Lingaraj S [Syncfusion]
Replied On June 20, 2009 07:15 AM UTC

Hi Erlan,

Thank you for your interest in Syncfusion product.

The GridControl model was disposed from the GridControl, so Exception throws in AcitivateCurrentCellBehaviour. If you want to reset the model, then please try using null value in Model property to avoid this issue.

Refer the code below:

gridControl1.Attach(data);
gridControl1.BeginUpdate();
gridControl1.Model = null;
gridControl1.Model=data;
this.gridControl1.Model.ResetGridCells();
gridControl1.EndUpdate(true);
gridControl1.Refresh();


Refer the modified sample in below link:
http://files.syncfusion.com/support/samples/Grid.Windows/Forums/ModifiedModelSmaple.zip

Please let me know if you have any queries.

Regards,
Lingaraj S.

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

;