iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
i have a webGrid with a select button. Clicking the button causes the event to fire twice. I've tried this in Ajax and WebFlyPostBack. Has anyone else seen this action?
Ok, thank you for your feedback. I will forward this to our development team about this.
Regards,Handy
I tested a asp.net button and WebGrid inside Ajax and FPBManager but could not see the issue. The event only fired once. Also, about "a select" button you said, did you do something in this button? And do you have global.asax in your project?Regards,Handy
there is a global.asax.
it just a button in a column labled "Select"
i put a break at the event and it happens twice.
Handy,
There was a misunderstanding. The button is in the WebGrid. Attached is a simple sample.
Clicking button "Hello" adds "Hello" to textbox1. Clicking "Clear" clears textbox1.
Clicking the button in the "Select" column should change textbox1 to "Button clicked event. " it doesn't on my system. That is, if textbox1 = "hello", after clicking the button in the grid textbox1 still has "hello" instead of "Button clicked event." The grid button also displays an Alert with the contents of textbox1. On my system the Alert is displayed twice.
This sample does not use Ajax or flypostback.
btw, i tried to attach a file from a shared drive and it wouldn't work. i moved the file to my desktop and it worked.
George,
It works in here. Your sample is missing something because you run in VB.
Here, try to see your code below.
Protected Sub WebGrid1_ButtonClick(ByVal sender As Object, ByVal e As ISNet.WebUI.WebGrid.ButtonEventArgs) Handles WebGrid1.ButtonClick TextBox1.Text = "Button clicked event. " WebGrid1.ClientAction.Alert(TextBox1.Text) End Sub
and in html code:
<ISWebGrid:WebGrid ID="WebGrid1" runat="server" DataSourceID="AccessDataSource1" DefaultStyleMode="Elegant" Height="250px" UseDefaultStyle="True" Width="500px" OnButtonClick="WebGrid1_ButtonClick" OnInitializeDataSource="WebGrid1_InitializeDataSource">
In .vb code, there is 'Handles WebGrid1.ButtonClick' while in your html code also has 'OnButtonClick="WebGrid1_ButtonClick"' . In vb, it would be automatically added (default behavior). That's why the event is called twice. So, you will need to choose discard Handles WebGrid1.ButtonClick' or OnButtonClick="WebGrid1_ButtonClick"' . This should fix your issue.
Thanks Handy,
I followed your suggestion and still was getting strange results. in debug there would be a double click and in view browser one click.
So I rebuilt it (see attached). I also added a webButton and AJAX. I get the same reuslts with or without Ajax.
still having problems attaching a file. i had to change the file name.. also, if i turn on numbering and type lines then the numbering doesn't work. if i type the lines, highlight them and select numbering then it works.
Hello George,
On your scenario, some issues happened because you were missing some settings.
When you are using Ajax Update panel, our control needs some settings inside.
I modified your sample and you can see the detail codes in there.
For alert issue in WebButton, It happened because you are using FullPostBack mode. In FullPostBack mode, of course the alert did not show. Try to compare it with WebGrid button. It is not FullPostBack.That's why you can see the alert ( AutoPostBack= true and PostBackMode=FlyPostBack ).
About your report forum issues, I have tried numbering but it worked fine. You can also see the attached recording.
Thanks Handy.
There is still one open issue and that is the bottom of the button is not displayed.
I can't open your wmv file.
second line. i would expect this line to be numbered 2
i'm using firefox. this should be numbered 3.
You only need to customize RowHeightDefault property. The size of height need to be customized based on your button size.
For the last issue about numbering, thank you for reporting to us. I can see the issue in here now. I will forward this to our developer team.
Regards,
Handy
On the button bottom being clipped.
One would assume that if i use the defaultstyle the row would display correctly. That is the font would be sized to fit; buttons would fit; etc.
You need to rethink this.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname