|
|
and that line would be.....???? Notice, in your original post, you didn't supply any lines numbers!
|
|
|
|
|
i've highligthed and underlined the line that was giving me a nullreference exception.
|
|
|
|
|
then use your IDE's editor to investigate line 140 (you have turned on "display line numbers" I trust).
whatever object reference gets dereferenced (as in myObject.something) is a candidate for being null and generating said exception.
|
|
|
|
|
how to call functions like this
private void inputCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e )
from another functions
|
|
|
|
|
you can do it like a classic call
|
|
|
|
|
Usually any functionality i have in an event handler that will be used by anything other than any events it is assigned to i would put in a separate method, which can then be called directly. But that's a suggestion rather than an answer so...
You could try to call it like any other method, i.e.
inputCheckedListBox_ItemCheck(this, new ItemCheckEventArgs());
...but as i said i would never need to do this so i cant say for sure it would work.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Thanks for your suggestion and help. But i didnt work.
Well why i need this as i want to get selected item in arraylist from chekbox list. For that i want to CHECK whether item is selected or not.
if you could help me out in that...
|
|
|
|
|
Try this one
put this code in your function where u want to call the function
object mysender = new object();
ItemCheckEventArgs mye = new ItemCheckEventArgs();
inputCheckedListBox_ItemCheck(mysender,mye);
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
It didnt work..
error ItemCheckEventArgs():"it wont take zero value"
|
|
|
|
|
try this...
object mysender = new object();
ItemCheckEventArgs mye = new ItemCheckEventArgs(0, CheckState.Checked, CheckState.Checked);
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Ya.. it works
thanks a lot.
|
|
|
|
|
It depends on what the inputCheckedListBox_ItemCheck actually does. Usually you can call such a method with null as both arguments.
|
|
|
|
|
Hi
I want to create views of sql server tables , i have loaded columns of a specific tables of specific databases in a check list box in form now i want to know how to fill those columns in a grid view in mdi parent and create view through those columns, means how to create views just like they are created in sql server?
plese some one help
Mariam
|
|
|
|
|
mariamkhaqan wrote: i have loaded columns of a specific tables of specific databases in a check list box in form
I have no idea how this relates to anything else you said...
mariamkhaqan wrote: how to fill those columns in a grid view in
Fill a DataTable with the appropriate data from your database, then just set the DataGridView's DataSource proeprty to the DataTable you created.
|
|
|
|
|
I had a small application of BHO made in c#.
when this BHO got injected on IE7, as the windowStateChange Event gets fired as we switch to different tabs (when many tabs are opened in a windows), but how can we Identify the tab that is active among all the tabs?
|
|
|
|
|
how to read data from lan serial port
i have ip abd port number
|
|
|
|
|
Do you people no know how to to basic research[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
how about going to msdn and get the sample there..!!!
|
|
|
|
|
|
can anybody tel me how i can find tables from database which name is like emp,
i m using sql 2005.
my tables r emp1,emp2,cust1,cust2,.......
i have to show only emp tables into combo box.
|
|
|
|
|
Easy.
select name from sys.tables where name like 'emp%'
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
|
KIDYA wrote: my tables r emp1,emp2,cust1,cust2,.......
Thats about the worse database structure you could have gone with. You should have one table for emp's and one table for cust's (employee's and customers?)
|
|
|
|
|