Hi,
We are facing multiple issues with Manual CRUD for Multilevel Hierarachy. Here is the scenario that we are working on.
1) ContainerGrid objectiveGrid = new ContainerGrid();
e.Row.RowIslands.Add(objectiveGrid);
we are using this mechanism to create the hierarchy of grids. number of child level grids is not fixed. I can grow to 5-10 levels (we have achieved this structure). Finally we have enabled the cell editing for last level of grid. & written update code in
protected
void onRowUpdating(object sender, Infragistics.Web.UI.GridControls.RowUpdatingEventArgs e) event. It works fine data gets updated into datbase. But this event fires the postback event & the child level grid(which is updated) retains it's old value.
How I can show the updated values in the child level grid? Attaching .aspx * .cs file for your reference.
Please let me know if you need more information on this? It is critical for us to fix this issues ASAP.
any updates on this issue.
Hello,
I'm not able to run this code in order to debug it to see what really is going on there . I can see that you in this event populate the child rows. Actually this event is meant to be triggered when row is updated on the client. Thus if AJAX is enabled for the grid, like in your case, only ajax callback will be triggered and in response are returned only the new values for the row not the entire markup for the grid. If you disable AJAX the grid will make a full postback when you update row (cell) and reload with the new values. As I already mentioned you scenario is complex and I am not able to run this code. If you provide me running sample I will dig into further and come up with suggestion.
Thanks.
Hi Rado,
Thanks for replying. I am attaching running sample for your reference. Due to space constraint in attachment size i am attaching ig_res folder separately. Please copy it from my next post & add it so that application can run properly.
In this sample you can see I am loading categories at first level & products belonging to categories in manual load on demand. I have kept the RowAdding behaviour true for base WebHierarchicalGrid & EnableInheritance true as well. so it provides a row for adding data at bottom. In pager of the Products grid I have added html 'Add" button as CustomTemplate & on click of this I will add the row in database using ajax call (press Add button without loosing the focus from new row). Now after update I want to reload the grid in which I have added the new row (i.e Product Grid). How I can do that?
also how I can prevent events that occurs when focus from new row is changed or enter key is pressed on last column? (this is secondary issue)
Thanks in Advance
As per my previous post attaching the ig_res folder for stylesheet & images. If possible please reply as early as possible as we are already delayed for this implementation.
Thanks in advance
forgot to add foler in kast post :)
If you are not able to connect to mdf database in app_data folder please use following script to generate tables used in application in your sql server database & modify connection string accordingly.
CREATE TABLE [dbo].[Category]( [CategoryID] [int] NOT NULL, [CategoryName] [nchar](50) NOT NULL)
CREATE TABLE [dbo].[Product]( [CategoryID] [int] NOT NULL, [ProductID] [int] NOT NULL, [ProductName] [nvarchar](50) NOT NULL)
INSERT INTO [dbo].[Category] ([CategoryID] ,[CategoryName]) VALUES (1 ,'A')
INSERT INTO [dbo].[Category] ([CategoryID] ,[CategoryName]) VALUES (2 ,'B')
INSERT INTO [dbo].[Product] ([CategoryID] ,[ProductID] ,[ProductName]) VALUES (1 ,1 ,'P1')
GO
Thank you for the sample and detailed information. I'm looking into it. I will update you shortly.