This question is locked. New answers and comments are not allowed.
Hi,
In my application at the CurrentCellChange event , data is sent to Validation-Engine.
The Validation-Engine responses asynchronously.
So, i have to stop user from changing cell till i get the response back from engine.
There is no e.Cancel in CurrenetCellChanged event.
I thought of using IsContentValid of cell, I thought if I set it to true, the user will be locked in the cell.
Can you suggest something?
Rgds
Alfa.
7 Answers, 1 is accepted
0
Hello Alfa,
Unfortunately with the current version of RadGridView there is no way to use asynchronous validation. We will consider about some options in order to support such scenarios, but I cannot commit with any specific date. Meanwhile I can only suggest you to move validation logic to the UI level.
Greetings,
Nedyalko Nikolov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Unfortunately with the current version of RadGridView there is no way to use asynchronous validation. We will consider about some options in order to support such scenarios, but I cannot commit with any specific date. Meanwhile I can only suggest you to move validation logic to the UI level.
Greetings,
Nedyalko Nikolov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Alfa
Top achievements
Rank 1
answered on 23 Dec 2009, 09:10 AM
Thanks Nedyalko,
I was not expecting inbuilt async validation support.
Can you help me out in few things
1) What is the use of IsContentValid?
2) Can I stop user from changing Cell? Is there any property like e.Cancel in CurrentCellChange?
3)Can I raise CellValidating event melodramatically?
Rgds
Alfa
0
Hello Alfa,
Here is some code which will keep the cell from changing :
Hope you find it helpful.
Greetings,
Pavel Pavlov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Here is some code which will keep the cell from changing :
public MainPage() { InitializeComponent(); this.radGrid1.CellValidating += new EventHandler<Telerik.Windows.Controls.GridViewCellValidatingEventArgs>(radGrid1_CellValidating); } void radGrid1_CellValidating(object sender, Telerik.Windows.Controls.GridViewCellValidatingEventArgs e) { e.IsValid = false; }Hope you find it helpful.
Greetings,
Pavel Pavlov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Alfa
Top achievements
Rank 1
answered on 29 Dec 2009, 12:11 PM
Thanks Pavel,
But all my question are still unanswered.
1) What is the use of IsContentValid?
2) Can I stop user from changing Cell? Is there any property like e.Cancel in CurrentCellChange?
Are you guys planning to include e.Cancel in CurrentCellChange event?
3) Can I raise CellValidating event programmatically ?
Rgds
Alfa
0
Accepted
Hello Alfa,
Straight to the answers:
1. IsContentValid is a property of the cell that controls the appearance of valid/invalid state of the cell. Setting this property would not affect any internal validation logic. It would affect only the visual appearance of the cell ( e.g. show hide invalid state visuals )
2. In my previous answer I have tried to demonstrate the most descent way of stopping the current cell from being changed
3. Unfortunately the CellValidating event is not intended to be used in this way ( e.g. being raised programmatically ) .
Regards,
Pavel Pavlov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Straight to the answers:
1. IsContentValid is a property of the cell that controls the appearance of valid/invalid state of the cell. Setting this property would not affect any internal validation logic. It would affect only the visual appearance of the cell ( e.g. show hide invalid state visuals )
2. In my previous answer I have tried to demonstrate the most descent way of stopping the current cell from being changed
3. Unfortunately the CellValidating event is not intended to be used in this way ( e.g. being raised programmatically ) .
Regards,
Pavel Pavlov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Alfa
Top achievements
Rank 1
answered on 05 Jan 2010, 05:07 AM
Thanks Pavel for straight answers.
If I do cell.CommitEdit(), will the CellValidating be raised? Is there any thing wrong in raising CellValidating in this way?
Rgds
Alfa
0
Accepted
Hi Alfa,
Indeed calling CommitEdit would indirectly result in raising the cascade of validation logic - including the CellValidatingEvent. I believe there is nothing wrong in such approach .
Sincerely yours,
Pavel Pavlov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Indeed calling CommitEdit would indirectly result in raising the cascade of validation logic - including the CellValidatingEvent. I believe there is nothing wrong in such approach .
Sincerely yours,
Pavel Pavlov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.