Click here to Skip to main content
15,885,216 members
Home / Discussions / C#
   

C#

 
Generalproblem in reading from DB Pin
hadi20sa17-Jan-04 17:50
hadi20sa17-Jan-04 17:50 
GeneralRe: problem in reading from DB Pin
Rocky Moore17-Jan-04 18:44
Rocky Moore17-Jan-04 18:44 
QuestionHow do you make a .net component run as an embedded resource? Pin
Arg...darn anynomous mode lol17-Jan-04 15:36
sussArg...darn anynomous mode lol17-Jan-04 15:36 
AnswerRe: How do you make a .net component run as an embedded resource? Pin
Colin Angus Mackay17-Jan-04 15:42
Colin Angus Mackay17-Jan-04 15:42 
QuestionHow do you make a .net component run as an embedded resource? Pin
Anonymous17-Jan-04 15:34
Anonymous17-Jan-04 15:34 
AnswerRe: How do you make a .net component run as an embedded resource? Pin
Arjan Einbu18-Jan-04 4:19
Arjan Einbu18-Jan-04 4:19 
AnswerRe: How do you make a .net component run as an embedded resource? Pin
Heath Stewart18-Jan-04 11:15
protectorHeath Stewart18-Jan-04 11:15 
QuestionShould I keep using it or should I change? Pin
caheo17-Jan-04 14:25
caheo17-Jan-04 14:25 
I'm building a form so that customer can fill in their data (with a lot of texboxes). I decided to use datagrid. I don't know if I'm on the right track. I was able to build a array of datagrids programmactically. Here is my situation.

From : mm/dd/yy
To: mm/dd/yy

Fill (button)

Grid1 (all of these grids are built programmatcally and added into a placeholder)

Grid2

Grid3

...

Because there are 2 columns From and To

From : mm/dd/yy (<--- user will fill here) (**)
To: mm/dd/yy (<--- user will fill here) (***)

Grid1

From To A B C
blank blnk (user will fill here) (user will fill here) (user will fill here)
....


I want to assist user to fill the date they enter at (**) into the From column of the grid for them. I don't know what to do. I tried to write a piece of code for the button fill above but I failed.

Help me if you can. Thanks

protected System.Web.UI.WebControls.DataGrid[] grids;


public void fill (object sender, System.EventArgs e)

{

string from = frombox.Text;

string to = tobox.Text;

foreach(DataGrid grid in grids)

{

foreach(DataGridItem item in grid.Items)

{

Response.Write("Found");

//TextBox tb = (TextBox)item.Cells[1].FindControl("answerbox");

//string str = tb.Text;

//ls.Add(str);

}

}

}







Errror

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 214: Response.Write("Control not found");
Line 215: }*/
Line 216: foreach(DataGrid grid in grids)
Line 217: {
Line 218: foreach(DataGridItem item in grid.Items)
GeneralBUG: Graphics.DrawString Pin
leppie17-Jan-04 11:25
leppie17-Jan-04 11:25 
GeneralWhat do you want to do today? Pin
leppie17-Jan-04 11:52
leppie17-Jan-04 11:52 
QuestionHow do you think about delegate in c#? Pin
Forrest Feather17-Jan-04 9:50
Forrest Feather17-Jan-04 9:50 
AnswerRe: How do you think about delegate in c#? Pin
Forrest Feather17-Jan-04 9:56
Forrest Feather17-Jan-04 9:56 
AnswerRe: How do you think about delegate in c#? Pin
Nick Parker17-Jan-04 10:35
protectorNick Parker17-Jan-04 10:35 
AnswerRe: How do you think about delegate in c#? Pin
Heath Stewart17-Jan-04 10:57
protectorHeath Stewart17-Jan-04 10:57 
GeneralRe: How do you think about delegate in c#? Pin
Colin Angus Mackay17-Jan-04 11:16
Colin Angus Mackay17-Jan-04 11:16 
GeneralRe: How do you think about delegate in c#? Pin
Heath Stewart17-Jan-04 11:19
protectorHeath Stewart17-Jan-04 11:19 
GeneralCheck if app is themed Pin
Roger Alsing17-Jan-04 8:56
Roger Alsing17-Jan-04 8:56 
GeneralRe: Check if app is themed Pin
Heath Stewart17-Jan-04 10:40
protectorHeath Stewart17-Jan-04 10:40 
GeneralA GDI+ Question Pin
muralidharck17-Jan-04 6:57
muralidharck17-Jan-04 6:57 
GeneralRe: A GDI+ Question Pin
Heath Stewart17-Jan-04 10:31
protectorHeath Stewart17-Jan-04 10:31 
GeneralRe: A GDI+ Question Pin
muralidharck17-Jan-04 14:40
muralidharck17-Jan-04 14:40 
GeneralExecutin Plugins Pin
CWIZO17-Jan-04 6:54
CWIZO17-Jan-04 6:54 
GeneralRe: Executin Plugins Pin
Heath Stewart17-Jan-04 10:21
protectorHeath Stewart17-Jan-04 10:21 
GeneralRe: Executin Plugins Pin
CWIZO17-Jan-04 22:13
CWIZO17-Jan-04 22:13 
Questionwhat kind of project Pin
gordingin17-Jan-04 6:38
gordingin17-Jan-04 6:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.