私はすべてのデバイスでよく見えるようにgridviewを作成しようとしています。私は下のサイトに従っています。 http://codingresolved.com/discussion/2121/how-to-create-a-responsive-grid-view-in-asp-net-c/p1。しかし、私は私の要求を満たすことができません。オブジェクト参照がオブジェクトのインスタンスに設定されていません[Gridview]
ここにgridviewページがあります。 GridViewので
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery-footable/0.1.0/css/footable.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-footable/0.1.0/js/footable.min.js"></script>
<script src="Js/footable.js"></script>
<script src="Js/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
$(function() {
$('#<%=MyProfileGridView.ClientID %>').footable({
breakpoints: {
phone: 300,
tablet: 640
}
});
});
、私はのCssClass = "footable" を追加しました。
はここでここで私は取得しています誤りであること
の終了コードバックです。
Object reference not set to an instance of an object.
説明現在のWeb要求の実行中に、未処理の例外が発生しました。エラーの詳細とコード内のどこで発生したのかについては、スタックトレースを参照してください。
例外の詳細:System.NullReferenceException:オブジェクト参照がオブジェクトのインスタンスに設定されていません。
ソースエラー:
ライン26: 27行:MyProfileGridView.UseAccessibleHeader =はtrue。 行28:MyProfileGridView.HeaderRow.TableSection = TableRowSection.TableHeader; 行29: 行30:TableCellCollectionセル= MyProfileGridView.HeaderRow.Cells;
こんにちは、私を助けてください。おかげで事前最初
[試しましたか?](http://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it) –
これらの行にブレークポイントを配置し、デバッグしてください。何かが 'null'、おそらく' HeaderRow'や 'TableRowSection'ですが、私たちが推測するのは難しいです。 –
あなたの質問とは無関係ですが、目的に応じて 'cells [1]'をスキップしていますか?重複したコードとアウトオブオーダーの手動による索引作成は、起こるのを待っているバグのようです。 – Quantic