User Profile & Activity

Glenn Layaar Support
Page
of 99
Posted: October 22, 2009 4:05 AM

Based on the error message in the screenshot, the error is returned because the GetRowByKeyValue return null. My hunch is because the data type in the ArrayList and the KeyValues of the parent row does not match. Have you tried using the object of the ChildKey item without casting the item to String?

Or you could use the RestoreExpandedChildRows="true" property in the LayoutSetting so the child row will be expanded and you could retrieve the child row info using the ChildKey variable:

//Acquire the selected child row
WebGrid1.GetTableByName("childTableName").Rows.GetRowByKeyValue(ChildKey)
//Acquire the selected child parent row
WebGrid1.GetTableByName("childTableName").Rows.GetRowByKeyValue(ChildKey).Parent

 

 

The hotfix wil be released in the next 2 weeks at the latest. Here is the link for latest nightly build which already include the reported fix that you could try.
Posted: October 21, 2009 11:39 PM

The workaround does work. We could force the WebTextEditor to HTML view and back to design view to display the toolbar. Here is the snippet to change the WebTextEditor view during WebTab after tab changed client side event:

function WebTab1_OnAfterTabChanged(controlId, activeTab, previousTab)
{
	var WebTab1 = ISGetObject(controlId);
	if (activeTab.Name == "TextEditorInlineContent") {
	    var textEditor = ISGetObject("WebTextEditor1");
	    textEditor.SwitchToHtmlView();
	    textEditor.SwitchToDesignView();
	  
	}
	
	return true;
}

 


Posted: October 21, 2009 11:30 PM

The snippet to retrieve the data in the childrow for a non composite parent row during button click is 

WebGrid1.RootTable.Rows.GetRowByKeyValue(e.CellValue).ExpandChildRow();
string selectedKey = WebGrid1.RetrieveClientLastSelectedObject().KeyValue;

The idea here is we need to expand the parent row first in order to retrieve the child data. The e.CellValue is the value of the button column which in the attached sample is referring to the parentKey column. In other words, in your compsoite key situation, you will need to buffer the composite key parent in a column to be able to reference it if you wanted to expand the row.

Or you could use a simpler solution, by adding the property RestoreExpandedChildRows="true" in the WebGrid LayoutSettings property to ensure the child row will be expanded. Without this property, you will need to use the above technique to ensure the child row table is loaded.

Posted: October 21, 2009 9:56 PM

The sample is showing selfreferencing and hierarchical WebGrid. However the self referencing is done on the Root table. If you would like to have the self referencing in the child table, it could be done using the similar technique since our self reference setting is done on the table level.

You could also set the loading mode to Load on Demand whether you are using self referencing in the Parent or Child table. Did you encounter any issue using heirarchical and selfreference setting when setting the selfreference in the child table? 

The next hotfix is scheduled to be released in the next two week at the latest. The trial version is elegible for the update, however you will need to do the update manually and wait the download link to be provided by the customer support.

I am still discussing the solution for the asynchronous process in your scenario with the developer.

Posted: October 21, 2009 6:18 AM
In my snippet the idea is to buffer the parent key value in the button cell. In your scenario, you will need a temporary column to buffer the composite key to bind this value to the button column.
Posted: October 21, 2009 12:45 AM

It seems there is some compatibility issue between WebTab and WebTextEditor issue. A bud report has been sent to our developer. We will will inform you if there is any update on this issue.

Posted: October 21, 2009 12:43 AM
Using the provided sample, Client_FundamentalAPI.aspx, in the WebTreeView sample. The GetArrayNodes return the correct information of the node in the tree view.

Did this issue also occurs in the provided sample?
Posted: October 21, 2009 12:07 AM

You could set the WebDialog z-index after it is being shown. You will need to retrieve the WebDialogBox Window Element and set the z-index of the element manually. Here is the snippet:

[DialogBoxObject].Window.GetWindowDivElement().style.zIndex = 10000;

 

All times are GMT -5. The time now is 9:27 PM.
Previous Next