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

Repainting of group headers in Grid grouping control

hi, i have problems with the repainting of grouping grid.In the click event of the grid , i am doing some backgroung work and loading another form.This takes a few seconds and till the new form is loaded , the headers of the grouping grid gets messed up and moves down. I have attached a screen shot. please help. header1_9116.zip

3 Replies

AD Administrator Syncfusion Team June 17, 2005 04:31 AM

I think the grid will have to finish its click before you start your long process if the long process is being done on the same thread as the grid. One way you can do this is in the click event event, create a Timer, and set it to fire in 20-30 msecs. Then in the tick event, stop teh timer, un-subscribe to the event, delete the time and then start you long operation.
//At the bottom of the click event
Timer t = new Timer();
t.Interval = 20;
t.Tick += new EventHandler(t_Tick);
t.Start();

//the handler
private void t_Tick(object sender, EventArgs e)
{
	Timer t = sender as Timer;
	t.Stop();
	t.Tick -= new EventHandler(t_Tick);
	t.Dispose();

	DoYourLongOperation();
}


MP Majesh Peedikakandy June 17, 2005 05:26 AM

its still not working.. the problem occurs only when the first row is clicked. >I think the grid will have to finish its click before you start your long process if the long process is being done on the same thread as the grid. One way you can do this is in the click event event, create a Timer, and set it to fire in 20-30 msecs. Then in the tick event, stop teh timer, un-subscribe to the event, delete the time and then start you long operation. > >
>//At the bottom of the click event
>Timer t = new Timer();
>t.Interval = 20;
>t.Tick += new EventHandler(t_Tick);
>t.Start();
>
>//the handler
>private void t_Tick(object sender, EventArgs e)
>{
>	Timer t = sender as Timer;
>	t.Stop();
>	t.Tick -= new EventHandler(t_Tick);
>	t.Dispose();
>
>	DoYourLongOperation();
>}
>


AD Administrator Syncfusion Team June 17, 2005 06:15 AM

Can you upload a sample project showing this problem so we can work with it here?

Loader.
Live Chat Icon For mobile
Up arrow icon