Welcome Guest Search | Active Topics | Sign In | Register

Grid RecordCount Property Options
Cole
Posted: Saturday, April 30, 2011 10:23:27 PM
Rank: Newbie
Groups: Member

Joined: 1/14/2011
Posts: 6
I have purchased a developer's license. I have added the following code in the Global.asax file in the Application_Start sub-routine:

EO.Web.Runtime.AddLicense( _ (copied this from the license files you sent)

In a sub-routine in the code I do this:

Using conn2 As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("LocalSqlServer").ConnectionString)
Dim cmdRecordCount As New SqlCommand("Select Count(*) From tblCallScheduleImport", conn2)

'** Setup the command object......
cmdRecordCount.CommandType = CommandType.Text

Try
conn2.Open()
nRecordCount = CType(cmdRecordCount.ExecuteScalar, Integer)
Grid1.RecordCount = nRecordCount

Finally
cmdRecordCount.Dispose()
End Try

In debugging the code, the variable nRecordCount has the value of 7750. However, after the assignment to the Grid1.RecordCount, the Grid1.RecordCount still contains a value of 0.

I suspect it has something to do with the license file. But I cannot think of any other reason why that assignment will not take.

Any clues?
Cole
Posted: Saturday, April 30, 2011 11:06:23 PM
Rank: Newbie
Groups: Member

Joined: 1/14/2011
Posts: 6
Nevermind, I figured out my stupidity all by myself. :)

Even though I had everything written down, I still did not set the running mode properly.
eo_support
Posted: Monday, May 2, 2011 9:41:18 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Glad that it works for you and thanks for the update!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.