If i want to bypass this with a if else sting.empty he says that he cannot covert string to bool.
Rmokkenstorm
Posts
-
Select Row -
Select Rowoke open was maybe a bad word to use.. but if i use this he will go to the initialize components section of the form and i wan't to skip that part i really don't want him to do this.. cause there he loads an event wich contains data from a previous form. any way he doesn;t load this 2 times.
-
Select Rowthat opens a new form and that is not exactly what i want cause he loads my populate textbox event which is defined by initialzi components.
-
Select RowHi there, A little quistion. I have a Form that contain's a textfield and a Button. If the button is pressed a new form opens (the old form stays open too) The new form contains a datagrid where the user can select a customer. On the dubble click of the row the form closes and should put this value into the textfield. the select row is not the problem. the dubbelclick isn't a problem as wel. the problem is how can i fill the textbox when dubbelclicked on the row. I can pass the data between the forms. and usaly i use the initialize component or formload to fill up the forms. But in this case he doesn't reopen the first form.
-
TextboxesI have a problem, but i can't see an solution on Form1 I have 2 Fields from Table 1. the user fills in the 2 Fields.. and presses the button. now.. underneath the button there should be some query wich compares the data from a second table that has the 2 fields but also a third. this should be filled out in the second form and this 3 field should be a increment. so.... in the first form the user fills in 10000 AD then press the button the application checks in the second table to the first 2 values. (10000 AD) and check wich 3 third value is following up.. 18 as example. my next problem is: he now should take the first 2 values again and read in the first table wich partner/relatieve of some kind is in this data row. this value he also should put in a textfield.. and when saved.. this value is put in the second table.. really hope you guys could help me. i use visual C# 2005 and access database
-
fill dataset with a paramhow do i fill my dataset with a parameter. i use a access database. I use the following select command: WHERE T075_BORGTOCHTNUMMER_1 LIKE ? and this code i use to fill my dataset:
this.dBANBM_T075_BORGTOCHTTableAdapter.FillBy1(this.testdb1DataSet.DBANBM_T075_BORGTOCHT, textBox1.Text.ToString);
The value that's in my textbox on the form is called VAL. this VAL i put in a string. the error he returns is: No overload for method 'FillBy1' takes '1' arguments I really have no idee to do this. -
passing a parameter into a select commandNo value given for one or more required parameters. how do i set the value of my textbox to this parameter?
-
passing a parameter into a select commandoh i see thanks error: Syntax error (missing operator) in query expression '(T075_BORGTOCHTNUMMER_1 = ?VAL)'. what operator does he need? i've tried '' and [] and stuf like that. the other code i didn't change.
-
passing a parameter into a select commandi use a access database and soon i will use a oracle database. but what do you mean with "are position dependend"?
-
passing a parameter into a select commandi build something like a search function. but he doesn't fill my parameter the parameter does get a value.. but when he should put it into my select command he give the error: No value given for one or more required parameters. so.. this is a little peace of my select command
WHERE (T075_BORGTOCHTNUMMER_1 LIKE VAL)
en this is my code that should fill the parameter "VAL"string val; if (textBox1.Text != string.Empty) { val = textBox1.Text; } else { val = "%"; } this.dBANBM_T075_BORGTOCHTTableAdapter.Fill(this.testdb1DataSet.DBANBM_T075_BORGTOCHT);
hope some one can help or give some advise -
Fill datasetGot my CustomRowEvent working.. able to fill my textboxes in my new form. but i think it's not the fastest or best way. i now use this line of code :
t075_BORGTOCHTNUMMER_1TextBox.Text = Grid["t075BORGTOCHTNUMMER1DataGridViewTextBoxColumn", RowIndex].Value.ToString();
this work just great.. really.. BUT... if you got about.. 60 textboxes.. it's kinna like a lot of work.. so i was thinking.. if i change my fill command with something like this..:this.dBANBM_T075_BORGTOCHTTableAdapter.Fill(testdb1DataSet, Grid, RowIndex);
he give's me the error that Grid and RowIndex does not excist in my current contex.. however.. i use the following codepublic dborgtocht(testdb1DataSet DSet, DataGridView Grid, int RowIndex) { InitializeComponent(); PopulateTextBoxes(testdb1DataSet, Grid, RowIndex); }
so you really should think that he should be able to find them.. hope i explained enough now. -
CurrentRowIndexeh it works great..
textBox1.Text = grid["dataGridViewTextBoxColumn1", row].Value.ToString();
i used this and it works! only one question left.. what is the big difference between a datagrid or datagridview.. cause in some other project (made with visual studio 2003) i use a datagrid and the currentrowindex does work.. many thanks -
CurrentRowIndexi really feeling noob right now .. but.. The name 'RowIndex' does not exist in the current context code =
testdb1DataSet DSet = e.DSet; DataGridView grid = e.Grid; int row = e.Row; textBox1.Text = grid[RowIndex]["T075_BORGTOCHTNUMMER_1"].Value.ToString();
think i should use something likeint RowIndex = CustomRow;
but then i get the error: No overload for method 'this' takes '1' arguments -
CurrentRowIndexi thought i doen's excist.. but it's so strange.. 'cause a normal datagird had the currentrowindex. what is so different to a datagrid or datagrid view. i put your code in my project..
int rowIndex = dBANBM_T075_BORGTOCHTDataGridView.CurrentCell.RowIndex
and he give's me the following error: (There is no row at position 3.) my code to read the row into a textbox =testdb1DataSet DSet = e.DSet; DataGridView grid = e.Grid; int row = e.Row; textBox1.Text = e.DSet.Tables[0].Rows[e.Row]["T075_BORGTOCHTNUMMER_1"].ToString();
-
CurrentRowIndexhi there I want to select a row from my datagrid but he returns me the following error. what exactly is this error and how can i solve it? I use visual C# 2005 'System.Windows.Forms.DataGridView' does not contain a definition for 'CurrentRowIndex'
int rowIndex = dBANBM_T075_BORGTOCHTDataGridView.CurrentRowIndex; { CustomRow(this, new CustomRowEventArgs(testdb1DataSet, dBANBM_T075_BORGTOCHTDataGridView, rowIndex));
-
public int CurrentRowIndex { get; set; }hi there i have a problem i've build a project in visual studio 2003, this program can select a row from a datagrid and opens up a new form with the detail data in this form. i've now instaled visual C# 2005 and i'm rebuilding the application. but the currenrowindex is not working he has no definition for it is the error he givs me. i've search in my old project to the definition for this and there is this line of code:
public int CurrentRowIndex { get; set; }
in the DataGrid[from metadata] and this file is locked can't change it. but this line of code is in that file. in my other project he isn't. and i can't add it cause i can't adjust this file. can someone tell me how to put this line of code there or maybe some other solution? -
Int to stringhe is my program this is the code i use now the "val" get's his value form the program. that is the % if the field is empty. or else the value that is typed in the textfield. but the parameter doesn't get this value
-
Int to stringin the last case he doesn't give my param the value of "val"
-
Int to stringboth line's give the error what i'm trying to achieve is the following i've got one datagrid, 3 textboxes and a button in the textboxes you can fill in a value wich should be param2, param3, param4. on this values he will search my database. select * From Table where (Column like :PARAM2). if there's no value he fills in a wildcard. if i don't do that he's got a empty parameter so he won't be able to select something. the button fill's the database with the parameters. en show's the data in the datagrid. that's the idee. i'de had it working on visual studio 2003.net also with c# and using a Oracle database now visual C# 2005 and a acces database. so once the code did work. hopefully this make some sense
-
Int to stringbut where should i put this.. my value of my param2 is given while running the application. this actually i did know. but how to implent it in my application is the question:D