kabila
Posts: 30
|
Posted: 03/03/2004, 7:25 AM |
|
I am trying to achieve the following:
1. Get data from a table
2. For each record gathered from the query, I want to assign a value to one of the fields gathered in 1.
3. Do some additional math on 2
4. Present data derived in 3. in a Grid form.
I have noticed in forums and docs that I can use BeforeShow, or BeforeRowShow events, but then we have a Grid record source that needs to be assigned at design also.
Can someone please guide me in the right direction. ?
Thanks
-Sam
|
|
|
peterr
Posts: 5971
|
Posted: 03/03/2004, 11:06 AM |
|
You can modify the SQL dynamically at run-time. See: http://docs.codecharge.com/studio/html/ProgrammingTechn.../ModifySQL.html http://docs.codecharge.com/studio/html/Components/RTPro...DataSource.html
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
kabila
Posts: 30
|
Posted: 03/03/2004, 11:50 AM |
|
Thank you. That will get me started (I think )
-Sam
|
|
|
kabila
Posts: 30
|
Posted: 03/03/2004, 12:08 PM |
|
wrote to soon!
In .NET, datasource doesnt seem to provide an option to change the select clause (you can change the where clause though)
Second, once you get the recordset from the buildbeforeselect SQL, is there a way to intercept it and change the values items. Something similar to this example:
DataRowCollection newDr = Select.Execute().Tables[0].Rows;
for(int i = 0; i < newDr.Count; i++){
UserName = newDr["emp_name"].ToString();
WorkPhone = newDr["phone_work"].ToString();
}
Except- a) how do you intercept it (i.e. which event)
b) how do you refer to that collection (since the select has already executed in beforebuildselect)
thanks
|
|
|
peterr
Posts: 5971
|
Posted: 03/03/2004, 12:41 PM |
|
I don't know the answer regarding .NET, but please post such question to the .NET forum, as some people familiar with .NET are subscribed to that specific forum. I may obtain an answer from our staff at that time as well.
Contacting our support directly may be even a better option.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
|