Solved

Panel values are not set on the page for the contols.

Posted on 2009-05-19
6
189 Views
Last Modified: 2012-05-07
I have the following scenerio:
   case "Set Ticket to Waiting Status":
                        {
                            PanelReOpenedTicket.Visible = false;
                            PanelClosedTicket.Visible = false;
                            PanelOpenTicket.Visible = false;
                            PanelWaitingTicket.Visible = true;
                            PopulateWaitingTicket();
                            break;
                        }
The Panel is initially on PanelClosedTicket.Visible = true;
Then it becons true on panelwaitingticket.
When I do a populate waiting ticket. The dropdown control are not being populated.
The text boxes are and labels. See code.
Here is the populate waiting ticket.
 
 

 protected void PopulateWaitingTicket()

        {

            this.lblWaitingTicketNumber.Text = "Ticket #: ";

            DataSet TicketDS = BLL.TicketLogic.GetTicket(ticketID);

            txtWaitingTicketActionTaken.Attributes.Add("style", "overflow :hidden");
 

            if (TicketDS != null && TicketDS.Tables.Count != 0 && TicketDS.Tables[0].Rows.Count > 0)

            {

                lblWaitingTicketNumberDisplay.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["TicketNumber"].ToString());
 

                lblWaitingTicketClosedBy.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["AgentClosed"].ToString());

                lblWaitingTicketCreatedBy.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["AgentCreated"].ToString());

                lblWaitingTicketDateClosed.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["DateClosed"].ToString());

                lblWaitingTicketDateCreated.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["DateCreated"].ToString());

                lblWaitingTicketLastUpdate.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["DateLastModified"].ToString());
 

                ((DropDownList)uxLookupFieldWaitingTicketStatus.FindControl("LookupFieldTicketStatusDropDown")).Enabled = true;

                uxLookupFieldWaitingTicketStatus.DefaultValue = "Waiting";

                //HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["TicketStatus"].ToString());
 

                ((DropDownList)uxLookupFieldWaitingTicketType.FindControl("LookupTypeTicketDropDown")).Enabled = true;

                uxLookupFieldWaitingTicketType.DefaultValue = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["TicketType"].ToString());
 

                ((DropDownList)uxLookupFieldWaitingTicketAgentFolowup.FindControl("LookupFieldTicketAgentFollowupDropDown")).Enabled = true;

                uxLookupFieldWaitingTicketAgentFolowup.DefaultValue = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["AgentFollowup"].ToString());
 

                ((DropDownList)uxLookupFieldWaitingTicketPriority.FindControl("LookupFieldTicketPriorityDropDown")).Enabled = true;

                uxLookupFieldWaitingTicketPriority.DefaultValue = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["Priority"].ToString());
 

                ((DropDownList)uxLookupFieldWaitingTicketServiceImpact.FindControl("LookupFieldTicketServiceImpactDropDown")).Enabled = true;

                uxLookupFieldWaitingTicketServiceImpact.DefaultValue = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["ServiceImpact"].ToString());
 

                ((DropDownList)uxLookupFieldWaitingTicketRequestType.FindControl("LookupFieldTicketRequestTypeDropDown")).Enabled = true;

                uxLookupFieldWaitingTicketRequestType.DefaultValue = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["RequestType"].ToString());
 

                ((DropDownList)uxLookupFieldWaitingTicketAssignedTo.FindControl("LookupFieldTicketAssignedToDropDown")).Enabled = true;

                uxLookupFieldWaitingTicketAssignedTo.DefaultValue = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["AssignedTo"].ToString());
 

                ((DropDownList)uxLookupFieldWaitingTicketContactMethod.FindControl("LookupFieldTicketContactMethodDropDown")).Enabled = true;

                uxLookupFieldWaitingTicketContactMethod.DefaultValue = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["ContactMethod"].ToString());
 

                ((DropDownList)uxLookupFieldWaitingTicketLocationSIMs.FindControl("LookupFieldTicketLocationSIMsDropDown")).Enabled = true;

                uxLookupFieldWaitingTicketLocationSIMs.DefaultValue = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["LocationSIMs"].ToString());
 

                txtWaitingTicketSubmitVia.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["TicketApplicationType"].ToString());
 

                txtWaitingTicketUserID.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["UserID"].ToString());
 

                txtWaitingTicketTractIt.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["TrackIt"].ToString());
 

                txtWaitingTicketExternalTicket.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["ExternalTicket"].ToString());
 

                txtWaitingTicketShortDescription.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["ShortDescription"].ToString());
 

                txtWaitingTicketFollowupNotes.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["FollowupNote"].ToString());
 

                txtWaitingTicketProblem.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["ProblemNote"].ToString());
 

                txtWaitingTicketSolution.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["SolutionNote"].ToString());
 

                txtWaitingTicketActionTaken.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["ActionNote"].ToString());
 

                txtWaitingTicketDateFollowup.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["FollowupBy"].ToString());
 

                txtWaitingTicketDateAssigned.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["DateAssigned"].ToString());

            }
 
 

Any help would be great

Open in new window

0
Comment
Question by:mathieu_cupryk
  • 3
  • 3
6 Comments
 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 24428573
Hi mathieu_cupryk,
>>..When I do a populate waiting ticket. The dropdown control are not being populated.
Any error returned? Try put the try/catch block to see the exact error code for further inspection.
Lastly, i've noticed you use own custom dropdownlist? What is the process that being done inside the DefaultValue as used? Check if the action has been fired correctly.
eg:
 ...
 uxLookupFieldWaitingTicketStatus.DefaultValue = "Waiting";
               
0
 

Author Comment

by:mathieu_cupryk
ID: 24428602
When I try to set the default value it is still empty?
0
 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 24428634
May i take a look on your DefaultValue function?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 500 total points
ID: 24428648
If you're using normal dropdownlist, the syntax for selectedText/Value is coded in this way:
eg:
By Text
uxLookupFieldWaitingTicketStatus.SelectedItem.Text = "Waiting";
or
By Value
uxLookupFieldWaitingTicketStatus. SelectedValue = "Waiting";

0
 

Author Comment

by:mathieu_cupryk
ID: 24431183
I only have a get in the properties of the control.
How should I set this up.
0
 

Author Closing Comment

by:mathieu_cupryk
ID: 31583349
It is working.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Hovering effect 9 47
Sending E-mail ASP.Net 3 56
CheckboxList Object reference not set to an instance of an object. 16 33
Why don't I see this table in EDMX file? 2 23
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Edureka is one of the fastest growing and most effective online learning sites.  We are here to help you succeed.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now