Solved

Infragistics UltraWebGrid Delete Server Side

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
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…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

747 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

13 Experts available now in Live!

Get 1:1 Help Now