Click here to Skip to main content
13,596,321 members

Comments by Shahan Ayyub (Top 83 by date)

Shahan Ayyub 18-Aug-15 15:36pm View
@ÃHmed Élkady, This is too much work. You should first break your problem into smaller one and find tutorials on each of them. No one is gonna help you this way.
Shahan Ayyub 31-Dec-14 6:37am View
Can you please show us how do you do it then in designer ?
Shahan Ayyub 27-Dec-14 20:28pm View
It is a good advice to use `VirtualMode` property for such cases, but how do you do binding ? For loop ? Have you tried setting `DataSource` property ? `grd.DataSource = dt`
Shahan Ayyub 24-Dec-14 2:06am View
Can you please clarify on the following:
-Did you check the event do not get register twice ?
-Is 'StartSendingImages' is synchronous process ?
-Why not you empty the `arr_sendkiosk` array when you have already done the sending process so if it comes back, for loop will not work.
Shahan Ayyub 4-Apr-14 12:43pm View
There is no function `CharW`. Use `ChrW` instead that you are recommending to others. I would prefer just leaving a comment next time if i think answer can be improve, because i think it can be of more helpful rather than mandatory downvoting.
Shahan Ayyub 3-Apr-14 14:54pm View
Please make sure you are not putting username and password or your live connection. It would be accessible to others and you might be in trouble.
Shahan Ayyub 3-Apr-14 14:30pm View
ASP.Net ?
Shahan Ayyub 3-Apr-14 14:26pm View
We need more from your side, we can not see your screen access your HDD. :) Please describe your problem in more detail so then we can assist you. Also, not the downvoter.
Shahan Ayyub 31-Mar-14 13:25pm View
@saikishore1979007, beside this solution i just ended up a brief solution on how to append the new result set with the previous one here: with a bunch of performance evaluation. Hope it helps!
Shahan Ayyub 12-Jan-14 15:02pm View
Check out each point of the updates.
Shahan Ayyub 11-Jan-14 15:46pm View
What is the type of `dob` and which namespaces have you imported? Which framework you are using and is it a compile time or runtime error ?
Shahan Ayyub 11-Jan-14 15:39pm View
Try using: `If dob.Day = 1 Then`
Shahan Ayyub 11-Jan-14 15:19pm View
Thanks. :)
Shahan Ayyub 25-Sep-13 2:16am View
@akosibogart, I think it is more appropriate to use `String.IsNullOrEmpty` rather than `xyz = Nothing`. See the updates.
Shahan Ayyub 14-Aug-13 14:58pm View
Hi! As you said "it doens't seem to work properly for whatever reason", what is expected to you. current code is expected to remove the whole row if it is completely empty. Cell is somewhat is an interaction of a row and a column so you can either remove row or delete a column. What else do you expect ?
Shahan Ayyub 14-Aug-13 14:11pm View
You are still missing "Exit for" after "chkCOl = True" otherwise there will be a lack in performance. Every time your loop will run till the end when you are only interested in finding either checked or unchecked. Hope it makes sense :)
Shahan Ayyub 13-Aug-13 5:20am View
Is this Windows Forms ? or Web Form ?
Shahan Ayyub 13-Aug-13 5:15am View
I assume you are talking about DataGridViewComboBox column? You have three DataGridViewComboBoxColumn? Is this the case ?
Shahan Ayyub 13-Aug-13 2:26am View
Try using my approach...
Shahan Ayyub 13-Aug-13 1:55am View
What is the error ?
Shahan Ayyub 13-Aug-13 1:53am View
See without Windows credentials you can not even login to others system so this is not possible, if lacking Sql credentials, you can TRY using command line tool to take backup,
Shahan Ayyub 13-Aug-13 1:51am View
I am a bit confused you are lacking of Windows account credentials or Sql Server credentials ? Are you trying to to take back from VB.Net of from SQL server directly ?
Shahan Ayyub 13-Aug-13 1:43am View
It would be great if you come up with few more examples.
Shahan Ayyub 18-May-13 6:54am View
can you send the snap shot of the error screen ?
Shahan Ayyub 11-May-13 15:47pm View
Can you please share your code with us ? I am still not clear that if you are already using these guidelines and having some trouble using them or the below guidelines resolves this thread.
Shahan Ayyub 11-May-13 7:21am View
Have you used "Timer.Enabled" property to stop timer ?
Shahan Ayyub 7-May-13 12:59pm View
Try setting up SQL so that the system can have these supported files available, which is required to run your script(s).
Shahan Ayyub 7-May-13 12:56pm View
Do you need an instant reflection in the DB or you can afford manipulation at the end of the day ? If yes then it will be easier for you to workaround this issue.. Is it possible ?
Shahan Ayyub 7-May-13 4:49am View
Will you also run this software continuously ?
Shahan Ayyub 7-May-13 4:43am View
Is SQL Server installed on client machine ?
Shahan Ayyub 6-May-13 16:12pm View
Currently I do not have some sample code but I guess DataGridView.HitTest fucntion can help you to start with this.
Shahan Ayyub 6-May-13 9:50am View
Can you split it with ")>md" and access (n-1)th index, if it exists ? and use the pattern i have given to you ?
Shahan Ayyub 3-May-13 7:55am View
Which one regex you are talking about? have you taken substring ?
Shahan Ayyub 2-May-13 14:17pm View
As per your provided details: " i want to find ticket number after last )>md and before )md " I was expecting that you are in need of last few ticket numbers(as per the given range in question), and i believe if you are going to make a substring it won't have an impact on your original string(so you still have a history) and above solution will give you the last ticket number between the MDs you have mentioned.
Shahan Ayyub 26-Mar-13 13:47pm View
Reason for my vote of 5 \n Thanks for sharing it
Shahan Ayyub 17-Mar-13 12:53pm View
In 2nd query, try enclosing value of "Dset3.Rows(0).Item("PaPeR_Type")" in "[ ]" something like the example in below link. Check out how they write [MON],[TUE],..... etc.
Shahan Ayyub 17-Mar-13 12:36pm View
Which of the above query causes problem ? can you post the query you get in 'strSQL3' and 'strSQL4' variables ?
Shahan Ayyub 17-Mar-13 8:12am View
can you please try:
1) datagridView1.CurrentCell = dataGridView1.Rows(MentionYourRowIndexHere).Cells(1)
2) datagridView1.Rows(MentionYourRowIndexHere).Cells(1).Value = "" ' or use String.Empty

