User Profile & Activity

Shawn August Member
Page
of 19

Hello,

Forgive me for not being detail. As I said before, It is not a bug. Each browser have their own mechanism in rendering. In IE, it is sensitive for rendering table. To make the layout better, sometimes it needs to add style layout:fixed for the table. That's what I added in your sample.
After adding those style, it would automatically render in proper width. The last steps I did only customize the column width to make a better layout.

Regards,
Handy

 

This worked for me. Thanks.

Hello Shawm,

It because each browser have their own mechanism to render inside tables. So, we need to adjust the styles. I have modified your .ascx. It should work fine.

Regards,
Handy

What is the fix? Just add a width to the column? What should the width be? Just bigger than the width of the underlying controls within the column?

Hello Shawn,

Can you let me know your page structures and styles as well? I will try to follow them and replicate the issue in here. If it is in simple page, it works fine. So, I think there must be some styles, container, etc that need to be used for replicating this issue.
Btw, we also have WebCallOut control for this functionality.

Regards,
Handy

 

I uploaded a reproducible example within a zip archive.

<ISWebInput:WebInput runat="server" ID="wiTransHeaderStatementFrom" Width="100px" CausesValidation="false">	</ISWebInput:WebInput>                          
<asp:CustomValidator runat="server" ID="cvTransHeaderStatementFrom" ControlToValidate="wiTransHeaderStatementFrom" ClientValidationFunction="wiTransHeaderStatementFrom_OnValidate" ValidateEmptyText="true" Display="None" ErrorMessage="Statement From Date is required" /> 

<ajaxToolKit:ValidatorCalloutExtender runat="server" ID="vceTransHeaderStatementFrom" TargetControlID="cvTransHeaderStatementFrom" />  

Please refer to screen shots for reference.  This does not occur with the ASP Textbox control.

 

This bug does not occur with Google Chrome but does with IE8 w/o compatibility.

Hi,

I disagree. The solution I created within the February 9, 2011 10:11 post clearly shows a HUGE performance problem. Without the toolbar's child item, the grid refreshes (only 2155 records) in under 2 seconds (acceptable) but nearly 14 seconds with the toolbar's child item. That's nearly 700% increase! That *IS* a performance bug. If this is related to the browser then I suggest fixing the bug by defaulting the necessary CSS as your devs wouldn't know this limitation. 

 

Please pass this information to your development staff as we have had this issue for a very long time and it needs to be addressed.

As I said before, from beginning until the end, we could not replicate the performance issue because of AutoFitColumn.
I already explained that it is true that there is a different time when using AutoFitColumn. But it's still acceptable.

Perhaps, you can send us a simple sample that replicates this issue. We need this to investigate the issue.

Regards,
Handy




Let's forget about the AutoFitColumn. Please refer to the VS solution that I provided which clearly shows the performance bug. I am sorry but 700+% increase in time *IS* a performance problem.  I can easily create another solution with some other 3rd party WebGrids that do not have this problem for some comparison.  Something is wrong here.


It should not take 14 seconds to display 2,000 records in a simple grid. Whether or not this is a browser issue, it can be resolved with some default CSS which I think you should be fixing on your end. The developers would never know about this limitation and how to fix it.  


Please refer to the reproducible VS solutiothat I have provided.


Hello,

Based on discussion with our developer teams, it seems this one is not a bug.
WebButton state could not be updated with that way. Also, during the FlyPostBack (refresh), it could not be done. If you want to disable the state, you can use invoke script from server side.

By using invoke script, you can call your javascript function to disable the state. 
Unfortunately, this is the only way. WebButton won't be render the html because the state is disabled due to Invoke script call.

Regards,
Handy

 

Thanks for your reply. Can you explain this a bit more? 

Also, the example that you provided won't work? What's the purpose of the WebGrid's ClientAction's RenderControl method?


protected void WebGrid1_InitializePostBack(object sender, ISNet.WebUI.WebGrid.PostbackEventArgs e)
    {
        if (e.Action == PostBackAction.RefreshData)
        {
            WebButton1.Enabled = false;
            WebGrid1.ClientAction.RenderControl(WebButton1);
        }
    }

 

Please try to use following JavaScript code in order to hide “Address” column in WebGrid from client-side.

function WebButton1_OnClientClick(controlId, parameter) {    var WebGrid1 = ISGetObject("WebGrid1");
    WebGrid1.RootTable.Columns.GetNamedItem("Address").Visible = false;
    WebGrid1.RootTable.Columns.GetNamedItem("Address").HideFromView();
    return true;
}

Please let us know whether this helps or not.

 

It does hide the columns but subsequent new rows display data in the wrong columns. For example, data for Field A is now in Field B. Please refer to the screen shots above. This was also reproduced by you and you said it would be given to the developers? What's the status of that?

Hello,

Thank you for your valuable feedback. I will let our developer team know about feedback in our CSS. However, I am not sure if also need to be implemented in WebGrid because WebGrid works fine with the default style.

Also, I ever told in previous posts in this thread that I could not replicate very slow performance when using AutoFitColumn. It's true that there is a differences when AutoFitColumn true/false. But the performance is not very slow which is still acceptable in my testing.

Regards,
Handy

 

I disagree. The solution I created within the February 9, 2011 10:11 post clearly shows a HUGE performance problem. Without the toolbar's child item, the grid refreshes (only 2155 records) in under 2 seconds (acceptable) but nearly 14 seconds with the toolbar's child item. That's nearly 700% increase! That *IS* a performance bug. If this is related to the browser then I suggest fixing the bug by defaulting the necessary CSS as your devs wouldn't know this limitation. 

 

Please pass this information to your development staff as we have had this issue for a very long time and it needs to be addressed.

 

Thank you.

Actually, the column’s visibility and HiddenDataMember are different approach.

In order to hide a column, you can try to set column visibility to False.

The snippet code below shows how to hide the “ProductID” column by setting the the column visibility to False.

<ISWebGrid:WebGridColumn Caption="ProductID" DataMember="ProductID" Name="ProductID"
    Width="100px">
</ISWebGrid:WebGridColumn>

HiddenDataMember property sets the hidden data member to be rendered along with this column. This property allowed you to render specified hidden data member along with the cell as pseudo attribute. You can easily retrieve the hidden data member’s value in client-side by accessing the DataMember directly.

The snippet code below shows how to set the “ProductID” as HiddenDataMember in “ProductName” column.

<ISWebGrid:WebGridColumn Caption="ProductName" DataMember="ProductName" Name="ProductName"
    Width="100px" HiddenDataMember="ProductID">
</ISWebGrid:WebGridColumn>

And below is the JavaScript sample that can be used to get the value of ProductID.

function getdata() {R
    var grid = wgGetGridById("WebGrid1");
    var selObj = grid.GetSelectedObject();
    var selRow = selObj.GetRowObject();
    var cells = selRow.GetCells();
    var productName = cells.GetNamedItem("ProductName");
    var ProductID = productName.GetElement().attributes["ProductID"].value;

    alert(ProductID);
}

Hope this helps.

 

This is not what I need. I just need to be able to change the visiblity of a column via JavaScript either using CSS or some other property. If CSS is the wrong approach, is there another JAVASCRIPT property/method that I can use to hide/show columns dynamically?

 

Thanks.

 

 

Hi,

There is no workaround for now. I will ask our developer teams when it would be fixed.

Regards,
Handy

 

I provided a work-around above. However, please let me know when the underlying bug is fixed that will allow me not to use javascript to update the button's UI.

 

Thanks.

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