you want to check to see if there is selected text first (selected text length > 1). If there is, you are doing a drag/drop. If not, you are selecting text. This is how you make the distinction. hope this helps
n10sive
Posts
-
Drag&Drop selected Text, anyone knows something? -
How to modify a table Without droppingdaniero wrote:
The script alters the table, it doesn't drop and remake it.
Not necessarily. Depends on what you are doing. Sometimes this script will copy the data to a temp table, drop the existing table and recreate it, then rewrite the data back into it. Alot depends on what you are modifying, and whether or not default values can be used. Otherwise...great suggestion....letting sql server create the script is the best thing to do.
-
datetime and stored proeduresOne note I would like to add to the other respondents. I am not a big fan of using operators when comparing datetimes. If, for example, one of your parameters is using GetDate() (sql server) the <,> etc operators check the time. This can lead to very undesirable results! If you are not interested in the time, it is better to use DATEDIFF(dd,date1,date2) < 0. You'll find yourself chasing down less problems this way.
-
Parameter passing to OleDb commandinstead of messing with parameters, why don't you just build the string in code and put it in the select command text before you execute it?
-
Datagrid Binding to an ObjectTake a look at ITypedList. Adding it to your collection allows you to create property descriptors. The Datagrid will respect this list. This is more "class friendly" to implementers and they won't have to use table styles to get rid of the unfriendly stuff.
-
How to Bind ComboBox1 with DataSet1 ?you need to add more qualification. ie. ComboBox1.DataSource = DataSet1.Table or ComboBox1.DataSource = DataSet1; ComboBox1.DisplayMember = "Table.StudentName"; ComboBox1.ValueMember = "Table.StudentID"; Cheers