User Profile & Activity

zhang li Member
Page
of 2
Posted: June 1, 2011 10:33 PM

I set the visiblity of the last two column to false,I want to, when i click the button,i want to show all coloum on clientside.how can i do. thanks

Posted: May 31, 2011 12:50 AM
here is my project ,when the page load ,the grid show less coloum (lesscoloum.png), when i click the update button,the grid show all coloum(allColoum.png).here is my code .may tel me how can i do .thanks.







Posted: May 30, 2011 4:23 AM
thanks ,here is my another problem .can you tell me how can i do.

http://www.intersoftpt.com/Community/WebDesktop/webgrid-show-and-hide-coloum/
Posted: May 30, 2011 4:16 AM

4.0

Posted: May 5, 2011 10:04 PM

thanks your answer ,but when i add new row ,i find other problem.when  the database has  no data, i add new row , and set

<LayoutSettings AllowAddNew="Yes" NewRowLostFocusAction="AlwaysPrompt">
</LayoutSettings> 
i add new row and then lost focus, it  never show  whether you want to add the new row and cancel the operation. here is my code .thaks.
Posted: April 25, 2011 9:22 PM

here is my code .but i find other problem,in my project have a button and a grid .when the page load the grid see 1.png ,when you click the button ,it appear 2.png. 

thanks

Posted: April 14, 2011 9:40 PM

thanks ,my webgrid version is 7.0.7200.419.

Posted: April 13, 2011 9:27 PM

 i hvae been update my webgrid . i test your project .there is no problem .but i change you code,i set two table in you code ,the page will apper the scroll bar. this is my code

 

<html>
<head runat="server">
    <title>Untitled Page</title>
  <style>
        .style1
        {
            width: 100%;
            height: 200px;
            border: solid 1px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <table border="0" align="center" cellpadding="6" cellspacing="0" width="100%" >
        <tr>
            <td>
                <table class="style1">
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <table class="style1">
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <ISWebGrid:WebGrid ID="WebGrid1" runat="server" DataSourceID="AccessDataSource1"
                    Height="250px" UseDefaultStyle="True" Width="500px">
                    <layoutsettings culture="zh-CN" showcolumnaction="true">
            <TextSettings Language="UseCulture">
            </TextSettings>
        </layoutsettings>
                    <roottable datakeyfield="CustomerID">
            <Columns>
                <ISWebGrid:WebGridColumn Caption="CustomerID" DataMember="CustomerID" Name="CustomerID"
                    Width="100px">
                </ISWebGrid:WebGridColumn>
                <ISWebGrid:WebGridColumn Caption="CompanyName" DataMember="CompanyName" Name="CompanyName"
                    Width="100px">
                </ISWebGrid:WebGridColumn>
                <ISWebGrid:WebGridColumn Caption="ContactName" DataMember="ContactName" Name="ContactName"
                    Width="100px">
                </ISWebGrid:WebGridColumn>
                <ISWebGrid:WebGridColumn Caption="ContactTitle" DataMember="ContactTitle" Name="ContactTitle"
                    Width="100px">
                </ISWebGrid:WebGridColumn>
                <ISWebGrid:WebGridColumn Caption="Address" DataMember="Address" Name="Address" Width="100px">
                </ISWebGrid:WebGridColumn>
                <ISWebGrid:WebGridColumn Caption="City" DataMember="City" Name="City" Width="100px">
                </ISWebGrid:WebGridColumn>
                <ISWebGrid:WebGridColumn Caption="Region" DataMember="Region" Name="Region" Width="100px">
                </ISWebGrid:WebGridColumn>
                <ISWebGrid:WebGridColumn Caption="PostalCode" DataMember="PostalCode" Name="PostalCode"
                    Width="100px">
                </ISWebGrid:WebGridColumn>
                <ISWebGrid:WebGridColumn Caption="Country" DataMember="Country" Name="Country" Width="100px">
                </ISWebGrid:WebGridColumn>
                <ISWebGrid:WebGridColumn Caption="Phone" DataMember="Phone" Name="Phone" Width="100px">
                </ISWebGrid:WebGridColumn>
                <ISWebGrid:WebGridColumn Caption="Fax" DataMember="Fax" Name="Fax" Width="100px">
                </ISWebGrid:WebGridColumn>
            </Columns>
        </roottable>
                </ISWebGrid:WebGrid>
            </td>
        </tr>
    </table>
    <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Northwind.mdb"
        SelectCommand="SELECT * FROM [Customers]"></asp:AccessDataSource>
    </form>
</body>
</html>

 

when i click the head it will appear buy.I test in IE8 ,not in firefox.

when you test my project

one step you see 1.png

after you operate one step ,it will show  like  2.png

then you click the head it will show  like   3.png

 

 thanks

Posted: April 13, 2011 2:05 AM

i test your project ,there is no problem, but there is other problem .in your project you  set this code

  body.Style.Add("overflow", "hidden"),

when the page apper the scroll bar.when id click the head it show

when you test my project

one step you see 1.png

after you operate one step ,it will show  like  2.png

then you click the head it will show  like   3.png

 

my  project use webgrid 7.0  and the browser is IE8

thanks

Posted: March 28, 2011 9:13 PM

 thanks ,but when i export by text ,it happen the same problem.

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