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

DrawEvent for Grids

Thread ID:

Created:

Updated:

Platform:

Replies:

104526 Jul 26,2012 08:10 PM UTC Aug 15,2012 11:19 PM UTC WinForms 8
loading
Tags: GridControl
Jiali Gao
Asked On July 26, 2012 08:10 PM UTC

Hi,

I am working with V8.4.0.10,  and I implemented a Sparkline feature myself by using the DrawEvent for virtual grids.

It works fine, but when the grids are clicked, the Sparkline gets covered by a textbox.  I tried to set the grid unclickable or uneditable, but the Sparkline still gets covered.  Is there a way to make sure that the drawing in virtual grids is always there? 





Ragamathulla B [Syncfusion]
Replied On August 2, 2012 04:12 AM UTC

Hi Jali,
 
Thank your for your interest in Syncfusion products,
 
I am afraid that I am unable to reproduce the issue. I would request your to provide a simple sample that replicate this issue which is helpful for us to provide better solution to you.
 
Let me know if you have any further concerns.
 
Regards,
Ragamathullah B.

Jiali Gao
Replied On August 2, 2012 04:31 PM UTC

I have attached the demo. 

In the popup form, I'm hoping to fixed the right most column so that the Sparkline will not disappear when the gird is clicked.

Thank you for your help!


JialiApp2_syncfusionGrid_e6716f74.zip

Ragamathulla B [Syncfusion]
Replied On August 2, 2012 06:56 PM UTC

Hi Jiali,
 
Thanks for the update.
 
You can avoid your reported issue by the following ways. Please refer to the following code.

//Way 1

// enable the pariticular column

void gridControl1_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)

{

if (e.ColIndex == 11)

e.Style.Enabled =

false;

}

// way 2

//Restrict the editing mode in the particular column

void gridControl1_CurrentCellStartEditing(object sender, CancelEventArgs e)

{

if (this.gridControl1.CurrentCell.ColIndex.Equals(11))

{

e.Cancel =

true;

}

}

Please refer to the attached sample which illustrates the same.

Let me know if you have any further concerns.

Regards,

Ragamathullah B.


Jiali Gao
Replied On August 3, 2012 01:25 PM UTC

Hi Ragamathullah,

Thank you for your help.  I tried both of the solution.  It works when I click on a single cell.  However,  if I select multiple cell at one time, the Sparklines stay in
the first two cells, but not the rest of them.   I'm wondering if there is a way to disable mouse selection as well.   So, when the user drag the mouse over these Sparkline cells, the drawing will not disappear.

Thank you for your help!

Best Regards,
Jiali

Ragamathulla B [Syncfusion]
Replied On August 7, 2012 04:20 AM UTC

Hi Jiali,

 

Thanks for the update.

 

You can avoid that behavior by using RefreshRange(). Please refer to the following code.

void gridControl1_SelectionChanged(object sender, GridSelectionChangedEventArgs e)

        {

            this.gridControl1.RefreshRange(e.Range);

        }

 

Please refer to the following sample link.

 

http://www.syncfusion.com/downloads/Support/DirectTrac/96817/JialiApp2_syncfusionGrid-897174086.zip

 

Let me know if you have any further concerns.

 

Regards,

Ragamathullah B.


Jiali Gao
Replied On August 14, 2012 12:54 PM UTC

Thank you for the help. That works out perfectly.

Also, I have a couple of more questions about the drawEvent.

In gridControl, I use default AccelerateScrolling, which result in a continuous scrolling.  When I scroll down, and then scroll up slowly,  some of the drawing in the grid disappear.  I'm not sure what is causing this.

Again, Thanks for your help!



Jiali Gao
Replied On August 15, 2012 06:27 PM UTC

I use e.Cancel = true to fix the drawing.  It works fine now. Thank you.

Ragamathulla B [Syncfusion]
Replied On August 15, 2012 11:19 PM UTC

Hi Jali,
 
We glad to help you out
 
Regards,
Ragamathullah B.

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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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

;