|
Ignore me if i got the wrong idea but.
When you click on a row , you could get the index for that row, you could then get the previous or next row index's based on what 'arrow' is clicked and then set the index's to each other.
For eg. If you clicked on row 8, and then click on the up arrow, the code gets index 7, sets row 8 to index 7, and row 7 to index 8, updates the dataset and then calls DataBind refresh the Grid, as to give the illusion of the row moving up or down.
Hope this helps
Chris
|
|
|
|
|
Thanks for that...I had the same idea yest after the post..this is the code I came up with..
Dim cm As CurrencyManager = CType(Me.BindingContext(DataGrid1.DataSource, DataGrid1.DataMember), CurrencyManager)
Dim dv As DataView = CType(cm.List, DataView) ' Retrieve the default DataView of the DataGrid
Dim dr As DataRow ' Use Currency Manager and DataView to retrieve the Current Row
Dim dr2 As DataRow ' setup another datarow variable to store the "move to" line
Dim newOrderNo As Integer ' the temp variable to store the integer for the new row location
Dim currentOrderNo As Integer ' the temp variable to store the integer for the selected row location
'set bounds for the top element on the datagrid
If cm.Position = 0 Then
Me.DataGrid1.Select(0)
Me.DataGrid1.CurrentRowIndex = 0
Exit Sub
End If
dr = dv.Item(cm.Position).Row ' get the details of the row selected
dr2 = dv.Item(cm.Position - 1).Row ' get the details of the row above in the dataset
currentOrderNo = dr.ItemArray(2) ' assign the integer value to a temp variable
newOrderNo = (currentOrderNo - 1) ' decrement the selected row integer value
''''swap the integer values, re-order and move "selected row" up ie work with the same row
dr.Item(2) = newOrderNo
dr2.Item(2) = currentOrderNo
dsDelivery.Tables(0).DefaultView.Sort = "DelOrder"
DataGrid1.Select(newOrderNo - 1)
DataGrid1.CurrentRowIndex = newOrderNo - 1
DataGrid1.Refresh()
|
|
|
|
|
Hi, I want to find any resource on the web on how to use chart control in vb.net step by step. Can anyone provide me some information(URL)?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
|
Thank you very much for your help, but what i want to do is working with chart control on VB.NET not on a webpage.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
You can, the OWC object will generate a GIF image of the chart, you can do what you want with it. I have used it extensively in both Windows Forms and Web applications. If you get really stuck i'll knock you up a little example if you want.
Cheers
Blu
|
|
|
|
|
Thank you very much for your help, I just found the advertisment in this forum for free .net chart control. Here is it URL[^], but it offer only ASP.NET not VB.NET webform.
BluDog wrote:
I have used it extensively in both Windows Forms and Web applications. If you get really stuck i'll knock you up a little example if you want
If it is possible, please provide me a small example (sample code) to work in VB.NET.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Hi All
I m currently writing a file comparison utility in VB.NET.
I'd nearly finished the damm thing, then I came across a major issue that's thrown a spanner in the works, and I may need to go back and re-write large parts of the comparison algorithm...
I think my solution is too simple and makes too many assumptions, I'm wondering if anyone has any ideas about how to go around this, or if anyone knows how current programs like WinDiff work?
thanks
Sumit Domyan
Software Developer
ANALEC INFOTECH
|
|
|
|
|
Hi
What kind of output do you want generated? Detailed descriptions of what's different int he file, or just simply that they differ?
IF
|
|
|
|
|
I want each & every details; like different lines will be haighlighted with different colors etc.
Sumit Domyan
Software Developer
ANALEC INFOTECH
|
|
|
|
|
Did you see this article: http://www.codeproject.com/csharp/DiffEngine.asp
my blog
|
|
|
|
|
hello!!
i'm a student of computer science,now a days i'm trying to develop a final project in vb.net.If any one have suggestions ,information and ideas please send to me..
i shall be thankful to u!!
|
|
|
|
|
|
Hi All,
I am trying to create a User Control with no BackgroundImage property, so that I override the property with Browsable is false as the followings:
<Browsable(False)> _
Public Overrides Property BackgroundImage() As Image
Get
End Get
Set(ByVal Value As Image)
End Set
End Property
Is it a correct way to do this?
Thanks in advance.
|
|
|
|
|
Hi
can anybody tell me:
how can i make an exe file that get <<cmd parameters="">>?(like c:\myexefile.exe -p1 -p2 ...)
Best Regards
MkhProgrammer
|
|
|
|
|
|
Hi
can i change caption of msgbox buttons?
for example instead of ok i want use "Trust" !!!
Best Regards
MkhProgrammer
|
|
|
|
|
It can be done, but is overly complex for the benefit your getting. A better solution would be to code your own MessageBox control that exposes that kind of functionality.
|
|
|
|
|
Ok!Ok!
I've got a solution to your problem that although it is nasty, it perfectly works and is VERY simple.
Use the API Functions:
FindWindow to find the long handle to the MessageBox window.
FindWindowEx to find the handle of the button's window in the MessageBox window.
SetWindowText to set the text of the button using it's handle.
Doing so, just after calling the Msgbox function, will change the caption very easily, and the name change of the button cannot be seen at all!
I repeat again that although it is messy, it is simple, works perfectly and is a practice for API functions.
|
|
|
|
|
Hi
can anybody tell me that:
1)How can i retrieve a binary field (image field) that stored in SqlServer2000 with Vb.Net and save
it again in my hard disk that i have again that file?
2)can SqlServer itself convert image field to file with its store procedures?
3)can sqlserver run an exe file on local computer from its storeprocedure?
Best Regards
MkhProgrammer
|
|
|
|
|
mkhprogrammer@yahoo.com wrote:
1)How can i retrieve a binary field (image field) that stored in SqlServer2000 with Vb.Net and save
it again in my hard disk that i have again that file?
How To Read and Write BLOB Data by Using ADO.NET with Visual Basic .NET[^]
mkhprogrammer@yahoo.com wrote:
2)can SqlServer itself convert image field to file with its store procedures?
No. The T-SQL doesn't have any function that can do that.
mkhprogrammer@yahoo.com wrote:
3)can sqlserver run an exe file on local computer from its storeprocedure?
No. The SQL Server has no rights to anything on the local machine and, therefore, no rights to execute anything on the local machine.
|
|
|
|
|
I want to create an email containing a "click here to see your files" link. I know how to create and send an email. I know the path to the files. I don't know how to make the path a link within the email.
Thanks!
|
|
|
|
|
Do you want to create an application for e-mail or you want to do it some where in Outlook express or Microsoft Office Outlook? Please provide more clearly information.
|
|
|
|
|
The application sends an email using SMTP. The recipient is using Outlook.
|
|
|
|
|
I have a form and I want to like print only part of the form, lets say a rectangular area on the form. How can I do it in visual basic 6.
Any comments will be highly appreciated
|
|
|
|