Silverlight / WPF - showing custom error to user
Asked By theiry henry
12-Aug-10 01:37 AM
i m gettting error of conflict voilation when i m deleting any record from Datagrid .this err is due to foreign key referenced to other table.I want to catch this err from domain service and show a custom err to user..How can i do dat.plz nyone help me out..
Sandra Jain replied to theiry henry
Write a function like this in code behind:
Private Sub ShowMessage(ByVal type As String, ByVal Message As String)
ScriptManager.RegisterStartupScript(Me, Me.GetType(), type, "<script>alert('" & Message & "');</script>", False)
End Sub
Now whereever you handle it just call this function and pass your custom message like this:
ShowMessage("error", "Foreign key violated")
silverlight and wpf difference if one person has gain master in silverlight than wiil this help him in learning wpf Hi Malik, WPF has a more advanced and mature XAML support than Silverlight. Silverlight used to be called (WPF / E) and is a subset of the WPF XAML design. Therefore, it doesn't support
how to acess textbox value from datagrid in wpf. . ? Silverlight / WPF hello frnds <WPF:DataGridTemplateColumn Header = "Result"> <WPF:DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBox Text = "{Binding Path = testresult}" Name = "tb" / > < / DataTemplate> < / WPF:DataGridTemplateColumn.CellTemplate> < / WPF:DataGridTemplateColumn> how to get textbox value, selected row of data grid, as shown in above get in cs page . try this, http: / / stackoverflow.com / questions / 2443941 / get-textbox-binding-in-wpf-datagridtemplatecolumn Create New Account keywords: how, to, acess, textbox, value, from, datagrid, in, wpf. . ? description
Silverlight vs WPF? What is the difference between WPF & silverlight?when to use silverlight & when to use WPF? is it true WPF is only use for dektop application? WPF is for desktop applications- you create an .exe file when you build WPF applications. To
how to get DataTemplate text box vlaue from datagrid in wpf Silverlight / WPF HI all <WPF:DataGridTemplateColumn Header = "Result"> <WPF:DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBox Text = "{Binding Path = testresult}" Name = "txtResult" / > < / DataTemplate> < / WPF:DataGridTemplateColumn.CellTemplate> < / WPF:DataGridTemplateColumn> how to get txtResult value in CS page. in button click event. plz reply world!" ; } Create New Account keywords: how, to, get, DataTemplate, text, box, vlaue, from, datagrid, , in, wpf description: HI all how to get txtResult value in CS page. in button
wpf Silverlight / WPF i need to know how to bind a menu control using sql database. . Thanks. . . WPF (1) Binding (1) Menu (1) Control (1) http: / / www.codeproject.com / Articles / 37848 / WPF-Data-Bound-Menus http: / / stackoverflow.com / questions / 899204 / wpf-menuitem-header-and-headertemplate http: / / stackoverflow.com / questions / 1767961 wpf-bind-menu-item Hi you just go through the below link it is very clearly Add(newMenuItem); AddChildMenuItems(menuData, newMenuItemFromDB ); Hope it helps!! Regards D test Create New Account keywords: wpf description: i need to know how to bind a menu control using sql database. . Thanks