User Profile & Activity

Hans Kristian Member
Page
of 69
Posted: October 25, 2012 4:59 AM

Hello,

 

Please forgive me for lack of understanding about the reported problem.

Perhaps you could use OnBeforeRequest client side event for your scenario.

I made a simple WebCombo sample OnBeforeRequest event. I bind WebCombo to access data source (Northwind.mdb database and Shippers table)

Please have review on my sample and let me know your response.

However, if this work around doesn’t appropriate with your scenario. Could you provide me a step by step or simple runnable sample that similar with your current scenario? Probably I can help you to find a suitable work around.

Thank you.

Regards,

Hans.

Hello,

 

Thank you for your patience.

I have modified your wbAARS_OnEditKeyDown function and activateEditMode function.

Please let me know the result on your end.

Regards,

Hans.

Hello,

Thank you for your reply.

After I investigate this issue further more.

I remove a couple line of code.

In WebGrid1_InitializePostBack, I remove:

If (e.Action.Equals("Refresh"))

And in SaveScrollPosition function, I remove:

if (action == "Refresh")

Please have a review on my sample and let me know the result.

Thank you.

Regards,

Hans.

Posted: October 22, 2012 11:30 PM

Hello,

Thank you for your reply and code and please forgive me for lack of understanding about the reported problem.

I modify my sample using your code.

I add a couple of dummy column to the WebGrid.

I try to run the sample on IE and Firefox, but unfortunately, I can’t reproduce your issue on my end.

I attached video about the result of my sample.

Please kindly have a review on my video and my sample.

And please let me know if there are configurations or steps that I missed while reproducing your issue.

Or perhaps you could modify my sample so that can replicate your issue.

Thank you.

Regards,

Hans.

Hello,

Thank you for your code.

I create a simple WebGrid sample, based on your code in your post.

I bind WebGrid to access data source (Northwind.mdb database and Shippers table).

And I can replicate your issue on my end as well.

To resolve I modify your javascript code.

In wbAARS_OnEditKeyDown function, I add this code:

var curCell = grid.GetActiveEditCell().cellIndex;

And I modify from:

activateEditMode(grid, curRowIndex - 1, columnName);

To:

activateEditMode(grid, curRowIndex, curRowIndex - 1, columnName, curCell - 1);

And I change your activateEditMode function to:

function activateEditMode(grid, curRowIndex, nextRowIndex, columnName, cell) {
            if (nextRowIndex != 0 && nextRowIndex < grid.TotalRows) {
                var nextRowEl = grid.RootTable.GetRow(nextRowIndex);
                var curRowEl = grid.RootTable.GetRow(curRowIndex);
                var cell1 = nextRowEl.GetCell(cell);
                var cell2 = curRowEl.GetCell(cell);
                grid.SetFocus();
                cell2.Select(true);
                nextRowEl.Select();
                cell1.ActivateEdit();
            }
        }

If the issue still persists, could you modify my sample so that I replicate your issue on my sample?

So I can help you to investigate the issue further more.

Thank you.

Regards,

Hans.

Hello,

I made a simple WebGrid sample based on your information.

I bind WebGrid to access data source (Northwind.mdb database and Shippers table).

On ShipperID column, I set Visible property to False and IsAutoIncrement  property to True.

And I can reproduce your issue as well.

To resolve this issue please try to modify InsertCommand and InserParameters of you DataSource control.

In my sample, I modify InsertCommand from:

InsertCommand="INSERT INTO [Shippers] ([ShipperID], [CompanyName], [Phone]) VALUES (?, ?, ?)"

To:

InsertCommand="INSERT INTO [Shippers] ([CompanyName], [Phone]) VALUES (?, ?)"

I also modify InsertParameters from:

<InsertParameters>
	<asp:Parameter Name="ShipperID" Type="Int32" />
        <asp:Parameter Name="CompanyName" Type="String" />
        <asp:Parameter Name="Phone" Type="String" />
</InsertParameters>

To:

<InsertParameters>
	<asp:Parameter Name="CompanyName" Type="String" />
        <asp:Parameter Name="Phone" Type="String" />
</InsertParameters>

If the issue still persists, could you modify my sample so that I replicate your issue on my sample?

So I can help you to investigate the issue further more.

Thank you.

Regards,

Hans.

Posted: October 18, 2012 5:20 AM

Hello,

I have re-sent my email through Ticket-ID [IS-361E38FA-CC6C-4896-8D11-563E916016DE]

Thank you.

Regards,

Hans.

Posted: October 16, 2012 10:18 PM

Hello,

I’ll submit this issue to the developer team.

Meanwhile, if you don’t mind, could you provide me a simple runnable sample that replicates this issue?

Perhaps I could help to implement the work around to your sample.

Or could you inform me if there are configurations that I missed in my sample?

Thank you.

Regards,

Hans.

Posted: October 16, 2012 1:03 AM

Hello,

Perhaps you could try this work around code below:

protected void Page_Load(object sender, EventArgs e)
    {
        //get the number of "bar_Picture Tasks" items
        int iPaneItems = WebExplorerPane1.Panes.GetNamedItem("bar_Picture Tasks").PaneItems.Count;
        for (int j = 0; j < iPaneItems; j++)
        {
            var viewPaneItem = WebExplorerPane1.Panes.GetNamedItem("bar_Picture Tasks").PaneItems[j];
            //if the item was disabled
            if (viewPaneItem.Enabled == false)
            {
                string javaScriptCode = "";
                javaScriptCode += "var explorerPane = ISGetObject('WebExplorerPane1');";
                javaScriptCode += "var viewPaneItem = explorerPane.Panes.GetNamedItem('bar_Picture Tasks').PaneItems[" + j + "];";
                javaScriptCode += "viewPaneItem.GetElement().style.color = 'Gray';";
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "Script", javaScriptCode, true);
            }
        }
    }

This code will change the color of disabled item to gray.

I have modified my sample as well. You could review on my sample to see the result.

Regards,

Hans.

Posted: October 16, 2012 12:46 AM

Hello,

I made a simple sample base on your information.

I bind WebGrid to access data source (Northwind.mdb database & Shippers table) and I set WebGrid’s height to 100%.

Then, I add some javascript code in WebPaneManager’s OnAfterCollaps client side event.

function OnAfterCollapse() {
    var WebGrid1 = ISGetObject("WebGrid1");
    WebGrid1.Refresh();
}

I attached the simple sample as well.

Hope this helps.

Thank you.

Regards,

Hans.

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