In datagridView you can omit line 1 and directly use line 2.
Shahan Ayyub 17-Mar-13 7:58am View
Can you please elaborate more ? Please tell us about your intentions that is what you are trying to achieve. So we we can provide you a guideline or some sample code.
Shahan Ayyub 5-Mar-13 9:46am View
may I ask why a down vote, if it helps ? did you do that ?
Shahan Ayyub 5-Mar-13 6:43am View
Is your issue resolved ? If no, what is unexpected to you when running a case of UPDATE ?
Shahan Ayyub 8-Nov-12 2:08am View
Please also mention if its a Web application or windows based application
Shahan Ayyub 7-Nov-12 11:34am View
Is it clear now ?
Shahan Ayyub 7-Nov-12 8:37am View
If you noticed my updated solution you will see i have not cleared Rows of grid. so if "RetrieveDataTable" retrieves data for id=1 and filled grid, later user entered id=2, here rows are "as it is". So "DataGridView1.Rows.Add()" will add another row in grid with data of id=2. Now you have two rows in grid one for id=1 and one for id=2.
Shahan Ayyub 7-Nov-12 8:05am View
I assumed "RetrieveDataTable" is a method that will fetch data from database according to the id user entered. Say for example user enter id = 1. this method will retrieve all info related to id=1 in datatable using SqlDataAdapter.Fill method. In next step you can iterate using for loop on all rows exists in DataTable and call DataGridView1.Rows.Add() method to append these row at the end of datagridview. Is it clear now ? In case no please provide details about the issue which is still unclear.
Shahan Ayyub 7-Nov-12 6:13am View
How do you do :
>>according to ID data is getting filled in the DataGridview.
I mean to say how do you populate data in row ? Have you tried to add a new row in grid and target it to populate with data ?
Shahan Ayyub 7-Nov-12 5:32am View
Reason for my vote of 5
nice work!
Shahan Ayyub 6-Nov-12 5:11am View
Have you used "RemoveHandler" in designer.vb or .vb file ?
Shahan Ayyub 19-Oct-12 13:45pm View
you have to add this line at the top of your .vb file:
Imports System.ServiceProcess
Shahan Ayyub 17-Oct-12 1:37am View
glad to see your issue resolved! :)
Shahan Ayyub 12-Oct-12 18:17pm View
Any updates ?
Shahan Ayyub 12-Oct-12 6:21am View
What about now:

