User Profile & Activity

Hans Kristian Member
Page
of 69
Posted: September 11, 2012 11:41 PM
Hello,

Thank you for the sample.

I am able to reproduce your issue on my end as well.

I have one solution that you might try.

I removed “ID” column and “Name” column from WebGrid’s PrepareDataBinding.
Then I use HiddenDataMember property in “Gender” column and “Address” column.
In “Gender” column, I set HiddenDataMember to “ID”.
In “Address” column, I set HiddenDataMember to “Gender”.

By doing this, I still can get the value from “ID” column and “Name” column.
And to get the value, I use this javascript:
WebGrid1.GetSelectedObject().GetRowObject().GetCells().GetNamedItem("Gender").GetElement().attributes["ID"].value;WebGrid1.GetSelectedObject().GetRowObject().GetCells().GetNamedItem("Address").GetElement().attributes["Name"].value;

This solution will resolve the “Update Wrong Column” issue and “Misaligned” issue as well.

Please have review on my sample to see how it works.

Thank you.

Regards,

Hans.

Posted: September 11, 2012 2:59 AM

Hello,

I try to make changes (update) the WebGrid in my sample.

However, its works fine on my end.

Could you please help me to modify my sample, so that I can reproduce your issue on my end?

Thank you.

Regards,
Hans.

Posted: September 10, 2012 9:38 PM
Hello,

I’m glad to hear that you have resolved your problem.

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

Thank you.

Regards,
Hans.
Posted: September 9, 2012 9:57 PM

Hello,

To deselect a row from client side, you could use this example snippet code:

function ClearSelectedObj() {       var grid = ISGetObject('WebGrid1');
    grid.ClearSelectedObject(true);
    return true;
}

Regards,
Hans.

Posted: September 7, 2012 4:42 AM
Hello,

I found a solution that you might try.
Please try to add this snippet code in OnAfterInitialize client side event:
function WebGrid1_OnAfterInitialize(controlId) {    var WebGrid1 = ISGetObject(controlId);
    WebGrid1.RootTable.Columns[2].Width = 25;
    WebGrid1.RootTable.Columns[2].Resize(25);
    return true;
}

This solution works for me.

Thank you.

Regards,
Hans.

Posted: September 6, 2012 3:29 AM
Hello,

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

I try to make a simple WebGrid sample. I bind WebGrid to access data source (Northwind.mdb database and Orders table).
But unfortunately, I can’t replicate your issue on my end.

If you don’t mind, could you provide me a simple sample that replicates your issue?
Or would you mind to help me to modify my sample, so can reproduce your issue?

So that I can help you to investigate this issue further more.

Thank you.

Regards,
Hans.
Posted: September 5, 2012 11:31 PM

Hello,

Thank you for your sample.

Now, I can reproduce your issue on my end as well.

It seems this issue appears due to the WebGrid still counting the width of invisible columns.

I will forward this issue to our developer team and I’ll let you know if there are any updates for this issue.

Meanwhile, to resolve this issue you could try to remove the invisible column from your WebGrid’s structure.

Or you could use HTML4 doctype on your page.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >


I am sorry for the inconvenience and thank you for your understanding.

Regards,
Hans.

Posted: September 5, 2012 5:39 AM
Hello,

Thank you for your sample.

I try to modify my sample based on your sample.
But unfortunately I didn’t get any issue like you did.

Could you provide your WebGrid assembly version and your Framework assembly version in your current project?

I attached my sample and video about the result on my sample.

Thank you.

Regards,
Hans.
Posted: September 4, 2012 11:16 PM
Hello,

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

If you want to set the header text from client side, you could try to use this example snippet code:
function ChangeText() {    var paneManager = ISGetObject("WebPaneManager1");
    var pane = paneManager.GetPaneByName("Content");
    pane.SetText("My New Content From Client Side");
}

But if want to the header text from server side, you could use this example snippet code:

WebPaneManager1.GetAllPanes().GetNamedItem("Content").Text = "My New Content From Server Side";

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

Hope this helps.

Regards,
Hans.

Hello,

I’m sorry for the late response.

You could save the WebGrid’s structure to XML file, use this snippet code:

WebGrid1.SaveTablesStructureToXml(Server.MapPath("WebGridTableStructure.xml"));

Then you could load the structure from XML file, use this snippet code:

WebGrid1.LoadTablesStructureFromXml(Server.MapPath("WebGridTableStructure.xml"));
WebGrid1.RebindDataSource();

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

Hope this helps. Thank you.

Regards,
Hans.

All times are GMT -5. The time now is 8:47 AM.
Previous Next