Easy DateTime question
-
It is going to be a complicated solution. I think you should just try your best and figure it out any way you can. Ben
ok.. i will..thanks for that. I have another question if ok. you are so blessed ben, How about rowfilter using textbox and dropdown?. Bernie
-
ok.. i will..thanks for that. I have another question if ok. you are so blessed ben, How about rowfilter using textbox and dropdown?. Bernie
The rowfilter you can use in a DataView. I can't remeber if you do vb.net or C# but it is something like this: DataView dv = yourdatatable.DefaultView; dv.RowFilter = "columname = "+textbox.Text; gridview.datasource = dv; gridview.databind(); Anyway, that is what the C# looks like. Ben
-
The rowfilter you can use in a DataView. I can't remeber if you do vb.net or C# but it is something like this: DataView dv = yourdatatable.DefaultView; dv.RowFilter = "columname = "+textbox.Text; gridview.datasource = dv; gridview.databind(); Anyway, that is what the C# looks like. Ben
i got the answer Ben, just now. I just configure it in SQL data source. thank you very much. I am just a beginner Ben thats why i am asking. Can i have another question?..Hehe How about computing difference of two time to be display in textbox before inserting Bernie
-
i got the answer Ben, just now. I just configure it in SQL data source. thank you very much. I am just a beginner Ben thats why i am asking. Can i have another question?..Hehe How about computing difference of two time to be display in textbox before inserting Bernie
-
Here's a link that might help you with this. ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/cpref2/html/M_System_DateTime_Subtract_1_4910510e.htm Ben
i cant access the link..no page display..and another question how can i validate time input hh:mm:ss using range validator, and how can i set the datetime.now in textbox gridview in edit mode. Thanks Bernie
-
i cant access the link..no page display..and another question how can i validate time input hh:mm:ss using range validator, and how can i set the datetime.now in textbox gridview in edit mode. Thanks Bernie
Here is the content of the link: Subtracts the specified date and time from this instance. Namespace: System Assembly: mscorlib (in mscorlib.dll) Syntax Visual Basic (Declaration) Public Function Subtract ( _ value As DateTime _ ) As TimeSpan Visual Basic (Usage) Dim instance As DateTime Dim value As DateTime Dim returnValue As TimeSpan returnValue = instance.Subtract(value) C# public TimeSpan Subtract ( DateTime value ) C++ public: TimeSpan Subtract ( DateTime value ) J# public TimeSpan Subtract ( DateTime value ) JScript public function Subtract ( value : DateTime ) : TimeSpan Parameters value An instance of DateTime. Return Value A TimeSpan interval equal to the date and time represented by this instance minus the date and time represented by value. Exceptions Exception type Condition ArgumentOutOfRangeException The result is less than MinValue or greater than MaxValue. Remarks This method does not change the value of this DateTime object. Instead, a new TimeSpan is returned whose value is the result of this operation. Before subtracting DateTime objects, insure that the objects represent times in the same time zone. Otherwise, the result will include the difference between time zones. Example The following code example demonstrates the Subtract method and operator. Visual Basic Copy Code Dim date1 As New System.DateTime(1996, 6, 3, 22, 15, 0) Dim date2 As New System.DateTime(1996, 12, 6, 13, 2, 0) Dim date3 As New System.DateTime(1996, 10, 12, 8, 42, 0) Dim diff1 As System.TimeSpan ' diff1 gets 185 days, 14 hours, and 47 minutes. diff1 = date2.Subtract(date1) Dim date4 As System.DateTime ' date4 gets 4/9/1996 5:55:00 PM. date4 = date3.Subtract(diff1) Dim diff2 As System.TimeSpan ' diff2 gets 55 days 4 hours and 20 minutes. diff2 = System.DateTime.op_Subtraction(date2, date3) Dim date5 As System.DateTime ' date5 gets 4/9/1996 5:55:00 PM. date5 = System.DateTime.op_Subtraction(date1, diff2) Ben
-
i cant access the link..no page display..and another question how can i validate time input hh:mm:ss using range validator, and how can i set the datetime.now in textbox gridview in edit mode. Thanks Bernie
-
Here is the content of the link: Subtracts the specified date and time from this instance. Namespace: System Assembly: mscorlib (in mscorlib.dll) Syntax Visual Basic (Declaration) Public Function Subtract ( _ value As DateTime _ ) As TimeSpan Visual Basic (Usage) Dim instance As DateTime Dim value As DateTime Dim returnValue As TimeSpan returnValue = instance.Subtract(value) C# public TimeSpan Subtract ( DateTime value ) C++ public: TimeSpan Subtract ( DateTime value ) J# public TimeSpan Subtract ( DateTime value ) JScript public function Subtract ( value : DateTime ) : TimeSpan Parameters value An instance of DateTime. Return Value A TimeSpan interval equal to the date and time represented by this instance minus the date and time represented by value. Exceptions Exception type Condition ArgumentOutOfRangeException The result is less than MinValue or greater than MaxValue. Remarks This method does not change the value of this DateTime object. Instead, a new TimeSpan is returned whose value is the result of this operation. Before subtracting DateTime objects, insure that the objects represent times in the same time zone. Otherwise, the result will include the difference between time zones. Example The following code example demonstrates the Subtract method and operator. Visual Basic Copy Code Dim date1 As New System.DateTime(1996, 6, 3, 22, 15, 0) Dim date2 As New System.DateTime(1996, 12, 6, 13, 2, 0) Dim date3 As New System.DateTime(1996, 10, 12, 8, 42, 0) Dim diff1 As System.TimeSpan ' diff1 gets 185 days, 14 hours, and 47 minutes. diff1 = date2.Subtract(date1) Dim date4 As System.DateTime ' date4 gets 4/9/1996 5:55:00 PM. date4 = date3.Subtract(diff1) Dim diff2 As System.TimeSpan ' diff2 gets 55 days 4 hours and 20 minutes. diff2 = System.DateTime.op_Subtraction(date2, date3) Dim date5 As System.DateTime ' date5 gets 4/9/1996 5:55:00 PM. date5 = System.DateTime.op_Subtraction(date1, diff2) Ben
thanks for that friend, I got it now. I have new question, how can i add gridview header above header?.. Thanks Bernie
-
thanks for that friend, I got it now. I have new question, how can i add gridview header above header?.. Thanks Bernie
-
What are the settings to be change for me to show the header on load?. I found out that it depends on the number of rows. Thanks bernie
-
What are the settings to be change for me to show the header on load?. I found out that it depends on the number of rows. Thanks bernie
-
In the gridview prerender event you need this kind of code: if (!GridView1.TopPagerRow.Visible) { GridView1.TopPagerRow.Visible = true; } Ben
this is a C# code right?how about in VB?. i tried to write as if GridView1.TopPagerRow.Visible = false then GridView1.TopPagerRow.Visible = true but i got some error "Object reference not set to an instance of an object." is that because my gridview was controlled by dropdown?.How can i do that? Bernie
-
this is a C# code right?how about in VB?. i tried to write as if GridView1.TopPagerRow.Visible = false then GridView1.TopPagerRow.Visible = true but i got some error "Object reference not set to an instance of an object." is that because my gridview was controlled by dropdown?.How can i do that? Bernie
-
You need to turn paging on. Set the page size to be really big so you only have one page. Ben
is that the only setting that i need? it will not display the next or previous? Bernie
-
You need to turn paging on. Set the page size to be really big so you only have one page. Ben
I set the page size to 10000 but it doesnt show the pager, I got some error in pre render event. null reference. My gridview is controlled by dropdown Bernie
-
You need to turn paging on. Set the page size to be really big so you only have one page. Ben
-
You need to turn paging on. Set the page size to be really big so you only have one page. Ben
-
You need to turn paging on. Set the page size to be really big so you only have one page. Ben
Hi, I have a report viewer, I have tables on my report. I set the hideDuplicates to my dataSet, It hides the data but still adding row on below, any idea about that?. I dont want to display row without data below in my table Thanks Bernie
-
You need to turn paging on. Set the page size to be really big so you only have one page. Ben
-
You need to turn paging on. Set the page size to be really big so you only have one page. Ben
i have deployed my program in IIS, my report viewer works on my project but when i deployed it on IIS error was display, An error occurred during local report processing. The definition of the report 'Main Report' is invalid. The report definition is not valid. Details: Data at the root level is invalid. Line 1, position 1. Any idea about this? thank you very much.. Bernie