Solved

Infragistics UltraWebGrid Delete Server Side

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
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 synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

738 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