Search Results

Search found 19541 results on 782 pages for 'event handling'.

Page 84/782 | < Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >

  • Convert an interface's event from VB.Net to C#

    - by Jules
    Hi, I'm struggling to convert the below code to C#. Class Class1 Implements IMyInterface Public Event MyEvent(ByVal sender As Object, ByVal e As MyEventArgs) Implements IMyInterface.MyEvent Public Sub New() AddHandler Me.Slider.ValueChanged, AddressOf OnSliderValueChanged End Sub Private Sub OnSliderValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) RaiseEvent MyEvent(Me, New MyEventArgs()) End Sub End Class Here's what visual studio inserts when I ask it to implement for me: event EventHandler<MyEventArgs> IMyInterface.MyEvent { add { throw new NotImplementedException(); } remove { throw new NotImplementedException(); } } With a bit of googling I'm sure I can find out what to replace the NotImplementedException parts with but VS is still telling me that the definition is not implemented anyway.

    Read the article

  • jQuery: issues with mouseover event if the element has children

    - by Patrick
    hi, I have the following element: <div id="#block-block-1"> <p>KAREN LANCEL:<br> lancel(at)xs4all.nl<br> phone 0031 (0)624873424</p> <p>HERMEN MAAT:<br> maat(at)xs4all.nl<br> phone 0031 (0)628536885</p> </div> which is supposed to disappear when the mouse is moved out of it (I will ignore now to talk about the fading in event). This is the code to make it fading out: $('#block-block-1').mouseout(function() { $(this).css("display","none"); }); The issue here is that the 'mouseout' event is triggered when the mouse is over the children elements inside my div. And the parent disappears even if the mouse is still inside it.

    Read the article

  • Problem In Event Receivers in sharePoint?

    - by JanardhanReddy
    Hi all, iam creating folders in document library from third party app.once the folder is created iam changing the metadata fileds in the documetn libary by using event receivers. so i wrote code in itemadded event to set the metadata vlaues of created folder public override void ItemAdded(SPItemEventProperties properties) { DataSet strDs = new DataSet(); try { DisableEventFiring(); SPListItem item = properties.ListItem; strName = item["Name"].ToString(); EnableEventFiring(); } } but iam getting null value in properties.ListItem. so please tell me how we can get the current item values in properties.ListItem. thanks in advance.

    Read the article

  • IE event for right-click delete on <input> or <textarea>

    - by Jayraj
    What event is fired when you right-click on selected text in an <input> or <textarea> tag and the click "Delete" in Internet Explorer (I'm targeting version 9, but if it's good for lower versions too, all the better). On other browsers , the "input" event appears to work for all text changes through right-click so doing $("textarea").on("input", function() {...}); works. IE works for cut and paste, but not delete (JSFiddle here) although MDN claims that IE is supported.

    Read the article

  • JQuery UI (1.8) Select Event not working on Autocomplete

    - by Cyril Gupta
    I am trying to use JQuery UI autocomplete (1.8) for an app. It is set up like this: $('#txtigtags').autocomplete({ serviceUrl: '/tags/searchtags' + $('#txtigtags').val(), minChars: 2, delimiter: ' ', select: function () { alert(''); }, deferRequestBy: 500 }); According to the documentation the select event should fire whenever an entry is selected in the drop-menu and I should get the alert. But the select event is not firing at all. Neither is focus. What am I doing wrong?

    Read the article

  • Cancel zoom from dbclick event onmap in google maps version 3

    - by aleka
    I initiallize a map in my application like this: function doLoad() { var parnitha= new google.maps.LatLng(38.155428,23.718739); var myOptions = { zoom:16, mapTypeId: google.maps.MapTypeId.SATELLITE, center: parnitha, disableDefaultUI: true, navigationControl: true, scrollwheel: false, navigationControlOptions: { style: google.maps.NavigationControlStyle.SMALL, position: google.maps.ControlPosition.TOP_LEFT}, } map= new google.maps.Map(document.getElementById("map_canvas"), myOptions); }. With double click on the map, it making zoom and i don't want this, because i want to use dbClick event for other reason.Please help me to remove the default dbClick event on the map. Thanks a lot..

    Read the article

  • Problem TreeView OnTreeNodePopulate event

    - by purnang.advant
    Hi. I am using a treeview in asp.net 3.5(using c#.net),which is populated from sqldatabase. OnTreeNodePopulate event fires this event, protected void tvLabs_TreeNodePopulate(object sender, System.Web.UI.WebControls.TreeNodeEventArgs e) { PopulateSubLevelLab(e.Node.Value, e.Node); //This function is used for populating the child node. FillLabGrid(e.Node.Value);---My Question? } ---My Question? The FillLabGrid method used for fill a grid view on the basis of selecting the treeview parent node. But this function filled the grid only once when i click the parent node for the first time. Secondly when i collapse the treeview and again click on the parent node function (tvLabs_TreeNodePopulate)is not called? Hope you are getting my point. Please advice me. Thanks in advance.

    Read the article

  • How do I tell if the ObjectDataSource OnSelected event was called for the selectmethod or selectcou

    - by itchi
    I have an object datasource that looks like this: <asp:ObjectDataSource ID="obdsList" runat="server" EnablePaging="True" SelectCountMethod="GetCountByID" SortParameterName="sortExpression" OldValuesParameterFormatString="original_{0}" SelectMethod="GetByID" TypeName="Services.Users" onselected="obdsList_Selected"> <SelectParameters> <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" /> </SelectParameters> </asp:ObjectDataSource> And a onselected event like this: protected void obdsList_Selected(object sender, ObjectDataSourceStatusEventArgs e) { } However, the event method is being called twice.. once with my returned list, and once with the returned Int32 count. If I want to cast e.ReturnValue to the return List how do I differentiate between the count and select methods? I can do a e.ReturnValue.GetType().ToString() but that seems like a hack.

    Read the article

  • Actionscript: Switching back into previous function from event handler function

    - by J.Ded.
    I need to return to my original function after capturing an event (downloading something) with another function. The original function needs to return a value, which depends on the downloaded data. So, I'd like to pause original function for the time needed for the download and the eventhandler function to complete it's work, and resume it afterwards. The obvious way is to set a flag value (both the original function and the eventhandler are within the same class) and make the original function check it until the eventhandler function changes the flag. But that would be wasteful, and my AS is slow enough already:) [other parts of the application utilise some heavy graphics]. Is there another way? Like an event that gets captured "in the middle" of the function? Or some other form of flow control?

    Read the article

  • OnClickListener - x,y location of event?

    - by Mark
    Hi, I have a custom view derived from View. I'd like to be notified when the view is clicked, and the x,y location of where the click happened. Same for long-clicks. Looks like to do this, I need to override onTouchEvent(). Is there no way to get the x,y location of the event from an OnClickListener instead though? If not, what's a good way of telling if a motion event is a 'real' click vs a long-click etc? The onTouchEvent generates many events in rapid succession etc. Thanks

    Read the article

  • Inputs inside ListView doesn't change values from old to recently set on ItemUpdating event

    - by Tema
    Hi, I would appreciate if someone help me to understand this situation. I do not know why but when i edit selected ListView item (containing few TextBoxes) and then press Update button in the ItemUpdating event i always get old values instead of those which were typed recently. Why? I do not use Page_Load event so i do not need check on PostBack I try to get value before i bind data from DB to ListView, so it can't override recently typed values I tried to get TextBoxes values in different Event handlers - ItemCommand, ItemUpdating, ItemDataBound - result si always the same Collection NewValues and OldValues are always empty (i think this is because i don't use SqlDataSource control) The only one way i can get new values - is to check Request, but in this case i can't use control validators ... so probably it is bad idea to work with only request. This is the code of ItemUpdating method: ListViewItem editItem = AdminUsersListView.EditItem; Guid userId = new Guid((editItem.FindControl("UserId") as HiddenField).Value); Hashtable dataUpdate = new Hashtable { { "UserName", Request[ (editItem.FindControl("UserNameNew") as TextBox).UniqueID ] }, { "Email", Request[ (editItem.FindControl("Email") as TextBox).UniqueID ] }, { "IsApproved", Request[ (editItem.FindControl("IsApproved") as CheckBox).UniqueID ] == "on" }, { "IsLockedOut", Request[ (editItem.FindControl("IsLockedOut") as CheckBox).UniqueID ] == "on" } }; var x1 = dataUpdate["UserName"]; // this is corrent new value from Request var x2 = (editItem.FindControl("UserNameNew") as TextBox).Text; // this is WRONG! OLD! value from TextBox ... Why??? using (Entities entities = new Entities()) { aspnet_Membership membershipItem = entities.aspnet_Membership.Where(MBS => MBS.UserId == userId).FirstOrDefault(); membershipItem.Email = dataUpdate["Email"].ToString(); membershipItem.LoweredEmail = membershipItem.Email.ToLower(); membershipItem.IsApproved = Convert.ToBoolean(dataUpdate["IsApproved"]); membershipItem.IsLockedOut = Convert.ToBoolean(dataUpdate["IsLockedOut"]); entities.SaveChanges(); aspnet_Users userItem = entities.aspnet_Users.Where(USR => USR.UserId == userId).FirstOrDefault(); userItem.UserName = dataUpdate["UserName"].ToString(); userItem.LoweredUserName = userItem.UserName.ToLower(); entities.SaveChanges(); } AdminUsersListView.EditIndex = -1; AdminUsersListView.DataSource = _getDataList(); AdminUsersListView.DataBind(); Thanks, Art

    Read the article

  • selected index event is not working in dropdown

    - by prince23
    <asp:DropDownList ID="ddlTime" runat="server" CausesValidation="true" AutoPostBack="true" onselectedindexchanged="ddlTime_SelectedIndexChanged"> <asp:ListItem Selected Value = "True">--Select--</asp:ListItem> <asp:ListItem>8.50</asp:ListItem> <asp:ListItem>9.00</asp:ListItem> <asp:ListItem>9.50</asp:ListItem> </asp:DropDownList> I have drop down with the event changing . but when ever i select an value this event is not firing at all protected void ddlTime_SelectedIndexChanged(object sender, EventArgs e) { } What is the issue that is causing here any help would be great thank you

    Read the article

  • jQuery dont see onclick event on link inside infowindow in google maps v3

    - by Charles
    i have such problem that jQuery onclick event dont see click on link inside google map in infowindow. Thats how my infowindow link looks like: <a href="http://example.com/#ui-accordion-accordion-header-7" class="pull-right move-to-acc" id="itemH">See Details</a> Under map i have acordion list with detailed information about point so im trying to catch click on that link : jQuery("#itemH").click(function(event){ alert("qq"); }); When i click on marker infowindow open and i click on link but alert dont show up - im just moved to div #ui-accordion-accordion-header-7 What im doing wrong ? Thx for help

    Read the article

  • How to decide between a method or event?

    - by Wil
    I read something ages ago I think by Jon Skeet (which I can't find now) saying that in IL, all events get converted to methods... it was before I understood C# and did not understand it all, but if that is (or even if it isn't) the gist of it.... In a purely hypothetical situation, I was wondering if someone could explain or point me to a resource that says when to use an event over a method? Basically, If I want to have a big red/green status picture which is linked to a Bool field, and I wanted to change it based on the value of the bool, should I: a) Have a method called Changepicture which is linked to the field and changes the state of the bool and the picture. b) Have a get/set part to the field and stick an event in the set part. c) Have a get/set part to the field and stick a method in the set part. d) Other?

    Read the article

  • Event(s) for opening the workbook AND worksheets

    - by KeyMs92
    I'm looking for an elegant solution to trigger an event for opening the workbook as well as opening different worksheets. I don't need seperate operations for each worksheet: they all trigger the same method. I know I can use the events Workbook_Activate / Workbook_Open and Workbook_SheetActivate at the same time but I don't know if this is 'the official way' to do it. Perhaps there's a way to do this with one event. I was also wondering if it is relevant in this matter where I put the code. I now have all the code inside "ThisWorkbook" and not in a "Module"...

    Read the article

  • JButtons don't imediatly change on mouse event

    - by out_sider
    I'm using the java swing library to develop a board game called DAO. The problem is that after the human player makes its move, by clicking on the JButton with the piece image that he wants to play, I call the computer AI routine but inside the mouse event function. By doing this only when the function returns, the computer ends its turn, do the JButtons refresh their Images (setIcon comes in). I'd like to know how can I force the JButtons to change their image at the moment they are clicked and not only when the mouse event function ends (as I need to handle data inside it). I've tried all of this myButtons[i][j].setIcon(xIcon); myButtons[i][j].revalidate(); myButtons[i][j].repaint(); myButtons[i][j].validate(); None worked. Thx in advance

    Read the article

  • How To Draw line on touch event ?

    - by AJPatel
    Hey i m beginner of objective C Please Help me i make following code but not work..... -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; if ([touch view] == self.view) { CGPoint location = [touch locationInView:self.view]; loc1 = location; CGContextMoveToPoint(context, location.x, location.y); NSLog(@"x:%d y:%d At Touch Begain", loc1.x, loc1.y); } } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; if ([touch view] == self.view) { CGPoint location = [touch locationInView:self.view]; CGContextMoveToPoint(context, loc1.x, loc1.y); NSLog(@"x:%d y:%d At Touch Move", loc1.x, loc1.y); CGContextAddLineToPoint(context, location.x, location.y); NSLog(@"x:%d y:%d", location.x, location.y); } }

    Read the article

  • Having an issue wit mouseup event

    - by user3680715
    Hello everyone I have this code working fine but I want the script to stop on the mouse up event. Here is an example of what I have now. How can I stop the script on mouse up event so that it looks like it only shows the coordinates when dragging over the image. Thank you! http://jsfiddle.net/Hc7x4/20/ $(document).ready(function () { $("#map-catcher").mousedown(function (e) { $("#map-catcher").mousemove(function (e) { $("#coord").text("x:"+e.offsetX+", y:"+e.offsetY); return; }); $("#map-catcher").mouseup(function (e) { return; }); }); });

    Read the article

  • Programmatically adding event handler to array of radio buttons

    - by gSaenz
    Trying to add event handlers to radio buttons that are created on user input, looking at this and this as examples. However I get an error that answerOptions is not an event. Create the radio buttons Private answerOptions(n) As RadioButton ... Private Sub showQuestion(n As Integer) For i = 0 To answerOptions.Length - 1 answerOptions(i) = New RadioButton AddHandler answerOptions, AddressOf Me.Radios_Click With answerOptions(i) ' --------- SET TEXT, LOCATION ETC. End With Me.Controls.Add(answerOptions(i)) Next End Sub Planning on then handling events with Private Sub Radios_Click(sender As Object, e As EventArgs) Handles answerOptions.checked End Sub I want things to happen when the radios are checked. Don't want to use checkboxes as I want to limit one selection at a time.

    Read the article

< Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >