Solved

Infragistics UltraWebGrid Delete Server Side

Posted on 2009-07-01
3
1,508 Views
Last Modified: 2013-11-15
I have an UltraWebGrid which is totally read-only - I guess I could just use a table but the Grid seemed to be easier to configure.  I add rows/cells manually and this is all working ok.  I also have a 'Delete' button beneath the grid.

The idea is that when I click the Delete button a code behing function is called which will pickup the active row and then delete the item defined by this from a server side file.  I am niot mapping the file to the grid however as I have to massage the data before display.

My problem is that the click of the delete key causes a postback to call the code behind and this causes the grid to lose the active cell which is always set to nothing by the time the code behind function is called.

If I call a client side function first I could store the name of the item to be deleted but how could I then pass this back to the server side so that the back-end file can be updated?

My preference would be to identify WHY the active item is not retained so that I can call the code behind function directly but if not how can I call my code behind from say a Javascript function passing the name of the item to delete?

Starting to not like the UltraWebGrid!
0
Comment
Question by:ChrisMDrew
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
abel earned 500 total points
ID: 24933921
Seems to me that the place in your code where you set the DataSource to the list of items that you create manually is not inside a "if(!IsPostBack)" block. By not putting it inside such a block, the data will be overridden, the grid will be filled again and all data for the events will be lost (normally resulting in events not firing at all...)

Alternatively, if for some reason you cannot do this, you can set the CommandArgument to the ID of the row you want to delete, either programmatically or in your aspx code.

-- Abel --
0
 

Author Closing Comment

by:ChrisMDrew
ID: 31598705
sorry took me a while to realize this question had been answered as I re-coded using a table once I found a load more issues using the UltraWebGrid
0
 
LVL 39

Expert Comment

by:abel
ID: 24974456
Thanks for checking back and for the grade ;-)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question