How would I get this information?
void rgvBulkEntry_PastingCellClipboardContent(Object sender, GridViewCellClipboardEventArgs e)
{
ValidateData(e.Cell.Column.UniqueName, e.Value.ToString(), (GridViewCell)e.Cell);
}
(GridViewCell)e.Cell fails as e.Cell is of type GridViewCellInfo...
6 Answers, 1 is accepted
Generally, there is no easy way to convert GridViewCellInfo into GridViewCell. The basic reason is that the virtualization of the grid is turned on by default and not all cells are available.
Would you clarify a bit what is the scenario that you want to accomplish ? Why do you need GridViewCell instead of GridViewCellInfo ?
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
You can still use the GridViewCellInfo from the PastingCellClipboardContent event - it gives you information for the Item and the Value as well. Another possible approach would be to execute the validation in the setter of your property that will be called on pasting a new value.
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
I am using a WCF service to get data which then is updated into other fields of the object - however I think the asynchronous calls that it is making is causing the results to be very spotty - do you have any suggestions on this?
You can try to validate the item not in any event but either in the setter of the properties for example ( that will be called event when pasting a new value) or implementing INotifyDataErrorInfo Interface. Please take a look at this blog post on the later approach.
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>