|
Hello All,
I am about to start a new web project and would like some advice on the best way to achive my goal.
I want to have a gridview control that displays database information. Lets say all customers from a customer table. Now say the database table (customer) is updated by another user, lets say an new customer is added. I want that new customer to be displayed to all other users with the page open. Without them having to refresh the page.
Can I do this using AJAX?
Can I fire an event when the data access layer method updates the database (say AddCustomer()), and then have each page listing for the update?
Is this possible?
Any help or a point in the right direction will be greatly appriciated.
Thank you in advance
Chris
|
|
|
|
|
chrisbaldwin51 wrote: Is this possible?
No. AJAX means your page sends messages to the server, you can do this by polling the server with AJAX, but you'll use a lot of network traffic, you can't fire a message from the server to the client.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Can I not hold the customer data object in the cache? Then have AJAX point to it, so when it is updated it filters over to all the pages?
If I where to add a clock using AJAX it would have to do regular checks with the server!
|
|
|
|
|
chrisbaldwin51 wrote: Can I not hold the customer data object in the cache?
What cache ? Do you know what AJAX is ?
chrisbaldwin51 wrote: Then have AJAX point to it, so when it is updated it filters over to all the pages?
AJAX doesn't point to anything, except the server it makes calls to.
chrisbaldwin51 wrote: If I where to add a clock using AJAX it would have to do regular checks with the server!
Correct. That is your only option.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
does any1 know of any open source forums apart from yaf?
thanks!
We are not a Code Charity
|
|
|
|
|
|
I am binding a Generic List List<products> to an ASP DataGrid and have no problem with the string properties of the Product property items:
<asp:boundfield datafield="ShortName" headertext="Short Name" sortexpression="Program">
The problem I am having is how to bind the Integer properties (fields) to the DataGrid:
<asp: boundfield="" datafield="???????????" headertext="My Integer" ...<br="" mode="hold">
How do I do this?
Thanks,
Steve
|
|
|
|
|
I am surprised it's a problem, what happens ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for your help. As it turns out I can just bind Integers the same way I do strings.
As always thanks guys!!!!!!!!!
Steve
|
|
|
|
|
I want to create typeable help in ASP.NET 2.0 i.e when writing in a text box,it dasplay all the item list and enable sorting on typing.
Dhirander Srivastava
|
|
|
|
|
something like this:
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx
We are not a Code Charity
|
|
|
|
|
Hi group,
I'm using a listbox and the datasource is a collection of the objects.
My code is:
lisbox.Datasource = collection
it's ok.
I'd like to get the object selected in listbox, but i'm not getting.
How I do it?
Sorry my bad English.
Thanks,
|
|
|
|
|
listbox.selecteditem
We are not a Code Charity
|
|
|
|
|
|
send me ur code
Rajendran.AL
|
|
|
|
|
Go,
Sub One() - called onLoad
Dim colVOLEndereco As Collection
colVOLEndereco = objBLLEndereco.fnListar
If colVOLEndereco.Count > 0 Then
lstEnderecos.DataSource = colVOLEndereco
lstEnderecos.DataTextField = "pstrNome"
lstEnderecos.DataValueField = "pstrIDEndereco"
lstEnderecos.DataBind()
end if
End Sub
Sub Two() - Called on postback
Dim colVOLEndereco As Collection
colVOLEndereco = lstEnderecos.SelectedItem
End sub
In sub two, the object selected isn't got. I'd like to put the selected object in colVOLEndereco.
OK?
|
|
|
|
|
Is "Sub One()" called during every page load?
You probably only want to call "Sub One()" only on the initial page load, or when the collection has changed.
Have faith in yourself; amateurs built the Ark, professionals built the Titanic.
|
|
|
|
|
call sub one() function in page_load
Rajendran.AL
|
|
|
|
|
Trying to use multiple textbox's to filter gridview
Ex. Age[ ] To [ ] St. [ ] Zip [ ] City [ ]
I can get one textbox to work but not several or even 2
|
|
|
|
|
How are you "filtering" your gridview? Are you passing parameters to a sql query? Or are you trying to use the dataview filter? Try posting your code if you need help.
I didn't get any requirements for the signature
|
|
|
|
|
do you mean people enter search criteria into the search box and that filters the gridview depending on their criteria?
We are not a Code Charity
|
|
|
|
|
yes that's what I'm after
|
|
|
|
|
Just use a select query to populate the grid.
Then in the textbox allow a user to enter criteria then select everything that matches that.
Put the select query on the row create event therefore everytime the gridview is created it checks the query
We are not a Code Charity
|
|
|
|
|
can you show me an example??
|
|
|
|
|
start here and then come back once you have populated the gridview and have some textbox searches created unless you already have...
http://www.15seconds.com/issue/060323.htm
We are not a Code Charity
|
|
|
|