How to set MouseOver event/trigger for border in XAML?

Yes, this is confusing… According to this blog post, it looks like this is an omission from WPF. To make it work you need to use a style: <Border Name=”ClearButtonBorder” Grid.Column=”1″ CornerRadius=”0,3,3,0″> <Border.Style> <Style> <Setter Property=”Border.Background” Value=”Blue”/> <Style.Triggers> <Trigger Property=”Border.IsMouseOver” Value=”True”> <Setter Property=”Border.Background” Value=”Green” /> </Trigger> </Style.Triggers> </Style> </Border.Style> <TextBlock HorizontalAlignment=”Center” VerticalAlignment=”Center” Text=”X” /> </Border> … Read more

Refresh a materialized view automatically using a rule or notify

You should refresh the view in triggers after insert/update/delete/truncate for each statement on table1 and table2. create or replace function refresh_mat_view() returns trigger language plpgsql as $$ begin refresh materialized view mat_view; return null; end $$; create trigger refresh_mat_view after insert or update or delete or truncate on table1 for each statement execute procedure refresh_mat_view(); … Read more

Trigger change event of dropdown

I don’t know that much JQuery but I’ve heard it allows to fire native events with this syntax. $(document).ready(function(){ $(‘#countrylist’).change(function(e){ // Your event handler }); // And now fire change event when the DOM is ready $(‘#countrylist’).trigger(‘change’); }); You must declare the change event handler before calling trigger() or change() otherwise it won’t be fired. … Read more

jQuery click anywhere in the page except on 1 div

You can apply click on body of document and cancel click processing if the click event is generated by div with id menu_content, This will bind event to single element and saving binding of click with every element except menu_content $(‘body’).click(function(evt){ if(evt.target.id == “menu_content”) return; //For descendants of menu_content being clicked, remove this check if … Read more

How do you change Background for a Button MouseOver in WPF?

To remove the default MouseOver behaviour on the Button you will need to modify the ControlTemplate. Changing your Style definition to the following should do the trick: <Style TargetType=”{x:Type Button}”> <Setter Property=”Background” Value=”Green”/> <Setter Property=”Template”> <Setter.Value> <ControlTemplate TargetType=”{x:Type Button}”> <Border Background=”{TemplateBinding Background}” BorderBrush=”Black” BorderThickness=”1″> <ContentPresenter HorizontalAlignment=”Center” VerticalAlignment=”Center”/> </Border> </ControlTemplate> </Setter.Value> </Setter> <Style.Triggers> <Trigger Property=”IsMouseOver” Value=”True”> … Read more

SQL update trigger only when column is modified

You have two way for your question : 1- Use Update Command in your Trigger. ALTER TRIGGER [dbo].[tr_SCHEDULE_Modified] ON [dbo].[SCHEDULE] AFTER UPDATE AS BEGIN SET NOCOUNT ON; IF UPDATE (QtyToRepair) BEGIN UPDATE SCHEDULE SET modified = GETDATE() , ModifiedUser = SUSER_NAME() , ModifiedHost = HOST_NAME() FROM SCHEDULE S INNER JOIN Inserted I ON S.OrderNo = … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)