Solved

Infragistics UltraWebGrid Delete Server Side

Posted on 2009-07-01
3
1,476 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Online file editor, manager 6 57
Anyway to make "All" the default in the dropdown? 6 34
consuming an asmx web service in winforms application 3 24
Connection String 16 42
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
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…

932 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now