0

スクロール可能なグリッドビューを作成しました。そこで、グリッドヘッダーのコピーであるテーブルを作成しました。それぞれに幅プロパティをピクセルで与えます。ただし、ブラウザによって動作が異なります。助けていただければ幸いです。

これが写真です これはグリッドヘッダーのマークアップです。

<table  cellpadding="0" cellspacing="0">
            <tr>
                <th width="26px">
                </th>
                <th width="152px">
                    Sosial sığorta nömrəsi
                </th>
                <th width="122px">
                    Soyadı
                </th>
                <th width="121px">
                    Adı
                </th>
                <th width="120px">
                    Atasının adı
                </th>
                <th width="50px">
                    Cinsi
                </th>
                <th width="100px">
                    Doğum tarixi
                </th>
                <th width="122px">
                    Uçota düşmə tarixi
                </th>
                <th width="102px">
                    SUN (köhnə)
                </th>
                <th width="150px">
                    Sığorta edənin VÖEN-i
                </th>
                <th width="102px">
                    SUN
                </th>
                <th width="102px">
                    Ölüm tarixi
                </th>
            </tr>
        </table>
4

2 に答える 2

0

Blachshmaが言ったように、すべてのブラウザで同じ列幅を固定するために使用できるテーブルは1つだけです...そして、テーブル/グリッドをスクロール可能にするのは簡単な作業だと思います...

これを試して..

<div style="max-width:500px;overflow:auto;">

    // Here, HTML code for Table or Gridview

</div>

願わくば、それはあなたを助けます。!! ありがとう。

于 2013-01-15T11:36:56.453 に答える
0

1つはヘッダー用、もう1つはデータ用の2つのテーブルを作成する代わりに、1つのテーブルを作成するだけです...

このようなものでは、すべての列が正しい幅になっている必要があります。

<table  cellpadding="0" cellspacing="0">
        <tr>
            <th width="26px">
            </th>
            <th width="152px">
                Sosial sığorta nömrəsi
            </th>
           .....
            <th width="102px">
                Ölüm tarixi
            </th>
        </tr>
        <tr> <!-- Enter data here -->
        </tr>
        <tr> <!-- Enter data here -->
        </tr>
    </table>
于 2013-01-08T12:00:16.020 に答える