473,378 Members | 1,438 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,378 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 1533

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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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:
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...

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.