How to use ChildFormParameters on version 1.7.0.7


Author
Message
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
#8 Child Form constructor parameters exposed in the OnBeforeChildFormExecuted event of a ListView



A new event argument parameter in the OnBeforeChildFormExecuted event called ChildFormParameters. By adding parms to this collection they will be passed on to the calling of the ChildFormDialog like this: ChildForm.ShowDialog(ChildFormParameters.ToArray()). This gives the developer the ultimate control in automation of a child form call through a ListView.




Hi Trent/Dustin,



Could you please provide a sample code on how to pass the parameter to the ChildFormDialog?



I checked the e.ChildFormParameters in the ListView.BeforeChildFormExecuted but this property is ReadOnly and also I don't now how I would add the parameters I need to send to the ChildFormDialog.

Edhy Rijo

Replies
Dustin Taylor
Dustin Taylor
StrataFrame Team Member (938 reputation)
Group: StrataFrame Users
Posts: 364, Visits: 771
My bad Smile.

Attached is a sample of these items. In short:

Child Form Dialog Parameters

You simply pass a comma seperated list of values in the ShowDialog method, and format the constructor of the child dialog to match the values you pass.

So, on the parent:

childFormDialog1.ShowDialog("test",1);

Which means the constructor of the child should look like:

public MyDialog(string MyFirstParameter, int MySecondParameter)
{
    InitializeComponent();
   
    //-- Do something with the parameters
    this.Text = MyFirstParameter;
    cboMyCombo.SelectedIndex = MySecondParameter;
}

StrataListView Enhancements

Both of these are simply properties of the StrataListViewSubItem and StrataListViewItem respectively.  Here is a block of code from the attached sample app that demonstrates this:

  _Item = new StrataListViewItem("Green", "");
  _Item.AdditionalItemHeight = 20; //-- Here is the additional height
  _SubItem = new StrataListViewSubItem();
  _SubItem.BackgroundColor = Color.DarkGreen;  //-- Here is the background color
  _SubItem.TextColor = Color.White;
  _SubItem.Text = "Value 3 - Additional height to show               Two rows of text.";
  _Item.SubItems.Add(_SubItem);
  slvMyListview.Items.Add(_Item);

Hope it helps!

Attachments
1707_EnhancementsSample.zip (164 views, 102.00 KB)
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Dustin,



I have not check the sample file yet, will do so in a minute, but want to clarify that I am using a SF ListView with the automation and the listview will call the ChildFormDialog internally, how do I pass the parameters in my form to the Listview so it will be pass to the internal ChildFormDialog in the listview?



As I said in the original message, the e.ChildFormParameters in the ListView.BeforeChildFormExecuted is ReadOnly.



Also if possible next time, use VB code instead of C#Hehe

Edhy Rijo

Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Dustin Taylor (04/05/2010)


StrataListView Enhancements



Both of these are simply properties of the StrataListViewSubItem and StrataListViewItem respectively. Here is a block of code from the attached sample app that demonstrates this:




Hi Dustin,



After looking at the sample I noticed that you said these properties are for the new StrataListView not the SF ListView as listed in the release documentations, that is why I was looking at the wrong control.



Please you have to add the automation feature in the current SF ListView to the new StrataListView so we can start replacing the old one with the new one and be able to provide test feedback. In my case I use the SF ListView in most of my forms and it would be challenge to manually update all the population settings and childform automations to the new StrataListView.



P.S.

Thanks for the sample, pretty interesting approach. Hope you can clarify my previous thread about ChildFormDialog parameters using the SF ListView automation features.

Edhy Rijo

Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hello again, anybody home???? BigGrin

Edhy Rijo

Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
another bump here....BigGrin

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Edhy,



I assume that you are just wanted to know when we are going to add the automation logic, right? If that is the case, then we will be doing this before the final release of 1.7.0.0. We have a need for this as well, but this control has grown so much that we didn't want to do add this until it was not so fluid in enhancements.
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Trent,



Glad to see you back!



No, it is not that, I cannot see how to use the new childFormDialog parameters with the current SF ListView automation.



If you don't mind, please read the thread since I explained this several times but guess was not understood.

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Also on the same update, steps 5 & 6 I understand that these changes refer to the current StrataFrame Listview not the StrataListView in beta. I could not find a way to access a cell to change its background or the AdditionalItemHeight property. Could you please provide quick sample code or more specific detail on how to start using those new features?




No, this is in regards to the new SF ListView, not the old one. I can provide a sample, but this is for the new list view.



As I said in the original message, the e.ChildFormParameters in the ListView.BeforeChildFormExecuted is ReadOnly.




It is supposed to be readonly, it is a collection. You don't override the collection instance, you add items to it:



CSharp



int myParm2 = 2;



e.ChildFormParameters.Add("MyParm1");

e.ChildFormParameters.Add(myParm2);




VB.NET



Dim myParm2 As Integer = 2



e.ChildFormParameters.Add("MyParm1")

e.ChildFormParameters.Add(myParm2)


Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Trent L. Taylor (04/12/2010)


No, this is in regards to the new SF ListView, not the old one. I can provide a sample, but this is for the new list view.




Thanks but Dustin already provided a sample on this one clarifying that it was referring to the new StrataListView.



Thanks for the sample code for the parameters, it is very simple now.

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Thanks for the sample code for the parameters, it is very simple now.





Good deal. Sorry for any confusion! Smile
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Trent,



Just to let you know that I tested the ChildFormParameters feature and it works just great.



Thanks again for the addition of this feature, it does makes my life easier. Hehe

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Awesome! Glad to hear it!! Smile
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Edhy Rijo - 15 Years Ago
Edhy Rijo - 15 Years Ago
Edhy Rijo - 15 Years Ago
Edhy Rijo - 15 Years Ago
Dustin Taylor - 15 Years Ago
Edhy Rijo - 15 Years Ago
Edhy Rijo - 15 Years Ago
                 Hello again, anybody home???? :D
Edhy Rijo - 15 Years Ago
                     another bump here....:D
Edhy Rijo - 15 Years Ago
                         Edhy,

I assume that you are just wanted to know when we are...
Trent L. Taylor - 15 Years Ago
                             Hi Trent,

Glad to see you back!

No, it is not...
Edhy Rijo - 15 Years Ago
                                 [quote]Also on the same update, steps 5 & 6 I understand that these...
Trent L. Taylor - 15 Years Ago
                                     [quote][b]Trent L. Taylor (04/12/2010)[/b][hr]
No, this is in...
Edhy Rijo - 15 Years Ago
                                         [quote]Thanks for the sample code for the parameters, it is very...
Trent L. Taylor - 15 Years Ago
                                             Hi Trent,

Just to let you know that I tested the...
Edhy Rijo - 15 Years Ago
                                                 Awesome! Glad to hear it!! :)
Trent L. Taylor - 15 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search