Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Infragistics UltraWebGrid Delete Server Side

Posted on 2009-07-01
3
Medium Priority
?
1,514 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 2000 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

722 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