User Profile & Activity

Glenn Layaar Support
Page
of 99

It seemsthe issue is caused by a bug in our WebGrid. A bug report has been submitted to our developer.

In the mean time, you could try using this workaround. The idea is to check whether the row has ny field changed, if there is no change invoke the acceptchanges function to reset the rowstate. Here is the snippet, the snippet is in C#:

void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
{
if (e.Row.Type == RowType.Record)
{
DataRowView dr = (DataRowView)e.Row.DataRow;
try
{
bool identicalRow = true;
if (dr.Row.RowState == DataRowState.Modified)
{
for (int i = 0; i < dr.Row.Table.Columns.Count; i++)
{
if (dr.Row[i, DataRowVersion.Original].ToString() != dr.Row[i, DataRowVersion.Current].ToString())
{
identicalRow = false;
break;
}
}
if (identicalRow)
dr.Row.AcceptChanges();
}

e.Row.Cells.GetNamedItem("RowState").Value = dr.Row.RowState.ToString();
e.Row.Cells.GetNamedItem("RowState").Text = dr.Row.RowState.ToString();
}
catch (Exception excp)
{
//e.Row.Cells.GetNamedItem("RowState").Value = "ERROR"
//e.Row.Cells.GetNamedItem("RowState").Text = "ERROR"
}
}
}


Posted: August 4, 2010 11:01 PM

You will need to use client ID to differentiate between the grids object. Using the assigned ID to the WebGrid under your scenario will always return the first grid in the page.

Is it possible to buffer the client ID in a hidden input value in your project?

Posted: August 4, 2010 12:51 AM

I have discussed your concern with the developer and it seems the issue cause by visual studio path limitation to 246 character.

We will provide a KB article for this issue for other users who might have the same issue.

Posted: August 4, 2010 12:34 AM

In my test the issue could occur if we reference the wrong grid in multiple grid scenario. How do you reference the second grid in the WebPart? Have you tried using the WebGrid ClientID property instead of the ID to reference the second grid?

In my test, using the ClientID will ensure the the referenced grid is the correct one.

If you wish to retrieve the total row from filtered grid, you will need to get the count from the defaultview not the datatable. Here is the new snippet:

protected void WebGrid1_PrepareDataBinding(object sender, DataSourceEventArgs e)
{
rowTotal.Value = ((DataTable)WebGrid1.DataSource).DefaultView.Count.ToString();
}


You will also need to update the hidden value after every filter using the InitialisePostback server side event handler:

protected void WebGrid1_InitializePostBack(object sender, PostbackEventArgs e)
{
if (e.Action == PostBackAction.ColumnFilter)
{
rowTotal.Value = ((DataTable)WebGrid1.DataSource).DefaultView.Count.ToString();
WebGrid1.ClientAction.RenderControl(rowTotal);
}
}


Based on my discussion with the developer, setting the value during the InitializeRow server side event will be too late. You will need to assign the CommandName and CommandArgument earlier in the life cycle. Our suggestion will be to assigned it in the designer using the bind keyword. Here is the snippet:

<ISWebGrid:WebGridColumn Name="View_WebGridColumn" Bound="false" EditType="NoEdit"
ColumnType="Template" Caption=" " Width="50px">
<CellStyle ForeColor="Black" />
<CellTemplate>
<asp:LinkButton ID="PDF_LinkButton" runat="server" OnCommand="Command_Button_Click"
CommandName="QuoteView" CommandArgument='<%# Bind("CALLNUM1") %>'/>
</CellTemplate>
</ISWebGrid:WebGridColumn>



Posted: August 2, 2010 10:48 PM

Based on my test, if I use the Intersoft ClientUI MVVM Business Application template under Silverlight folder the solution will build successfully in both VS 2010 and Blend 4. However, using the Intersoft ClientUI MVVM Business Application template under Intersoft Solutions / Silverlight does produce some issue.

I have submitted a bug report for this template issue, I am very sorry for the inconvinience caused by this issue. The developer just updated me that issue is caused because the path to the project template is too long so it could cause the issue I am having. Try using the solution provided under Silverlight folder or move the template project location so the path will be shorter.

I also could not replicate the interface in which you could only input the name of the project in VS 2010, in my test creating a new solution will require us to input Name, Location, and Solution Name.

Posted: August 1, 2010 11:27 PM

You could use the ClearValue function to clear SelectedIndex or set the SelectedIndex property to -1 to clear the ComboBox selection. However in the RC build there is still a bug so the displayed text will not be cleared. The fix will be ready when WebUI Studio 2010 is released.

The one we will be releasing in August 18, 2010 is WebUI Studio 2010 R1.

Regarding your issue, I could not replicate it using our Contacts_MVVM sample. Attached is the modified file form the sample in order for me to create your scenario. If the list is empty, the Presenter status will be ready and the content will be displayed correctly.

In the ContactViewModel.cs, I add a few property to be used as a column in Presenter. The ContactViews.xaml page is modified to use GridPresenter.

In order to simulate empty list, I modify the LoadContacts LINQ, here is the snippet:

var contacts = from x in doc.Descendants("Customer")
where 1 == 0
select new Contact(x);


Based on my test, the nightly build for the WebDesktop and WebGrid already implement the fix for this issue. We are still doing some testing for the build. This build will be released with 2010 R1 release on August 18, 2010.

All times are GMT -5. The time now is 4:31 PM.
Previous Next