15,891,136 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by MoiD101 (Top 18 by date)
MoiD101
20-May-13 9:28am
View
I fixed the issue in the end, i added the
//Get the existing Comments into a string
var strCurrentStage = $(".clCurrentStage", row).text();
//Add the any existing Comments
$("select#<%=ddlPopUpEditCurrentStage.ClientID%>").val(strCurrentStage);
Just after where the dropdown options were populated. ill post it beelow
MoiD101
20-May-13 8:53am
View
i have just done this which alters it immediately the user moves over the modal container, but i fear that will happen every time they do and therefore change their selection ;
$('#PopUpTrackerEditFields').live('mouseover', function () {
//Get the existing Comments into a string
var strCurrentStage = $(".clCurrentStage", row).text();
//Add the any existing Comments
$("select#<%=ddlPopUpEditCurrentStage.ClientID%>").val(strCurrentStage);
//Dynamically add the text to the tooltip
$("#<%=ddlPopUpEditCurrentStage.ClientID%>").attr('title', 'Click to select the current stage here for ' + strCurrentStage + strPSTNNum);
});
MoiD101
20-May-13 8:45am
View
i have just noticed that if i press the DOM refresh icon on the IE dev tools window then click on the icon that shows the modal again, the dropdown now shows the correct selected string. So i need some way to refresh the dropdown just after its list has been populated to show the new value
MoiD101
20-May-13 8:38am
View
yeh i was afraid of that i was always using the correct syntax apart from i was using $("#<%=ddlPopUpEditCurrentStage.ClientID%>").val(strCurrentStage);
so it must be something else causing this not to show
MoiD101
20-May-13 8:26am
View
The content of strCurrentStage is 'Order Acknowledgment' so i want that to be showing inside the dropdown...
Below is what is renderd:
<div class="clEditFieldCurrentStageContainer">
<select id="MainContent_ddlPopUpEditCurrentStage" title="Click to select the current stage here for Order AcknowledgmentPSTN26560" name="ctl00$MainContent$ddlPopUpEditCurrentStage">
<option>Civils</option>
<option>Completed</option>
<option>Customer Delay</option>
<option>In escalation</option>
<option>Initial Planning</option>
<option>Not Set</option>
<option>Order Acknowledgment</option>
<option>Order in Progress</option>
<option>Order on Track</option>
<option>Supplier Delay</option>
<option>Wayleave</option>
</select>
</div>
MoiD101
20-May-13 8:06am
View
yes whatever ends up in strCurrentStage(from the database) will be an option in the dropdown list. And that is all i want to do is to show the current status for the record so that the user can change it.
MoiD101
20-May-13 7:52am
View
strCurrentStages contents is from the database for the record that is about to be updated by the user.
Whatever string is inside strCurrentStage will also be one of the options in the dropdown list;
So the idea is when the popup modal appears, the default value present in the dropdown list will match the present value for that record from the database.
MoiD101
20-May-13 7:42am
View
i want the user to see the dropdown with the selected value showing being the one from the record (they are about to update) in the database, then if they click on the dropdown they see the rest of the options to choose from (they are editing a record)
MoiD101
20-May-13 7:18am
View
ok i have now populated the dropdown with the options but the default option is not being added using $("#<%=ddlPopUpEditCurrentStage.ClientID%>").val(strCurrentStage); strCurrentStage does contain the string i want, but its not being placed into the dropdown as the default
MoiD101
20-May-13 6:24am
View
As i suspected having thought about it over the weekend and now you have kindly confirmed it Tadit Dash, thank you :)
MoiD101
20-May-13 6:00am
View
the list items are stored in a database, so i just have to retrieve them and then add them to the dropdown list. Hopefully the default value from the record in the database will populate as planned. The popup window is for editing existing records so the existing dropdown needs to be set as the default selection. Then the user can reselect a new one when editing.
MoiD101
20-May-13 5:37am
View
Yes i was thinking over the weekend why this is not applying my default selection as coded above and it has occurred to me that there MUST be an existing list of options already in place in the dropdown; one of which is an option that matches the 'strCurrenStage' contents i'm trying to set as the default populated option.
so in summary; i need to have a dropdown with the options present to set the default value to match from?
MoiD101
20-May-13 4:51am
View
Hi here it is;
<div id="PopUpTrackerEditFieldCurrentStage">
<div class="clEditFieldCurrentStageContainer">
<select name="ctl00$MainContent$ddlPopUpEditCurrentStage" id="MainContent_ddlPopUpEditCurrentStage">
</select>
</div>
</div>
MoiD101
11-Feb-13 10:59am
View
thanks Rich.
MoiD101
11-Feb-13 10:56am
View
I have a bunch of template and edititemtemplate controls all pulling data from a sql stored procedure and the edit column is created only when i run the page, so i dont see it in code either on the aspx page or the code behind. so i cannot see it to convert in your description above.
MoiD101
11-Feb-13 10:42am
View
Hi Rich there is no field with the edit in until it has rendered as i am using the gridview AutoGenerateEditButton="True" property which creates it. (unless i am missing something, ai am very new to coding btw)
MoiD101
6-Feb-13 13:47pm
View
hi yes sorry Sergey, still very new to coding. the controls are asp.net controls such as textbox and dropdownlists mainly, all c# code behind.
The problem is, can i use code behind to effectivly say "all textbox and dropdownlist controls in this row to have the same color as the the containing row"
I managed to get the row color changed by use of e.Row.BackColor = System.Drawing.ColorTranslator.FromHtml("#F47475");
and now wish to change any controls background colors in that row...
MoiD101
24-Jan-13 10:02am
View
mmm thanks S, but i had already looked at that but it uses the header which i already have onclick sort on. I was after some text boxes above the headers where i can type the text into it and it only shows those rows (and are still editalbe).
I am a very inexperienced programmer so i struggle at best and i am not quite experienced enough to program a solution by myself
Show More