Dim i As Integer = 0 Dim dt_result As New DataTable For i = 0 To dt_result.Rows.Count - 1 Step 1 'Here ur coding Next
Janani
Dim i As Integer = 0 Dim dt_result As New DataTable For i = 0 To dt_result.Rows.Count - 1 Step 1 'Here ur coding Next
Janani
I want to make few column of the database which are shown in the datagrid to be read only . how can i do this ? --->Use this : grid.Columns(2).ReadOnly = True --->U want to specify the column number here. And which event should i use in order to validate the datagrid's entered data for each cell, and how it can be done? --->Use CellValidating event in the datagrid property.
Janani
By using datagrid view property, Go to columns property and select what type of columns you want ie., u can add textbox,checkbox,button columns etc.
Janani
Have U order it by date?
Janani
select convert(varchar,Reminder_date,101) as Reminder, Reminder_From, Reminder_Until, Reminder_AlarmTime, Create_dt, Update_dt from dbo.TBL_Reminder order by Reminder It was possible to order by date.
Janani
Use the following in stored procedure, convert(varchar,checkindate,101) as checkindate This will extract only 15/11/2006 only. For ur reference: checkindate --> Field in the table. Hope u will understand it.
Janani
ThaScorpion wrote:
how can I extract the date part only
Use the following in stored procedure, convert(varchar,checkindate,101) as checkindate This will extract only 15/11/2006 only. For ur reference: checkindate --> Field in the table. Hope u will understand it.
Janani
Syed Shahid Hussain wrote:
How to implement Multilanguage in VB.NET.
Go to below link. http://www.bhashaindia.com/Developers/MSTech/multilingualApp.aspx
Janani
Syed Shahid Hussain wrote:
How can we use resource file to implement multi language in our program?
http://www.bhashaindia.com/Developers/MSTech/multilingualApp.aspx[^]
Janani
SLRGrant wrote:
How would I display the results in a textbox of what is in that folder
http://www.codeproject.com/dotnet/folderwatcher.asp[^]
Janani
Hey there was a default field for printing the reports in crystal report viewer. Then why are u trying for generating ur own print method.
Janani
Hi. Its possible to do ya. Try to do it.
Janani
This is in VB.net only. I worked out. It was changing the particular row.
Janani
Use Like this: Declaration Dim time As DateTime Dim day As DateTime Private culture As System.Globalization.CultureInfo = New System.Globalization.CultureInfo("hi-IN") -------------------- time = Date.Now.ToShortTimeString() day = Date.Now.ToShortDateString() Dim temp As String = Convert.ToDateTime(time, culture) Dim var As String = Convert.ToDateTime(day, culture) This will convert the date and time into Indian culture. temp will have the value of 9:30:00 AM and var will have the value of 11/1/2006 Hope u will got it.
Janani
Use combo box selected event changed to fill the text boxes.
Janani
This is for changing the particular row color. Try it: DataGrid1.Rows(3).DefaultCellStyle.BackColor = Color.Azure For which row, u want, change the row value only.
Dim Id As Boolean = ValidateSearch(TextBox1.Text) If Id = True Then --------> U do ur functionality. else MsgBox("Don't Enter Dots", MsgBoxStyle.OkOnly) end if This is the regular expression. U include it in ur code behind. Public Function ValidateSearch(ByVal texttype As String) As Boolean Dim RoomType As System.Text.RegularExpressions.Regex _ = New System.Text.RegularExpressions.Regex("[0-9]+$") Dim M As System.Text.RegularExpressions.Match = RoomType.Match(texttype) Return M.Success End Function This regular expression will accept only numbers. Like this there are several expressions, like characters etc. -- modified at 2:05 Monday 30th October, 2006 With regards Janani
Ya u can change the row color by using For all rows: DataGrid1.DefaultCellStyle.BackColor = Color.DarkGray For alternating row style: DataGrid1.AlternatingRowsDefaultCellStyle.BackColor = Color.Beige Janani
Ya u can do this by using regular expression regex. Janani
Here is one way of binding data in combo box: In code behind: Dim ds As New DataSet ds = class_Ratetype.ComboRateDisplay() Dim dvs As New DataView(ds.Tables(0)) If dvs.Count > 0 Then Me.ComboRoomType.DataSource = dvs Me.ComboRoomType.DisplayMember = "Roomtype" Me.ComboRoomType.ValueMember = "Roomtype_Id" End If End Sub Class file content for this: Public Function ComboRateDisplay() As DataSet Dim constr As String = SqlHelper.GetConnectionString() Dim conn As New SqlConnection(constr) Dim cmdSQL As New SqlCommand("SP_COMBORATEDISPLAY", conn) Dim da As New SqlDataAdapter Dim ds As New DataSet Dim dv As New DataView cmdSQL.CommandType = CommandType.StoredProcedure conn.Open() da.SelectCommand = cmdSQL da.Fill(ds, "TBL_Roomtype") ComboRateDisplay = ds.Copy da.Dispose() If (Not conn Is Nothing) Then conn.Close() conn.Dispose() End If GC.Collect() End Function For ur reference: class_Ratetype ---> object for class file ComboRoomType ----> combobox name Roomtype ----> Display member Roomtype_Id ----> Value member SP_COMBORATEDISPLAY --> Stored procedure TBL_Roomtype ----> Table name Janani