User Profile & Activity

Hans Kristian Member
Page
of 69

Hello,

Thank you for the confirmation.

I’m glad to hear that the solution works fine on your end.

Should you have further question, please do not hesitate to contact us.

Regards,
Hans K.

Hello,

The “Reset” event will cause the WebGrid will do postback event. It won’t call “OnColumnChanged” client side event.

So I modified the attached WebGrid page, by adding “OnInitializeLayout” server side event to the WebGrid.
In “OnInitializeLayout” event, I add a line of code to modify “Phone” column header color to “Red”.
Here’s the snippet code:

protected void WebGrid1_InitializeLayout(object sender, ISNet.WebUI.WebGrid.LayoutEventArgs e){
    WebGrid1.RootTable.Columns.GetNamedItem("Phone").HeaderStyle.BackColor = System.Drawing.Color.Red;
}

I attached the modified page as well. Please let me know your response.

Regards,
Hans K.

Hello,

Thank you for the reply.

I tried to modify your code so that it can resolve your issue. I add setTimeout() method to your code. Here’s the how I add the setTimeout() method:

function WebGrid1_OnColumnChanged(controlId, tblName, colName, action){
    if (action == "Added")
    {
        if (ISGetObject(controlId).RootTable.GetColumn(colName).AllowGrouping == "Yes")
        {
            window.setTimeout(function ()
            {
                ISGetObject(controlId).RootTable.GetColumn(colName).GetElement().style.backgroundColor = "Red";
            }, 100);
        }
    }
}

Please kindly have review on the attached page & video about the result of this workaround.

Hope this helps.

Regards,
Hans K.

Posted: October 29, 2014 6:29 AM

Hello,

Thank you for the reply.

I have installed Microsoft .NET Framework 4.5.1 on my end. Please see attachment “NetFramework451.png”.

To ensure that the .NET Framework 4.5.1 has been installed on my end, I tried to download the .NET Framework 4.5.1 installer from this link.
However I got a warning message while trying to install the .NET Framework 4.5.1 on my end. Please see attachment “InstallingNetFramework451.png”.

Are you using the same installer .NET Framework 4.5.1 like mine?

Could you inform me information about your current WebGrid assembly version & Intersoft Framework assembly version?
Is there more information regarding your environment that related with your issue? So that I can replicate your issue on my end.

Thank you.

Regards,
Hans K.

Hello,

I created a WebGrid page, I bound the WebGrid to access data source (Northwind.mdb database & Shippers table).
I added a HTML input button to the page and created a JavaScript code to modify the Phone column color into red.

Here’s the example snippet code to modify column’s color:

function SetColor(){
    var WebGrid1 = ISGetObject("WebGrid1");
    WebGrid1.RootTable.Columns[2].GetElement().style.backgroundColor = "Red";
}

I attached the WebGrid page, so that you could see the result furthermore.

Hope this helps.

Regards,
Hans K.

Posted: October 28, 2014 7:27 AM

Hello,

I apologize for any inconvenience this problem may have caused you.

After I reviewed your project, I didn’t find any configuration that have set the “RenderingMode” property to “HTML5” mode.

In “Web.config” page, you set the WebGrid’s RenderingMode property to “XHTML”.
I also didn’t found any RenderingMode property in your WebGrid pages (Basic.aspx; FirstExperince.aspx; FlatGrid.aspx & StockExchange.aspx).
In “DefaultMaster.master” page, you use HTML4 Doctype, not HTML5 Doctype.

Therefore I created a new website using “Intersoft Empty Web Site” project template and .NET Framework 4.5.1 (NewWebSite.png).

In “Default.aspx” page, I added a WebGrid. I set the “RenderingMode” property to “HTML5”.
I bound the WebGrid to access data source (Northwind.mdb database & Shippers table).
I run the WebGrid page on Internet Explorer 11 browser, but unfortunately, it works fine on my end (WebGrid8_IE11_Net451.png).

I will also provide you, my new project. You could get the website from this link: http://1drv.ms/ZWK4Cf
Please kindly have review on the project to see the result.
Please kindly try to update your WebGrid assembly version & Intersoft Framework assembly version to the latest version as well (v8.0.7200.261 & v3.0.5000.912).

Thank you for your help.

Regards,
Hans K.

Hello,

We apologize for any inconvenience this problem may have caused you.

Based on your post, we try to modify the ‘Master Detail’ project template from Crosslight, by adding a button to add button to add new item.

We bind the add button to a method to add a new item. Here’s snippet example code how we add the new item:
private void NewItem(object parameter){
    IList list = this.Items as IList;
    list.Add(new Item() { Name = "Test Item", Category = new Category() { Name = "Camera & Photography"} });
}

Here’s the screenshot about the result:



