Updating the user - c#

I am having a grid in gridpage.aspx and on clicking the search button in gridpage.aspx. it opens a search popupwindow with search criteria and after entering the search criteria and clicking the search button in the popup window will close the popup window and displays all the records in the gridpage.aspx.
the scenario is when i am retreiving lakhs of records i want to display the user with some update that the search is still in progress

Not clear on how you are doing the whole popup logic (ie: client side code, update panel, etc). I'll go the simple route and assume you are using an UpdatePanel.
You could have a panel (div) on your page with a default visibility of false (css style = display: none) that contained an animated "loading" icon.
When the users clicks search you could change the visibility (css style = display: block) to true.
You could also accomplish this using javascript client side if clicking "Search" isn't already causing a postback.

You can make use of you can have div with an gif image and display that while the search is on. You can make it visible in the beginning of the method where search starts and hide it in the end.
If you are using UpdatePanel, go for UpdatePanelAnimator (or something like. Don't remember the exact name). It will also gove the same effect.

Related

JQuery ContextMenu not firing for disabled item

I have an excel-like table. The following picture represents a part of it (for clarification, I setted the text of the inputs to be their respective IDs):
There is a ContextMenu that is fired on right click (code here) in each one of the inputs.
Here is how I find all these input controls at once (I need to use this way because there are some more columns that I do not want to call the ContextMenu):
$('[id^="txtF_"],
[id^="txtP_"],
[id^="txtT_"],
[id^="txtE_"],
[id^="txtM_"]').contextMenu({ ....
This works nice, however, if one of the items is disabled, the browser menu shows up instead. What can I do to fire the custom ContextMenu even if the input control is disabled?

ASP.NET Move and modify RadGridView to RadWindow

I have a Telerik RadGrid consisting of eight columns that I want to display a duplicate of in a pop-up window, after clicking a button. And ideally, it should be a "duplicate" with some of the columns removed. How would I go about this?
I assume I should be able to somehow add the grid to the window's content, manipulate it a little, and then "unmanipulate" and add it back to the main page upon closing the window, using jQuery. I'm just not sure of how to go about this.

Get and set data in an asp panel using modal popup extender

I am trying to get data from a data grid and display it into a modal panel. Then modify data in modal panel and after the panel was closed using the "ok action" the modified data to be displayed again in data grid.
This seems to be like a true horror... i do not want to post some code because is really a lot.
The first problem was that the button which opens the modal panel does not call its code behind on server so i do not know how to populate the fields from modal panel with the ones from data grid.
And the second was that the "ok" and "cancel" buttons from modal panel also does not call any code behind from server... so i could not update the data grid with new modified values from modal panel.
Please if you know some tutorials about this, or have an idea how to enable those calls on server side, give me a hand, i seek some but all of them seems to be only for "educative" purposes.
Thanks !

DataGridView cannot be Focused, but one of them can

I've come across the strangest bug pertaining to DataGridViews in Windows Forms.
I have a TabControl, that is supposed to contain a docked DataGridView in each tab page. I thought it would be convenient that the grid is focused upon changing the tab page, so that the user could simply hover the mouse over the grid and start scrolling when he changes the page. So, I just put a grids[tabs.SelectedIndex].Focus() in the event handler for changing the tab page.
However, something really strange happened. In my test application, I have three tab pages. If I try scrolling the grid right after starting the application, it doesn't work; I have to click in the grid first. I was expecting this. However, if I change the tab page, I can't scroll in any of the other grids until I click, except for the first one!
So, if I switch pages to the second page, then back to the first, I can automatically scroll that grid without clicking, but if I then switch to the third, I have to click for the grid to focus.
I had a look at the CanFocus properties of the grids, and it seems that only the first grid has it set to True. They are all created programmatically, and all in the same way. I don't see why they would be different.
Any ideas?
Inactive tab pages have their Visible property set to false. The documentation for CanFocus says:
In order for a control to receive
input focus, the control must have a
handle assigned to it, and the Visible
and Enabled properties must both be
set to true for both the control and
all its parent controls
Well, I solved it. Stupid programming error on my part, I had grids[tabs.TabIndex].Focus() instead of grids[tabs.SelectedIndex].Focus().
Oh well.

How to Set Up Winform Textbox Field Focus so a User Can Go Through Them by Clicking Tab Button?

UI is created in VS 2008. I'm using C# .... I need to let the user move/focus between text fields from top to bottom by clicking tab button. How can i do it?
On the Layout toolbar (will normally show up if you're in Design View) click on the buttom on the most right (it's called tab order).
Now on every element on your designer will come up a little box with a number. Just click all your elements in the order you like and they will automatically be re-ordered.
If you like to do it manually, just take ho1 advice and change the property manually.
You just set up the TabIndex property properly, so that it's sequential from top to bottom. Then it'll work automatically and you won't need any code to move around the focus.
So in other words, set the top TextBox TabIndex to 1, the next one you set to 2 etc and then one at the bottom will have the highest number (of the textboxes, you probably want to have even higher indexes for any OK buttons and similar so that the user can jump to them after editing all the textboxes).
You can find more info about it here:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.tabindex.aspx

Categories

Resources