Additional data and sorting and index
I always insert the data into the grid at the end of it.
And the red color of the insert and replace data
I had a problem occurs.
If the user sorts the grid
My data is inserted at the same time shifts to a specific position.
(Because the user is set up sort.)
I replaced the red color at the bottom.
I at the end of the other data was changed to red.
This is an error.
How do I keep track of my data sorted, go to I can change the color to red?
--
Add to my data when the grid
user is not select sort grid
. Rows (. Rows.Count - 1) were tracked by the index.
However, if the user sets the sort
It points to the wrong line.
I always add the data I want to get the index.
Regardless of user sort.
-
Hello,
It seems you bind BindingList which has the IBindingList.AllowNew property. This property by default returns 'true' and the grid displays a row enabling the user to add new data to the collection. To prevent him from this behavior, you should set Grid.DataConnection.AllowNew property to false:
grid.DataConnection.AllowNew = false;
Best regards,
Dapfor
0 -
1 the user has to align the grid
2. DataConnection.AllowNew = FALSE
3 data add
4. DataConnection.AllowNew = true and change
However, the problem still occurs.
Because my data is sorted and moved to the top row
I change the color of the bottom line to be. <- error
I needed to add data change the color of the data.0 -
Sorting and add data to, regardless of
Finally, add the data I need to change the color of the sample0 -
Hello,
Do you need to mark newly added data for a some amount of time or the latest row should be red until a new data is added?
Regards,
Dapfor
0 -
I'd like to add and change color at the same time.
It allows users to add new, or changed, in order to inform that place.It is the sooner the better.
0 -
Dear Yang Sun Yeol,
The following code demonstrates how to blink newly added rows for 2 seconds:
grid.RowAdded += delegate(object sender, GridRowEventArgs e)
{
//Blink newly added row for 2 seconds
foreach (Column column in e.Row.Header)
{
e.Row[column.Id].Highlight(TimeSpan.FromSeconds(2), Color.Red);
}
//Ensure visible newly added row (i.e. scroll the content)
e.Row.EnsureVisible();
};Best regards,
Dapfor
0 -
thanks..~ that Good
0
Please sign in to leave a comment.
Comments
7 comments