After have review on your code, it seems your issue occurs due to you use ToObservable() method in ExecuteEvents.

var items = this.SourceItems.ToObservable();
This line of code, will make another new list. So the new items that you create will added to the new list, not you current list.

We suggest you to use IList like we did to add new item.

We attached the modified sample as well. Please kindly have review on the sample to see the result.

Regards,
Hans K.
Posted: October 20, 2014 10:07 AM
Hello,

I apologize for the inconvenience.

I will forward this issue to the developer team and I will let you know if there is an update regarding this issue.

Thank you for your understanding.

Regards,
Hans K.
Posted: October 17, 2014 8:46 AM
Hello,

I apologize for the inconvenience.

I have forwarded the “Duplicate Selected Item” issue to the developer team, under work item ASPNET-130.
I will let you know if there is an update regarding this work item.

Thank you for your understanding.

Regards,
Hans K.


Hello,

The developer team has made a simple Crosslight working sample to show how to integrate Syncfusion component in Crosslight project.
In this sample, we will show you how to use the Syncfusion Chart component through Android project.

Here’s the outline what we do to show the Syncfusion Chart:
1. In Core project, we create a ViewModel to provide the information for the chart. Here’s the snippet example code in SimpleViewModel.cs:
public SimpleViewModel(){
    this.ChartTitle = "Weather Analysis";

    this.PrimaryAxisType = AxisType.Category;
    this.PrimaryAxisTitle = "Month";

    this.SecondaryAxisType = AxisType.Numerical;
    this.SecondaryAxisTitle = "Temperature";

    ObservableCollection<SeriesData> seriesSource = new ObservableCollection<SeriesData>();

    SeriesData seriesData = new SeriesData();
    seriesData.Items.Add(new DataPoint("Jan", 42));
    seriesData.Items.Add(new DataPoint("Feb", 44));
    seriesData.Items.Add(new DataPoint("Mar", 53));
    seriesData.Items.Add(new DataPoint("Apr", 64));
    seriesData.Items.Add(new DataPoint("May", 75));
    seriesData.Items.Add(new DataPoint("Jun", 83));
    seriesData.Items.Add(new DataPoint("Jul", 87));
    seriesData.Items.Add(new DataPoint("Aug", 84));
    seriesData.Items.Add(new DataPoint("Sep", 78));
    seriesData.Items.Add(new DataPoint("Oct", 67));
    seriesData.Items.Add(new DataPoint("Nov", 55));
    seriesData.Items.Add(new DataPoint("Dec", 45));
    seriesSource.Add(seriesData);

    this.SeriesSource = seriesSource;
}

2. Still in Core project, we the binding provider as well. Here’s the snippet example code in SimpleBindingProvide.cs:

public SimpleBindingProvider()
{
    this.AddBinding("Chart", ChartProperties.ChartTitleProperty, "ChartTitle");

    this.AddBinding("Chart", ChartProperties.PrimaryAxisTypeProperty, "PrimaryAxisType");
    this.AddBinding("Chart", ChartProperties.PrimaryAxisTitleProperty, "PrimaryAxisTitle");

    this.AddBinding("Chart", ChartProperties.SecondaryAxisTypeProperty, "SecondaryAxisType");
    this.AddBinding("Chart", ChartProperties.SecondaryAxisTitleProperty, "SecondaryAxisTitle");

    SeriesBindingDescription seriesBinding = new SeriesBindingDescription()
    {
        TitleMemberPath = "Title",
        ItemsMemberPath = "Items",
        IndependentValueMemberPath = "Independent",
        DependentValueMemberPath = "Dependent",
        SeriesType = SeriesType.Column
    };

    this.AddBinding("Chart", ChartProperties.SeriesSourceProperty, "SeriesSource");
    this.AddBinding("Chart", ChartProperties.SeriesBindingDescriptionProperty, seriesBinding, true);
}

3. Move to Android project, we create the object Syncfusion Chart in MainLayout.axml file. Here’s the example snippet code:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#ffcdcdcd">
    <com.syncfusion.widget.chart.SfChart
        android:id="@+id/Chart1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" />
</FrameLayout>

4. In SimpleActivity.cs Android project, we add a couple line of code inside InitializeView(). Here’s the code:

protected override void InitializeView()
{
    base.InitializeView();

    SfChart chart = this.FindViewById<SfChart>(Resource.Id.Chart1);
    if (chart != null)
    {
        this.RegisterViewIdentifier("Chart", chart);
    }
}

And here’s the result from the project: (Crosslight_Syncfusion_Chart.png)

You could get the working sample from this link:
http://git.intersoftpt.com/projects/CROS-SUPP/repos/crosslight-syncfusion-sample/browse

Regards,
Hans K.

All times are GMT -5. The time now is 12:57 AM.
Previous Next