English 中文(简体)
通过服务进行数据验证
原标题:Datagrid Edit mode and data validation via service

缩略语 [Name(string), Value(int), isReady(bool)]

我需要让这个名字成为我的密码<数据:DataGridTemplateColumn.CellEditingTemplate>。 校正包含一个<代码>TextBox。

在承诺编辑时,我需要打电话给一名妇女和家庭服务局,以确认姓名。 这是我在小组所做的事。

但是,当名称无效时,我如何能够:

  1. Display an error on the datagrid (searching a solution with ValidatesOnNotifyDataErrors but can t succeed)
  2. Put the cell back in edit mode.

在这里,我为什么能够在POCO证实:

  1. DataGrid is in edit mode
  2. By double clicking on a cell, the label containing the data becomes a TextBox. I m now in edit mode
  3. I insert an error. An assynchronous validation is launched. DataGrid is back in display mode
  4. the assync is finished, I raised my error, but nothing happens (visually I mean) because ValidatesOnNotifyDataErrors does not seems to work on label.

此外,正如我所知,如果我回到老板的状态,我就有一个真正的奇怪的姿态,告诉我们有1名傲慢的人,在进入这个国家时,我可以摆脱ed的心态,不管我做什么......。

图十

最佳回答

(sorry for my bad english) I would recomend that you do not use the grid event to validate your data - do this on your POCO properties setter - its cleaner, easier to mantain and if you use this POCO with another control your validation will still work.

http://weblogs.asp.net/fredriknormen/archive/2009/11/22/verlight-4-and-asynchous-validation-with-inotifydataerorinfo.aspx

问题回答

暂无回答




相关问题
Silverlight Rich text box control

Our team decided that we need our own custom Rich text box control for Silverlight app we are developing. We looked at existing controls mentioned at A good rich text control for Silverlight but ...

Silverlight ImageBrush not rendering (with Bing Map Control)

I m trying to add an image to a Pushpin instance from the Silverlight Bing Map Control, but I can t seem to get it to render (the pushpin renders fine). This is probably a general WPF question rather ...

Silverlight OpenFileDialog DoEvents equivalent

I m processing large files after they are selected by the user. My code looks like the following: if (FileDialog.ShowDialog() == true) { // process really big file } This freezes up the UI so ...

list of controls with templates in silverlight

Does anyone know where to find a list of controls that you can set the template on in Silverlight? I ve wasted several hours now trying to create control templates only to find that the control doesn ...

Silverlight, Updating the UI during processing

I have a simple silverlight multifile upload application, and i want to provide the user with some feedback, right now its only in a test phase and i dont have the webservice. Somehow i cant get the ...

Silverlight 3 - FindName returns null

This looks a bug to me.. Using Silverlight 3 and i have a user control defined in XAML and trying to access the object during runtime returns a null. <Grid> <common:CommonGridEditPanel x:...

silverlight 3 collection binding

Someone please help me understand why this binding does not work... I have a class called SelectionManager with a property called dates which is populated by a WCF service. The property is an ...

热门标签