471,309 Members | 1,080 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,309 software developers and data experts.

Type initializer exception

Hello
I've got a problem with .net2
There's a form with dataGridView. I want to add some items to
....ComboBoxCell in ...DefaultValuesNeeded event. When I add them with
((DataGridViewComboBoxCell)e.Row.Cells["colCriteria"]).Items.Add("something");
it's ok. But when I want some other class to do it, then I get
TypeInitializerException on line:
Criteria.Fill(((DataGridViewComboBoxCell)e.Row.Cel ls["colCriteria"]).Items);
I tried passing only cell, tried passing collection, tried passing
delegate to ...Items.Add().
Every time I get TypeInitializerException. What's the problem?
I get exception when calling Criteria.Fill - this function doesn't
start. It's a static function.

Feb 8 '06 #1
0 1096

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by =?Utf-8?B?YmlqYXk=?= | last post: by
4 posts views Thread by =?Utf-8?B?YmlqYXk=?= | last post: by
2 posts views Thread by tshad | last post: by
1 post views Thread by =?Utf-8?B?UGhpbGlwIFdhZ2VuYWFy?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.