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
|
 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.
|
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
|
 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.
|
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
|
 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"]
|
Rank: Advanced Member
Joined: 6/10/2011 Posts: 37 Points: 111 Location: Belgrade
|
Solved too.
Thanks,
alex
|