User Profile & Activity

Glenn Layaar Support
Page
of 99
Posted: July 30, 2010 2:42 AM
From my understanding this will be a nested frame scenario. Based on my test there will be limitation using such scenario which is direct navigation is not available.

You will also need to set the URI mapper for each frame. In main page:

<Intersoft:UXFrame.UriMapper>
<Intersoft:UriMapper>
<Intersoft:UriMapping Uri="~" MappedUri="/PageRoot.xaml"/>
<Intersoft:UriMapping Uri="/{Page}" MappedUri="/Module/{Page}.xaml"/>
</Intersoft:UriMapper>
</Intersoft:UXFrame.UriMapper>

In Module page:

<Intersoft:UXFrame.UriMapper>
<Intersoft:UriMapper>
<Intersoft:UriMapping Uri="/Section/{Page}" MappedUri="/Module/Section/UXModule{Page}.xaml"/>
</Intersoft:UriMapper>
</Intersoft:UXFrame.UriMapper>

The section page will be similar with the module page.

The browser URL will only follow the main frame navigation, when navigating to the Module or Section page. For example, the browser URL will still show http://localhost:5620/ClientUIApplication1TestPage.aspx#/UXPage1 even if we already navigate to the Section and Item page

Posted: July 30, 2010 12:06 AM

This behavior is caused by a bug in the UXComboBox. By default, in your scenario the result box should also show the "name" field.

This issue will be fix on the next build of Client UI.

As a workaround, you could use ItemTemplate to solve the issue. Here is the snippet, I am using C# in my test:
void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
_DataForCombo.Columns.AddRange(new DataColumn[] { new DataColumn("ID", typeof(Int32)), new DataColumn("Name", typeof(string)) });

_DataForCombo.Rows.Add(0, "My Lvo");
_DataForCombo.Rows.Add(1, "My Lvo3");

_DataForCombo.AcceptChanges();
uXComboBox1.DisplayMemberPath = "Name";
uXComboBox1.SelectedValuePath = "ID";

uXComboBox1.ItemsSource = _DataForCombo.AsDataView();

uXComboBox1.ItemTemplate = (DataTemplate)this.Resources["ContactViewTemplate"];
}

Item template snippet:

<Window.Resources>
<DataTemplate x:Key="ContactViewTemplate">
<Grid>
<TextBlock Text="{Binding Name}"/>
</Grid>
</DataTemplate>
</Window.Resources>



@Jeejee

For the snippet to work, you will need to use DataPresenterTextColumn and disable the Presenter AutoGenerateColumns. Here is the modified snippet:

<Intersoft:GridPresenter x:Name="PresenterGrid1" Intersoft:DockPanel.Dock="Top" 
ItemsSource="{Binding AttachmentTypes}" SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
AutoGenerateColumn="No">
<Intersoft:GridPresenter.Columns>
<Intersoft:DataPresenterTextColumn Caption="Test" DataMemberField="AttachmentTypeName"/>
</Intersoft:GridPresenter.Columns>
</Intersoft:GridPresenter>

@Balachander

I would like to note that without using RowTemplate, the Presenter now only work partially in MVVM scenario. Without RowTemplate, Presenter will only do initial binding once, that will mean in the Contacts sample after you edit the Contacts, the changes will not be reflected on the Presenter by default. 

A more integrated support for the presenter is planned for R2 release.

You will need a Presenter nightly build to achieve this scenario. The presenter nightly build is attached. Please extract the assembly to the Client UI installation folder, by default C:\Program Files\Intersoft Solutions\ClientUI 3\Silverlight 4\Bin.

With the new build, binding ViewModel to presenter will be similar with other UX control. Here is the snippet:

<Intersoft:GridPresenter Intersoft:DockPanel.Dock="Top" x:Name="PresenterGrid1" ItemsSource="{Binding Contacts}" SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}" RowTemplate="{StaticResource ContactViewTemplate}" RowHeight="108" ></Intersoft:GridPresenter>

I also attached a modified ContactsView.xaml that implement the Presenter instead of UXListBox. In this sample, I am using the previous UXListBox ItemTemplate as the new RowTemplate for the GridPresenter. 

Do you mind providing us with the WebGrid setting you are using? We will need the WebGrid setting you are using in order to invetigate the issue further.

You could also try updating your WebGrid and Framework to the latest build, WebGrid 6 build 219 and WebUI Framework 3 build 753, if you have not using the latest build to check if the issue has been resolved in the latest build.

In my test, for hierarchical grid there will be an error if we try to add a new child row using the same technique programatically from client side. A bug report has been submitted.

Just to clarify we have the same issue, what did the error message in your page? In my test, the error is "'Row.SubTable' is null or not an object".

Re-attached the code.

The update panel compatibility is being fixed by the developer. The flypostbask is a workaround we provided for such scenario while the fix is being develop.

Based on my discussion with the developer, the function parameter currently only accept string and number. For your scenario, you could use number to determine if the value is true or false, 0 is false positive number is true. 

FunctionParameter boolVal1 = new FunctionParameter("1", "number"); //True
FunctionParameter boolVal2 = new FunctionParameter("0", "number"); //False

I am very sorry for the mark of answer issue. Unfortunately, the mark as answer can not be undone. I will update the mark as answer post to inform that this is still an ongoing discussion.

Posted: July 26, 2010 9:45 PM

Based on your description have you tried using the WebGrid refresh function in order to force the WebGrid refresh the data after you invoke all the update function.

Here is the updated snippet:

function AddGridRow()
{
var grid = ISGetObject("wgTest");

var maxRow = 2;
var i = 0;

var updateProcess = setInterval(function ()
{
if (!grid.IsInProgress && i < maxRow)
{
var newRow = grid.RootTable.NewRow();
var cells = newRow.GetCells();

//Add cell logic

newRow.Update();

i++;
}

if (i >= maxRow)
{
clearInterval(updateProcess);
updateProcess = null;

grid.Refresh();
}
}, 15);
}


Another suggestion will be to update your WebGrid and WebUI Framework version to the latest version.

Posted: July 26, 2010 2:16 AM

Unfortunately, our WebTextEditor could only save to or open HTML file for now.

Showing merged template document is achievable using a workaround, normally you will need to display the preview section in order to display the merge document. Here is the snippet, you will need to implement the Initialize client side event handler:

function WebTextEditor_OnInitialize(controlId)
{
var WebTextEditor = ISGetObject(controlId);
WebTextEditor.SwitchToPreview();

setTimeout(function ()
{
var previewText = WebTextEditor.GetPreviewIFrameElement().contentWindow.document.body.innerHTML;

WebTextEditor.SwitchToDesignView();
WebTextEditor.SetValue(previewText);

WebTextEditor.GetPreviewTabElement().style.display = "none";

var hiddenToolBar = ["cmdInsertLabel", "cmdPreview", "cmdSendMail", "cmdSeparator4", "cmdSeparator5"];

for (var i = 0; i < hiddenToolBar.length; i++)
{
var toolbarElem = document.getElementById(WebTextEditor.ToolBar[1].Name + "_" + hiddenToolBar[i]);
toolbarElem.style.display = "none";
}
}, 150);
}

The snippet will move the preview text from the preview to design view. Afterward it will hide the mail merge toolbar and preview tab. I am using the MailMerge_CustomCollection provided sample in order to test my snippet

Posted: July 26, 2010 12:18 AM

Out test could not replicate the object reference not set issue you are facing.

Do you mind providing us a simple sample or a more detailed error mesage with the stack trace so we could investigate the issue further?

All times are GMT -5. The time now is 6:45 PM.
Previous Next