473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Problem with Devexpress

Hello to all.
Please let me know how to define grid view.
When I put following code in to the application file the error ?Type 'GridView' is not defined? persists all the time. Please help me

'Deletes selected data and group rows
Public Sub DeleteSelectedRows(ByVal view As GridView)
'Create a list containing selected row handles
Dim selRowsCount As Integer = view.SelectedRowsCount
If selRowsCount = 0 Then Return
Dim selRows As ArrayList = New ArrayList(view.GetSelectedRows())
'Process selected group rows and add their child data rows to the list
Dim i As Integer
For i = 0 To selRowsCount - 1
getChildRowHandles(view, CType(selRows(i), Integer), selRows)
Next

'Copy list elements to an array
Dim selRowsArray(selRows.Count - 1) As Integer
For i = 0 To selRowsArray.Length - 1
selRowsArray(i) = CType(selRows(i), Integer)
Next
'Sort the array
Array.Sort(selRowsArray)

'Prevent excessive visual updates while deleting
view.BeginUpdate()
Try
'Delete rows starting from the last element
For i = selRowsArray.Length - 1 To 0 Step -1
view.DeleteRow(selRowsArray(i))
Next
view.ClearSelection()
Finally
view.EndUpdate()
End Try
End Sub
'Returns handles of child data rows for the given group row
Public Sub getChildRowHandles(ByVal view As GridView, ByVal groupRowHandle As Integer, ByVal childRowHandles As ArrayList)
If Not view.IsGroupRow(groupRowHandle) Then Return
'Get the number of immediate children
Dim childCount As Integer = view.GetChildRowCount(groupRowHandle)
Dim i As Integer
For i = 0 To childCount - 1
'Get the handle of a child row with the required index
Dim childHandle As Integer = view.GetChildRowHandle(groupRowHandle, i)
'If the child is a group row, then add its children to the list
If view.IsGroupRow(childHandle) Then
getChildRowHandles(view, childHandle, childRowHandles)
Else
'The child is a data row. Add it's handle to childRowHandles providing that the handle was not added before
If Not childRowHandles.Contains(childHandle) Then childRowHandles.Add(childHandle)
End If
Next
End Sub

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>LQeKh2cnvUeOU+4hSoR+CA==</Id>
Jul 21 '05 #1
0 1429

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Eric B | last post by:
Hi We have started to work on xtragrid V3 evaluation , and then we bought the ful version (which is V4). So we uninstalled the free version and installed the v4. But with this new version...
1
by: Jéjé | last post by:
Hi, I continue too looking for grid webcontrols and I have found 2 good products: * WebGrid.NET from Intersoft (www.Intersoftpt.com) * DevExpress ASPxGrid (www.devexpress.com) these 2...
3
by: Ronald S. Cook | last post by:
Hi everyone, We're needing to pick a suite of components for our C#/VS 2005 development. Top on our list is a treeview that integrates with a datagrid. I think all the big goes provide that. ...
1
by: theburnetts | last post by:
I am building an ASP.NET application that has a requirement that the user should be able to download all of the data that they have input into the system and save it to a file on their local PC. ...
6
by: Blasting Cap | last post by:
I'm trying to convert a 1.1 app to 2.0, and keep finding one thing after another that either Framework 2.0 or Visual Studio 2005 doesn't like. Now this - In the global.asax, code that has been...
1
by: nandan | last post by:
Hi, Iam using devexpress xtrareports with vb.net .I want to insert page break after writting some contents to the Detail area(band). can anybody help me?Thanks in advance Nandan I using the...
1
by: cmdolcet69 | last post by:
Pleae help im trying to help fix a bug in some software that uses the Dev Express 3rd party control for Reports.Had anyone ever used this product?
3
by: brianedow | last post by:
Does anyone know if DEVExpress is still around. Their website does not seems to work anymore. I hope they are not gone. http://www.devexpress.com
0
LoanB
by: LoanB | last post by:
Hey all Can anyone with some DevExpress Knowledge help me convert the C# code below to accommodate a DevExpress XtraGrid with a View called gridView1: this.dgCode.Rows.Cells.Value...
6
by: Cirene | last post by:
Im thinking about purchasing the RadControls for ASP.NET AJAX, by Telerik. Any advice, suggestions, or opinions? What has been your experience? Link: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.