![]() | ![]() |
|
08-31-2010 10:13 AM
Hi…All,
Can it be possible to populate grid with some values when we click on a command button?
Ex: I have one database which contains some data.I have to fetch that data in to business object basing on two or more search criterias(ex:name,starting letter….etc).That data should be assigned to grid when we click on a command button.The grid should be empty before button click and the data should be populated on to the grid after button click. I have done with process variables and local variables.I get find them in the todolist.But it is not possible in blank forms itself.
Please let me know where I am doing wrong…..
Please put one solution which will be useful to me……
Thanks,
Thiru
Solved! Go to Solution.
09-01-2010 01:58 PM
Just guessing based upon the screen print and what I believe you are looking to accomplish.
Is your BO using parameters? And are your local variables being passed in as the parameters to your BO?
09-01-2010 04:06 PM
Firstly -- yes -- populating a grid with a button click is very possible (in fact, frequently done).
I'll throw together a sample solution and will post it here but wanted to quickly reply with two "gotchas" to watch out for.
1. Make sure that your grid's properties are set to "be dependent"
2. Make sure that the Business Object that your grid is populated from is a "Query" type BO and that it is set to "Always Refresh" -- this is done from the Data Access dialog for your form. Right click on the BO and select Always Refresh.
With those two things done, the only other thing to be sure of is that your command button is successfully inserting data into the table that the Bus Object is querying.
Sample coming soon...
09-01-2010 04:24 PM
Here is the sample I promised...
09-03-2010 12:09 AM
simply superb klewis.
It's working good.
Thank you klewis.....Thank you very much..
09-14-2011 06:37 AM
Hi,
I'm fairly new to Metastorm and i'm stuck on a similar issue.
What I am trying to do is create an admin form where you can display archived forms. (see attached image). I want the results to be displayed in a grid and filtered depending on what the user selects in the two fields on the form.
You mentioned: "...is that your command button is successfully inserting data into the table that the BO is querying.." Can you refresh the results the BO returns without having to insert into a table that the BO is querying?
My BO queries the eFolder table and I dont really want to be inserting/updating into that.
09-14-2011 09:16 AM
Make the instance of the BO on the form (the one tied to your grid) to be always refresh. Its parameters should be those on the form (the date an drop down). You should also check the "Field is dependent on another" setting on the grid itself.
Once those are done, any time the refresh button is pressed, the grid contents will refresh.
09-14-2011 09:50 AM
09-20-2011 09:36 AM
Guess that depends on how they are wrong. It could be done with IF or possibly CASE or LIKE in the SQL itself depending on the results you are expecting with no values. It is also possible to create "dynamic" SQL where the whole or part of the where clause is dynamic, but that is much more complicated to do in v9 than it was in v7. (I do with dynamic SQL and default order by would be more easily supported in v9 within BOs.)
09-20-2011 09:47 AM
Thanks, I did manage to get it to do what i wanted in the end. I tried dynamic SQL but it seemed a little long winded - you're right - not as easy as V7!
Thanks for your help!
![]() |
![]() |
![]() |
|
|
![]() |
![]() |
![]() |
