DateTimePicker2.MaxDate = DateTimePicker.MaximumDateTime ' reset range before setting
DateTimePicker2.MinDate = DateTimePicker1.Value
DateTimePicker2.MaxDate = DateTimePicker2.MinDate.AddMonths(5)
Shahan Ayyub 12-Oct-12 3:17am View
The code I suggested will take the whole month, say you have selected 25 jan 2012 in datetimepicker1 so datetimepicker2 will start from 1 jan 2012. Is it the desired case ?

My understanding is that the error should come here:

DateTimePicker2.MinDate = New DateTime(Yr, Mon, Days)

because "Days" contains the number of days in a month of a particular year. So if its a January it will be 31 and do not exists in February. Have you tried changing this to:

DateTimePicker2.MinDate = New DateTime(Yr, Mon, 1)

That is, take the month from start as mindate.
Shahan Ayyub 12-Oct-12 2:03am View
I have just re-checked the code it seems to working fine. Can you post your code ? Also, if you could provide few more lines other than the affected line. It would be great to troubleshoot the issue. Also, Can you tell us which date have you selected ?
Shahan Ayyub 12-Oct-12 1:31am View
What error did you get ?
Have you tried something like this :

Dim daysInMonth As Integer = DateTime.DaysInMonth(DateTimePicker1.Value.Year, DateTimePicker1.Value.Month)

It will print the days in month from the date chosen from datetimepicker1 control.
Shahan Ayyub 11-Oct-12 13:31pm View
Do you mean something like "Windows Explorer" in which at the left pane we have a tree view and in other part we have a list view ? The better you will explain the more quick and accurate will be the response.
Shahan Ayyub 9-Oct-12 1:39am View
>>Can it cause so much flicker
Yes it can. It is never recommended to load large amount of data on form load. May be loading too many pictures at Form_load causing this issue. Have you tried Form_Shown event ? or Have you tried using Application.DoEvents() ?
Shahan Ayyub 5-Oct-12 7:46am View
Do you mean something like "WordArt" in MS Word ?
Shahan Ayyub 5-Oct-12 7:44am View
Have you used Application.DoEvents() some where ? or are you using loop to load something ? Does it flicker continues unless you close app or it flickers for some amount of time then becomes stationary ?
Shahan Ayyub 3-Oct-12 14:41pm View
If "b" is an integer collection than what if some one enter "some text here" in textbox27 and this line:


will definitely fail to add it to the collection with following error:
"Conversion from string "some text here" to type 'Integer' is not valid."

So my understanding is to have a use of VAL function, IF the end result is going to convert in SQL int datatype, since the error "Error converting data type nvarchar to int." seems to be a sql error.

