Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
75
How to change the content of the grid using ajax and sql server 2000
posted

hi all ,

 

please if u wud let me know to how can i

change the content of the grid with out

post back by displaying data from database.

i save the data in the pop up page and on save the pop up page is closed

, i want that the data to get refreshed on the parent page.

an example wud be appreciated.

 

Parents
No Data
Reply
  • 80
    posted

    Grid.Browser = BrowserType.Xml;

    Grid.DisplayLayout.LoadOnDemand = LoadOnDemand.Xml;

    The grid has to handle the following events: InitializeDataSource, XmlHTTPRequest.

     In your javascript event for a new requested page (or new reqeusted data) you can use the CSOM for the grid to get the grid and then call grid.invokeXmlHttpRequest().  Read the online documentation about all the different options for the invokeXmlHttpRequest method.  Calling that method will trigger the XmlHTTPRequest event and from there you can do all your work to get your data from the database. When you bind it be sure to bind the grid to null before you bind it to the new dataset or else all the new rows may not show up.  When you set the new DataSource to the grid there's no need to call .DataBind() afterwards.

     Hope this helps.

Children