
calvin
Avatar/Signature-
Posts
72 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by calvin
-
How to remove the row?? :confused:
-
Hi, Is anyone know how to hide the rows in a datagrid? The datagrid consists of a checkbox column, in certain situation, some row will be disable. When user click on a button, it will hide the row which checkbox has been disable Thank you for any help. Calvin
-
Problem solved I got my solution already, thanks for your help.
-
How to refresh(clear) datagrid binding with DataTable? Problem has been solved, the approach on the below will refresh the arraylist. DataGrid1.DataSource = (New ArrayList) DataGrid1.DataBind() But how about refreshing the DataTable binding to datagrid? Any idea? Calvin :)
-
Hi, I do a textbox to collect data and binding to datagrid(use arraylist to hold data). When user click the submit button, all the data in arraylist will be add to database. Then, if I try to add data to datagrid, the previous "record" still remain in datagrid. I would like to know how to clear the datagrid. Is anyknow could give me some idea and help will more appreciate. Calvin :)
-
Store "Null" to Date/Time datatype in Access
calvin replied to calvin's topic in Database / XML / Reporting
Thanks for help, it works Calvin :D -
Store "Null" to Date/Time datatype in Access
calvin replied to calvin's topic in Database / XML / Reporting
I get this error: Parameter 0: '@TimeIn', the property DbType is uninitialized: OleDbType.Empty. I think we can't use "Nothing" add to table Calvin -
I want to update a Date/Time datatype in MS Access by Null value(or blank?). A variable is declare as DateTime datatype in ASP.NET. I was use the following approach try to set null/empty. Dim TimeIn as DateTime TimeIn = New DateTime <<------ What should i change here?? :confused: 'Update Statement here' ... ... cmdUpdate.Parameters.Add("@TimeIn", TimeIn) ... After update the DB, all the column which store TimeIn contain a value 01-01-2001, this is not what i want. I want it is "Totally nothing(null/empty)" in the column. When I bind the TimeIn to the datagrid, it will show "12:00:00 AM " Is anyone know to solve it.Thank you Calvin
-
Not works in Child Control First of all, I'm really appreciate for you helps. I had try you code again, it is works :eek: , but how can I do the "Child control"(In script :confused: ) for the textbox and dropdonwlist inside a "DataList". I was get the "Object Required" Error by this problem :( . Thanks again. Calvin :)
-
NOT individual radio button, but radiobuttonlist In fact, I was do a DataList which contain a radiobuttonlist to allow user check either dropdownlist to select the item or textbox to type himself. If I create separate radiobutton, then when I "check dropdownlist in the first DataListItem" and "check textbox in the second DataListItem". It makes the "first DataListItem of dropdownlist" to unselect after I check the "second DataListItem of dropdownlist/textbox" and so on. If I use the radiobuttonlist, the problem won't occur. But can't do javacript function because in "onclick="abc(this,xx(object))"" and the function don't know which object(ListItem in RadioButtonList) I select. For any suggestion and comment will appreciate. Calvin :(
-
Object required error! I did follow your code and paste it to the html page. But I get this object required error. As I mentioned before, how to call the function with the object?? The function is good, but what i need to do on the following??I only want to use a radiobuttonlist with few radiobutton(ListItem), not use separetely radiobutton as a group.I dunno how to "Naming" the "radiobutton_0" & "radiobutton_1" in radiobuttonlist. This is what I want: <asp:RadioButtonList id="rbSelection" onclick="javascript:abc(this);" runat="server"> <asp:ListItem Value="1">1</asp:ListItem> <asp:ListItem Value="2">1</asp:ListItem> </asp:RadioButtonList></TD> Not this: <asp:RadioButton id="rbSelection_0" onclick="javascript:abc(this);" runat="server"></asp:RadioButton> <asp:RadioButton id="rbSelection_1" onclick="javascript:abc(this);" runat="server"></asp:RadioButton></TD> Should I add something to the onclick event?? for example: onclick="javascript:abc(this,xxx);" (*XXX <- object??) (I really don't know how to write it. Can you write the full function code :D ) Thank you for helps. Calvin
-
Hi, I do a VS.NET (Webform)radiobuttonlist with one dropdownlist and textbox. If I pick "1" then "Enable dropdownlist" and "Disable textbox", "2" "Enable textbox" but "Disable dropdownlist" This is my code: <asp:RadioButtonList id="rbSelection" onclick="abc(this);" runat="server"> <asp:ListItem Value="1">1</asp:ListItem> <asp:ListItem Value="2">2</asp:ListItem> </asp:RadioButtonList> function abc(rad) { switch (rad.value){ case "1": var e=document.getElementById("dropdownlist"); e.style.disabled =true; var t=document.getElementById("textbox"); t.style.disabled ="false"; break; case "2" : var e=document.getElementById("dropdownlist"); e.style.disabled ="false"; var t=document.getElementById("textbox"); t.style.disabled ="true"; break; } } I think the problem should be in <onclick="abc(this);">, Is anyone know do it? Appreciate for any help. :) Calvin
-
Just visible what i want Hi, I do two column, one is bound column and another is template column, i just visible the column what i want. Thank you :-\
-
Thank for your suggestion JRichmond. :D
-
I create few template column and bound column in datagrid. One of the template column contain the StudentMark. I want to know how to change that column to (Read only) or "Not" (Read only) when click the edit button. It is based on a dropdownlist to determine to read only or not. I think i must use the template column, since i need to do the validation to the StudentMark. (For example, If select value '1' in dropdownlist, the "StudentMark" is become 'Read only' and select '2' become vice versa. I was success to bind the datagrid and "StudentMark" become a textbox if I select '2'. Anyone know how to do if i select '1' become a label and '2' become textbox :confused: Thank you for any help and comments Calvin
-
Dear Ron, I get an error message of "Object Expected". I can't write the code below in page_load, the"this" get error of "Name 'this' is not delared". Your code: this.cboList.Attributes.Add("ontextchanged","SetVis(this);"); I changed it to My code: cboList.Attributes.Add("ontextchanged","SetVis();"); What for we need to put "this" in code? Instead of this, what I need to do? :confused: Thank you Ron for help Calvin
-
Hi, I need to visible a textbox and RequiredFieldValidator when user select the item in dropdownlist before click the submit button. The autopostback of dropdownlist is set to false and textbox & Validator visible also set to false. I want to call function in client script(Javascript) to call out the textbox. For example, If select item "Other", then the textbox is visible to enter data. The control to validate of requiredfieldvalidator is set to this textbox. Other than that item will hide the textbox & validator. I using ASP.NET with VB to do the data entry form. Thank you. Calvin
-
Hi, Is anybody know how to make user unable to select the first item in dropdownlist, normally is "Please select..." on top of dropdownlist and how to validate the dropdownlist (Required field validator)if is selected or not. Thanks to all giving comments and suggestion. Calvin :confused:
-
Thank you!
-
First of all, I'm appreciate for your helps. I do a little mistake with strCName should be strStudentName. In fact, when I select one of the student standard in dropdownlist, it will go to table A to get all the corresponding StudentName. Secondly, I want to get the others fields in Table B using StudentName. The StudentName is not the primary key in Table B. For instance, if (john is a standard 6 student ) in Table A, and he had three record in Table B, I want to get all the record using StudentName(value=john). I do a little changes from the query. SQLStmt1 = "Select TableB.StudentName, StudentDOB from TableB Inner Join TableA On TableB.StudentName = TableA.StudentName Where TableA.Left(StandardID, 1)= '" + ddlstandard.SelectedItem.Value + "'" ** I get a Undefined function 'TableA.Left' in expression. The reason why I want to get the StandardID with the first value on left is, actually the StandardID Value in Table A is (6A, 6B, 6C, 6D...). Do you know how to write the query? Pls reply me a.s.a.p thank you.
-
Hi, i got a problem to bind the data to datagrid or datalist. Scenario: There is two table, Table A(StandardID),(StudentName), Table B(StudentName). First of all, If I choose "Standard 2", which is one of the collection in the dropdown list, it will get the StandardID(value=2) in Table A and store the particular value of StudentName into a variable(strStudentName declare as String), which mean all standard 2 StudentName will store into the variable strStudentName. When i bind the corresponding StudentName into a datagrid, it only show one StudentName(suppose it should be ten studentName listed). So, I was using response.write(StudentName) to check does the variable(strStudentName) contain the value(ten student name), eventually, it display the result what i want. Please help me solve this problem in urgent, thank you. This is my code: SQLStmt1 = "Select StandardID, StudentName from TableA Where StandardID = '" + ddlstandard.SelectedItem.Value + "'" Dim cmd As New OleDbCommand(SQLStmt1, cn) Dim objDR As OleDbDataReader = cmd.ExecuteReader() While objDR.Read() Dim strStudentName As String strStudentName = objDR("StudentName") 'Respnse.Write(strStudentName) SQLStmt2 = "Select StudentName from TableB Where StudentName ='" & strCName & "'" Dim da As New OleDbDataAdapter(SQLStmt2, Connection) ds = New DataSet("ModuleEnrollment") da.Fill(ds, "ModuleEnrollment") DataGrid1.DataSource = ds.Tables("ModuleEnrollment").DefaultView DataBind() End While