Welcome Guest Search | Active Topics | Members | Log In | Register

Make entree control invisible Options
aleksandarcrvc
Posted: Tuesday, June 14, 2011 5:40:03 AM
Rank: Advanced Member

Joined: 6/10/2011
Posts: 37
Points: 111
Location: Belgrade
Hi,

Is it posible to make control invisible on ME application but still available to use. Some prorperty like visibility.

BR,

Alex
joe
Posted: Tuesday, June 14, 2011 7:43:36 AM

Rank: ME Staff

Joined: 1/12/2009
Posts: 279
Points: 408
Location: VA
Not currently. What is the situation you are trying to solve?

On a related note; ME also does not have a viewstate. In order to persist values across requests (ClickActions), you will have to include them in the ClickAction properties.
aleksandarcrvc
Posted: Thursday, June 23, 2011 6:03:26 AM
Rank: Advanced Member

Joined: 6/10/2011
Posts: 37
Points: 111
Location: Belgrade
I face with following problem. I create datatable from object and add some custom columns. Here is the code:

Code:
requests = proxy.GetRequests(true, "SR", null, null, Status, null, null, currentuser, null, TopCount);
                DataTable table = new DataTable();
                table.Columns.Add("Naslov", typeof(string));
                table.Columns.Add("RequestID", typeof(string));
                table.Columns.Add("ID", typeof(int));
                table.Columns.Add("Opis", typeof(string));
                table.Columns.Add("Hitnost", typeof(string));
                table.Columns.Add("Kontakt", typeof(string));
                table.Columns.Add("Lokacija", typeof(string));
                table.Columns.Add("Alternativna lokaicja", typeof(string));
                table.Columns.Add("Status", typeof(string));
                //table.Columns.Add("Prilozeno", typeof(string));
                foreach (var item in requests)
                {
                    table.Rows.Add(item.Title,item.RequestID, item.Name.Replace("IR", "").Replace("CR", ""), item.Description, item.Urgency, item.ContactMethod, item.LocationDescription, item.AlternateLocation, item.Status);
                }
                //EntreeListGroup lGrp = output.AddListGroup();
                int pid = System.Convert.ToInt32(EntreeScope.Properties["pid"]);
                myGroup.ListHeader = "Detalji za:  " + table.Rows[pid]["Naslov"].ToString();

                for (int i = 0; i < table.Columns.Count; i++)
                {
                    EntreeListItemDetailNameValue l = myGroup.AddListItem<EntreeListItemDetailNameValue>();
                    l.Name = table.Columns[i].ColumnName;
                    l.Value = table.Rows[pid][table.Columns[i].ColumnName].ToString();
                    #region comment
                    if (table.Columns[i].ColumnName == "Status" && table.Rows[pid][table.Columns[i].ColumnName].ToString() == "Aktivan")
                    {
                        EntreeTextBox tbDescription = myGroup.AddFormItem<EntreeTextBox>("myTbDescMessage");
                        tbDescription.Name = "Komentar ICT timu";
                        EntreeTextBox tbGuid = myGroup.AddFormItem<EntreeTextBox>("myTbGuid");
                        tbGuid.Value = table.Rows[pid]["RequestID"].ToString();
                        tbDescription.TextMode = EntreeTextBox.EntreeTextBoxStyle.MultiLine;
                        tbDescription.RowCount = 4;
                        EntreeCheckbox cbSelected = myGroup.AddFormItem<EntreeCheckbox>("cbSelected");
                        //set the label for the checkbox
                        cbSelected.Name = "Otkazi realizaciju mog zahteva";
                        //set the checked property of the checkbox
                        cbSelected.Checked = false;
                        EntreeListItemTitle next = myGroup.AddListItem<EntreeListItemTitle>();

                        next.Title = "Posalji poruku";

                        //- ClickAction that will take you to the next step

                        EntreeClickActionObject ca = output.CreateClickAction();

                        ca["screen"] = "pages";

                        ca.FormSubmit = true;

                        next.SetClickAction(ca);



After that I need value of column RequestID for specific item. That id show thrue the EntreeListItemDetailNameValue but it is not available in EntreeScope.FormProperties after click action. Because of that I must to put that value in custom control and after that it is available on EntreeScope.FormProperties["keyContorl"]. It is a guid value that it procced to web service method on click action. It is not representable to end users view this value and that is my question all about. How to hide some controls or how to get some values from datatable without putting that value to EntreeTextBox or some other control.

BR,

Alex
joe
Posted: Thursday, June 23, 2011 7:03:47 AM

Rank: ME Staff

Joined: 1/12/2009
Posts: 279
Points: 408
Location: VA
You can add custom property values to your clickaction that you want to persist. ca["requestID"] for example. This is a work-around for the lack of ViewState in Mobile Entree.
aleksandarcrvc
Posted: Thursday, June 23, 2011 7:28:24 AM
Rank: Advanced Member

Joined: 6/10/2011
Posts: 37
Points: 111
Location: Belgrade
I set ca["requestID"] = table.Rows[pid]["RequestID"].ToString()


How can I access ca["requestID"] in other window. From form properties of what?

alex
joe
Posted: Thursday, June 23, 2011 7:40:50 AM

Rank: ME Staff

Joined: 1/12/2009
Posts: 279
Points: 408
Location: VA
You access it the same way you access the ca["screen"] property. From EntreeScope.Properties["requestID"]
aleksandarcrvc
Posted: Thursday, June 23, 2011 9:09:03 AM
Rank: Advanced Member

Joined: 6/10/2011
Posts: 37
Points: 111
Location: Belgrade
Solved too.

Thanks,

alex
Users browsing this topic
Guest


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.

Main Forum RSS : RSS

Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.