473,396 Members | 1,755 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,396 software developers and data experts.

Can you write a general function to change a DataGrid?

I have a simple subroutine SortRows, which takes a DataGrid and a sort
expression and is supposed to set the DataGrid to sort by the sort
expression. In fact, all it consists of is:

Public Sub SortRows(ByRef Grid As DataGrid, ByVal SortExpression As String)
Grid.Attributes("SortExpr") = SortExpression

End Sub

When I tried calling this subroutine and set a breakpoint at the End Sub, I
found that the value of Grid.Attributes("Sort_Expr") was indeed equal to the
value of SortExpression. But after I returned to the calling subroutine, I
found that the value of SampleGrid.Attributes("Sort_Expr") was a blank
string. It seems to me that even though the Grid argument is declared
ByRef, for at least its attributes it behaved as though it was declared
ByVal.

Is there any possible implementation of this subroutine that uses only the
information in its arguments? I know that this is a simple subroutine but
maybe in the future I will have the same problem with a more complex one.

Bob Rosen
Jul 19 '05 #1
0 1535

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

Similar topics

13
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be...
0
by: Peter Horwood | last post by:
I am having trouble writing an XML file out on my localhost development machine. I get: Server Error in '/ProblemSolved' Application. -----------------------------------------------------------...
14
by: WUV999U | last post by:
Hi I am fairly familiar in C but not much. I want to know how I can write a html parser in C that only parses for the image file in the html file and display or print all the images found in...
2
by: tshad | last post by:
Is there a way to call a function from a boundcolumn tag? I have some icons that I set as visible or not depending on values set in my table. I have a Datagrid that I am binding to and after...
3
by: Woody Splawn | last post by:
We have a client server application where we would like to not show Save and Cancel buttons on a winform until the user has actually entered something into a textbox or combobox etc., and there is...
0
by: Bob Rosen | last post by:
I have a simple subroutine SortRows, which takes a DataGrid and a sort expression and is supposed to set the DataGrid to sort by the sort expression. In fact, all it consists of is: Public Sub...
88
by: Peter Olcott | last post by:
Cab you write code directly in the Common Intermediate language? I need to optimize a critical real-time function.
6
by: SimonZ | last post by:
How can you call function from aspx page? For example: button on aspx page: <asp:button Visible="<% =funcVisible()%>" id="btnNew" Runat="server"></asp:button> code behind function:
5
by: barnetod | last post by:
I am trying to open a text file designated by the user. Then I want to change all lower case values to capital letters. Then write file. I am stuck and can not change the characters or am...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.