Shahan Ayyub 31-Jul-12 2:30am View
Issue is not to vote them up again issue is to find who have issues. I guess we should look other questions.
Shahan Ayyub 31-Jul-12 2:20am View
no idea who have down voted my 5 posts within one min or less ( How quick he/she is :) ). please suggest them to use "improve solution" link (if possible) since you are senior forum user.
Shahan Ayyub 31-Jul-12 1:56am View
It is not good if there are series of elements, but in case of two it can be used.
Shahan Ayyub 31-Jul-12 1:48am View
used your suggested code example and your suggested procedure. I have pointed that you should provide correct details rather than involving asker into another issue as you can see asker could not resolve the error message. For your point related to casting and its understanding what i mean is not you don't know better or i know more than you, but as an expert provide appropriate and direct solutions. I can run your code but not sure if asker can. If any one has issue with solution they have right to down vote.
Shahan Ayyub 31-Jul-12 1:25am View
Have you run your solution ? it says "Failed to convert parameter value from a String to a Int32." since @taxitemid is type of int. Also @val is not defined.
Shahan Ayyub 30-Jul-12 16:04pm View
You have "tax_item_id" column in "Employee_Tax_item_Payroll" table, and you have two values valu121 and value22, if you have both values at a time of insertion how will you decide what should store in "tax_item_id"? do you have any criteria ?
Shahan Ayyub 23-Jun-12 4:20am View
can we get more details (piece of code) about how you are dealing with the case ?
Shahan Ayyub 17-Jun-12 17:15pm View
have you tried jQuery ?
Shahan Ayyub 17-Jun-12 16:09pm View
how do you parse the string ? i.e., "strWaarde(0)" which is passed in "select case". Once you have this case:
the substring till the next ";" will be your desired result. Have you tried that ?
Shahan Ayyub 17-Jun-12 15:48pm View
More preferably, if nodes contains child node then a recursive lookup should be use like this: (only TreeView_ItemDrag event need to be changed)

Private Sub TreeView1_ItemDrag(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemDragEventArgs) Handles TreeView1.ItemDrag
If (CType(e.Item, TreeNode).Parent Is Nothing) Then
Dim nodes As TreeNodeCollection = CType(e.Item, TreeNode).Nodes
DoDragDrop(e.Item, DragDropEffects.Copy)
End If
End Sub

Private Sub DoRecursiveDragDrop(ByVal nodes As TreeNodeCollection)
For Each node As TreeNode In nodes
If (node.Nodes.Count > 1) Then
DoDragDrop(node, DragDropEffects.Copy)
End If
End Sub
Shahan Ayyub 19-May-12 13:45pm View
can you provide a sample of your expected text after processing ?
Shahan Ayyub 12-Feb-12 4:01am View
Superb Imran. This is what I need.

Thank you!
Shahan Ayyub 29-Jan-12 9:30am View
I maintains backup but I did not took backup since last week and I have a dozen of updates in it within this time period. So is it possible to get the data back with your suggested solution ?
Shahan Ayyub 29-Aug-11 17:55pm View
Did you tried to use 'try...Catch' Block ?
Shahan Ayyub 28-Aug-11 12:20pm View
Did you try step debugging on 'cancelDVD_Click' ?
Shahan Ayyub 28-Aug-11 10:42am View
I have read the whole discussion 'now'. Didn't see the comments along with the code. But still i was thinking from different point of view regarding iteration and exception on for loop and for each loop.
Shahan Ayyub 28-Aug-11 9:29am View
which one RaisKazi ?
I didn't see. Is this the copied ? I have seen the very first (all pages) now but didn't find a exact solution. :S

I did this kind of work when i removed empty rows from datatable. So placed here.
Shahan Ayyub 28-Aug-11 8:37am View
could you please provide more information? samples?
Shahan Ayyub 26-Aug-11 9:38am View
did you try setting:
after deletion?
Shahan Ayyub 26-Aug-11 8:47am View
Do you have a specific format defined for table name ?

Shahan Ayyub 26-Aug-11 8:35am View
Kindly clarify your intentions a bit more, so that we could give you a guideline or solution.

>>>When I fetch the data from the data base

Are you working with ADO.Net and need help on that ?
Shahan Ayyub 25-Aug-11 6:46am View
In your question you have this at the end of each row:
Is this the "new column" ? or you have concatenated it to the second column with <space> ? Kindly mention it in you question.
Shahan Ayyub 25-Aug-11 3:16am View
Kindly let us know about at which point you have issues. Are you iterating over gridview rows ?

Advertise | Privacy | Cookies | Terms of Service
Web03 | 2.8.180621.3 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid