Silverlight Polling WCF Method - c#

Had a question thought someone might have done this before, i have a wcf method that brings back an ienumerable collection of data that is binded to the item source of a datagrid. each record in the db is updated by the windows service regurarly untill the progress is completed, updating counts adding new records etc , each record on the grid reflects each record brought back, currently the method brings back a list of data where each record is binded to a progress bar control in each row of the grid showing the progress of the work, however this is not live so the user has to press the refresh button each time which makes a wcf call to bring back the updated or new data, here comes my question how can i or whats the easiest and best way to show the progress happening on the control live without a refresh button, so the binding to the control updates and make it seem live?
Thanks in advance

Related

Auto Update ListView once a new Record Inserted to DB

I've (2) applications one is Website and the Second is Application to manage the requests which is coming from the Website.
When I submit RegisterationForm and record get inserted in SQL Srv DB, I want the
ListView of registered clients notified that there is a new update , and Perform an Update on ListView without refreshing the Page Always.
So it will be easy for the Admin to monitor the new Registered Clients on listview. WHAT I MEAN IS THE LISTVIEW MUST BE REALTIME.
I think Using Timer inside UpdatePanel to do DataBind() of ListView is not the professional and efficient way to do that? is it ??
What is the best way to do that?
I think The Best way is use SignalR

Change in database table reflects immediately in datagrid

I am checking whether there are existing solutions/ procedures for the following scenario.
When there is a change in a row of database table, the same should reflect immediately in datagrid that i have in winform on a push basis but not in timely refresh basis. If it has to be refresh basis, i dont want the user selections of datagrid to disappear.
i guess, i can do this by signalR in case of webforms. But in case of winforms or asp.net, please point me to any appropriate tutorials to do this.
Thanks
You can update the datasource on the save button itself. Then, it will be refelcted immediately after you commit the changes in the row and save it.

WPF Window Cold Start - showing black screen

I have a WPF Application using MVVM pattern. Startup window consist of 3 controls Menu,TitleBar and a DataGrid. Currently it takes around 5 seconds to complete all the operations( fetching data from service, dynamically generate DataGrid and its rendering) and after that it displays all of a sudden to UI. Problem is, the end user has to wait for 5 seconds to see the window after starting the program. Most of the operations is related to DataGrid. So I moved the DataGrid related code to Window Loaded Event and now the window open suddenly but showing a black screen and after some time it shows the DataGrid with data.
So my aim is to show the window with Menu and TitleBar and after completing the initial load, do the task to load the DataGrid in a background thread so that I can show a loading panel in the view. How can I call that particular method that related to DataGrid after completing the initial load?
Also, I can't use Splash screen(it's in the requirement).
Please suggest?
You should perform any long running process in a background Thread... this will free up your UI. If you are not familiar with multi-threaded applications, take a look at the BackgroundWorker Class page at MSDN, as it features code examples.
Another thing to note it that you should add IsAsync="True" property to your Binding declaration on the DataGrid.ItemsSource to let it know that it must wait for data. In this way, your DataGrid will be displayed empty and then when the data is ready, it will populate.

Problems with jquery calls in asp.net

Let me tell you that I am a beginner of Ajax and Jquery along with asp.net,
I have a aspx page with backend coding in c#.
I ahve a single update panel which contains a asp:table an in turn, one column contains a form with two fields and a button to add a department of the organisation, and the other column of a table contains a gridview to list all the departments of the organisation.
My problem: whenever i submit a form in the update panel,
some times it shows a message in the left column as "Department has been added successfully", and sometimes gridview will be updated, and sometimes none of the above two changes(even though the department has been added in database), and sometimes neither the changes are made, nor the department is added in the database.
After working on the same, came to know that, the second time submission of form is doing nothing. first time everything is working perfectly, but when am submitting the second department, $.POST() is not working.
I'd make it work without an update panel. Make it work without ajax (step through the code), then add the .net ajax components afterwards. If you're a beginner, it helps to break the problem apart, start small and add fancy features once the core functionality is working.

Update the database asynchronously

I have a ListView in ASP.NET where one column consists checkBoxes. I want the user to be able to these CheckBoxes directly in the list (without having to go into edit mode). How I do that, I have received answers in this question
The problem is when the user quickly press several CheckBoxes. It is only the first checkBox that is stored in the database, the other is restored. The user must for every checkBox, wait for the page updated. Is it posible to solve so that the changes are written to the database asynchronously?
You should make Ajax request using JavaScript on checkbox state change
You can use UpdatePanel to write to the database asynchronously and set Trigger to CheckedChanged event

Categories

Resources