AJAX :: Zooming Of Dynamically Created Plot?
Jan 21, 2011
I am creating a plot dynamically and want to embed the zoom feature to it so that small details could come to notice.
Is there any feature through which i can add a magnifying glass too may page or any other solution is desirable.
View 1 Replies
Similar Messages:
Apr 5, 2010
Im trying to dynamically create a popup control extender for labels which are also dynamically created. the labels are one a dynamically created accordion pane. Here is a section of my Page_Init method:
[Code]....
When I run the site with this code I get the following error:Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors.Parameter name: element
I thought it might be because the target control ID changes during compilation so i tried to find the labels in the Page_InitComplete method with this:[Code]....
The expression in the FindControl argument is what the id of the label looks like when i view source in my browser after running the page.I also tried to use the popup control's DynamicControlID property, but im not sure what the DynamicServiceMethod is for.
View 3 Replies
Sep 20, 2010
I have a script which creates a dynamic textbox (and more) in an AJAX async post back. But when I try to acess the textbox I am told "Object reference not set to an instance of an object". I have been strugleing with this for a long time. This is written in C# .Net 4. The line causing the problem is the very last one where I have tbGameName.Text.Trim()
[Code]....
View 2 Replies
Jan 6, 2011
I created a table dynamically with its row cell contain textbox. Now I need to show a hovermenuextender popup window on each rows textbox. I spend more time for this. But not getting till now.
This is my code for dynamically created table
private void GenerateTable(int colsCount, int rowsCount) {
string qry2 = "select lchannelname,ltransformdata from latestchannel where lenable=1";
DataTable dt = ob.getDetails(qry2);
dt.Columns.Add(new DataColumn("combined", System.Type.GetType("System.String"),
"lchannelname+ ' '+ltransformdata"));
//Create the Table and Add it to the Page
Table table = new Table(); table.ID = "Table1";
Page.Form.Controls.Add(table); int flag=0;
foreach (DataRow dr in dt.Rows) { TableRow row = new TableRow(); row.Width = 200;
TableCell cell = new TableCell(); TextBox tb = new TextBox();
tb.BorderColor = System.Drawing.Color.OliveDrab;
cell.BorderColor = System.Drawing.Color.OliveDrab;
cell.BorderWidth = 1; cell.Width = 200; tb.Width = 200;
// tb.ReadOnly = true; tb.Text = dr["combined"].ToString();
tb.ID =flag.ToString(); cell.Controls.Add(tb);
row.Cells.Add(cell); table.Rows.Add(row);
AjaxControlToolkit.HoverMenuExtender hrv = new AjaxControlToolkit.HoverMenuExtender(); hrv.TargetControlID = tb.ID;
Here I am confusing for which way is using for popup panel1
hrv.PopupControlID = Panel1.ID;
hrv.PopupPosition = AjaxControlToolkit.HoverMenuPopupPosition.Right;
Panel1.Controls.Add(hrv); flag++; } }
protected void Page_Load(object sender, EventArgs e) {
int numOfColumns = 1;
int numOfRows = ob.selectLatestEnableCount();
GenerateTable(numOfColumns, numOfRows); }
I want to popup this Panel1 on textbox through hovermenuextender
<asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px">
<div style="border:1px outset white;padding:2px;">
<div><asp:ImageButton ID="ImageButton1" ImageUrl="~/images/close.png" runat="server" /> <asp:LinkButton ID="lnkButtonHide" runat="server" CommandName="Edit" Text="Hide Channel" ForeColor="olivedrab" OnClick="lnkButtonHide_Click1" /> </div>
<div> <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/images/element_up.png" /> <asp:LinkButton ID="LinkButtonUp" runat="server" CommandName="Cancel" Text="Go Up One Pos" ForeColor="olivedrab" OnClick="LinkButtonUp_Click2"/> </div>
<div> <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/images/element_down.png" /><asp:LinkButton ID="lnkButtonDown" runat="server" CommandName="Delete" Text="Go Down One Pos" ForeColor="olivedrab" OnClick="lnkButtonDown_Click1"/> </div> </div> </asp:Panel>
View 1 Replies
Jan 6, 2011
I'm Creating some textboxes with autocompleteextenders attached to them dynamically at runtime however, I'm having some trouble getting them to fire.
When I create the textboxes with autocompleteextenders at design time, they work fine.
Here's the method that creates them both:
[Code]....
The txtID parameter is basically a name with a number appended to it, IE: txtBox_0,txtBox_1
The svcMethod parameter is of course the respective service to call (there are 2 different services.)
View 5 Replies
Mar 9, 2010
I have some code that I am working on that uses an UpdatePanel and some dynamically created buttons to perform functions. The problem is that the dynamically created buttons aren't working the same as my test static button, which is behaving exactly as it should be.
So I was wondering if someone would be willing to simply post an example (in VB.NET or C# please) of the following:
An UpdatePanel has a Label and a Placeholder inside of it
The Placeholder has a dynamic button added to it
Clicking on this button will make the Label say "Hi" without performing a full page postback.
If I can just get that much to work, I am sure that the rest of the code will be fine. I just can't seem to get my dynamic buttons to act like my static ones do in an UpdatePanel.
View 3 Replies
Jun 30, 2010
i have a WSS 3.0 Webpart that contains an UpdatePanel with a customized SPGridView. I want to provide instant filtering of data by adding a textbox below the column header when the column shall be filterable. There is a jQuery based solution for this on the net, but it's totally client side and doesn't work with paging, so i tried it on my own.
In the CreateChildControls of my SPGridViewExt class i have :
[Code]....
I've also overridden the DoFilterPostBackEventProcessing method to create a "[ColumnName] LIKE '%[textbox.value]%'" filterExpression for my datasource which also creates the LIKEFILTER_COLUMN and LIKEFILTER_VALUE ViewState Items so i can identify the textbox that should refocus on after the postback. The filtering itself works great, but whatever i try, i am not able to set the focus to the textbox after entering the first letter.
[Code]....
All these four methods don't work. The registerstartupscript call doesn't even render the script when i search the page source after postback. I also tried to add a HiddenField to my webpart and set it's value to the control id of the textbox in onfocus, then register a startupscript in OnLoad that focuses the control if the HiddenField has a value, but to no avail.
View 2 Replies
Oct 7, 2010
So I have two UpdatePanels. I am dynamically creating server-side buttons in UpdatePanel2. When the buttons come out, they are not hooked to the asynchronoustriggers of updatePanel1.
So how can I dynamically add these triggers of these newly dynamically created buttons so that clicking these buttons will only cause a partial postback to UpdatePanel1 ? Right now, when I click these buttons, it causes a partial-postback refresh to UpdatePanel2 (the panel itself that which the controls reside in)
View 4 Replies
Feb 2, 2010
I have a small form with some static elements that I am able to access with javascript the bring up a popup. 4 textboxes are generated and attached to a updatepanel. I've been trying various methods of validating the contols without generating postback.
I found anytime i registered a javascript to the scriptmanager the page must refresh.
Is there anyway it can be done?
View 1 Replies
Nov 22, 2010
I am using the code below to recreate a modalPopup window. At each UpdatePanel refresh I "lose" the window but I recreate it again after my Panel is updated. This gives me the impression that the windows is always open. The only problem is after I drag and drop it to a different location, the window is recreated back in its original location:
if ($find(MPIDList[clientID]) == null) {
$create(Sys.Extended.UI.ModalPopupBehavior,
{ "BackgroundCssClass": "modalBackground",
"CancelControlID": CancelControlIDList[instanceId],
"DropShadow": true,
"X": 50, "Y": 250,
"PopupControlID": PopupControlIDList[instanceId],
"PopupDragHandleControlID": PopupDragHandleControlIDList[instanceId],
"id": MPIDList[instanceId]
}, null, null, sender);
So I was trying to do the following:
1 - Initialize a global var for X and Y with the static values of 50 and 250;
2 - Show the window and drag it to a different location;
3 - UpdatePanel is refreshed and my Gridview is data bound with new data
On step 3 above I need to find a way to save the current window position BEFORE UpdatePanel is called and apply the saved position AFTER the UpdatePanel call is finished.
View 1 Replies
Feb 17, 2010
I have a grid view in Ajax UpdatePanel. In a column of a grid view I have a button call btnAddNewRecord. I need to fire btnAddNewRecord.Click event once I click on that.
How can I do this?
View 4 Replies
Mar 7, 2010
I am using cascading dropdown list where the no of dropdowns is created dynamically on the page. The cascading drop downs are contained in a User Control. I need to call a method from the Parent page which will be executed when the values in one of the dropdowns change. The server side event is not firing as I have set AutoPostback property for the dropdownlists to be false. How can i make the Page event fired from the Selected index changed of the dropdowns keeping the autopostback property to be set as false.
View 5 Replies
Sep 28, 2010
I'm creating an quiz application which queries the database and extracts the questions and choices. I use dynamically created controls such as a checkbox list and fill the values dynamically. How do I do this? Right now I have these functions:
array_random_init(); this creates a 10 element integer array from 1-20 - extract_question(i): this extracts a question indexed at i in DB, I created the controls and set the appropriate text in this function. - validate_question(i); this is called by button_click and validates the question i according to DB.
I understand I have to recreate the controls in Page_init on postback, but what should it look like? Do I need to add "if IsPostBack" in page_init, or do I create the controls in page_init() and reset their properties in page_load when I use extract_question(i)? Also, I cannot seem to clear the selected boxes on postback, I added page directive "enableviewstate=false" but it doesn't work.
View 2 Replies
Feb 14, 2011
I have a website that sales associates access to view account information with clients. S.A's can only view information for accounts that they are tied to. Some clients have more than one account, S.A's can be tied to more than one account, but not all accounts of one client need to be tied to one S.A.
On the account info pages, I have account numbers (dynamically displayed labels) displayed of other accounts that the account client is associated with, which the S.A's can see. I'm modding this so that if the S.A has viewing permissions of any of the other accounts on that list of accounts, that instead of a label being displayed, a button directing them to that account page will display instead. In order for this to work, I have to attach a security function to the button, otherwise the page will blow out on the S.A's.
So I'm running a piece that is displaying a button instead of a label, which is working fine. My problem is when I try to attach the security event to the dynamically displayed buttons. It seems that the page just posts back and doesn't execute my code at all.
On my Page_Load, I'm running this after the buttons and labels are displayed:
For x = 0 to tblAccountList.Rows.Count - 1
'use a try to target the button, use catch to handle if it's instead a label, only one cell per row.
Try
Dim accountLink as Button = tblAccountList.Rows(x).Controls(0)
Addhandler accountLink.Click, AddressOf Me.PermissionViewCheck
Catch ex as InvalidCastException
Continue For
End Try
Next
I don't have any code checking for postbacks or anything like that, but the "PermissionViewCheck" event never fires and just reposts the page.
View 6 Replies
Nov 11, 2010
I have been experiementing with the annonymous types in C#, and am wondering if it would be possible to have a 'dynamic key' in the annonymous object.Here is what I have so far:
[Code]....
[ { "monday": true } ] what I am getting: [ { "temp": true } ]Is there a way to have the object's 'key' be dynamicly created? What I want it to be able to send the KeyValuePair's key as the object's key. Is this possible?
View 2 Replies
May 24, 2010
I'm trying to get the value of a dynamically created radiobuttonlist via javascript to call a pagemethod.
This is how I'm creating the rbl:
rbl.Attributes["onclick"] = "javascript:preview('" + rbl.ID + "','" + rbl.ClientID + "');";
And this is the javascript:
function preview(controlid, clientid)
{
var radio = document.getElementsByName(clientid);
var answer = "k";
for (var ii = 0; ii < radio.length; ii++)
{
if (radio[ii].checked)
answer = radio[ii].value;
}
PageMethods.SaveAnswer(controlid, answer);
}
The problem however is that I want to get the groupname of the radiobuttionlist so I can use getElementsByName, but i have no luck so far.
View 1 Replies
Feb 15, 2010
I'm creating 14 textboxes for every day in a month and user can select the month so i have o create them dynamically. But i can't reach the values in the textboxes.
When i don't create them dynamically like
<asp:TextBox ID= "TextBox1" name="TextBox1"> </asp:TextBox>
I can get the value from the C# side by using the
((TextBox)Page.Form.FindControl("TextBox1")).Text
However this moethod doesn't work for the textboxes that i created dynamically. I'm creating them in a loop it's something like;
[Code]....
Then i add the text box to the necessary places at my table.However i can't reach the textboxes when i use the same method
((TextBox)Page.Form.FindControl("!A uniqe ID!"));
It gave a null value...
View 7 Replies
Jul 20, 2010
I have a tree view with checkboxes for leaf nodes. If i click on checkboxes, I am creating some html controls dynamically. And in other static button click event I need to get an ID's of those dynamically created controls.
My Code is:
.aspx
<asp:Panel ID="pnlOuter" runat="server" Visible="false" Width="650px">
<table>
<tr>
<td>
<asp:Label ID="lblQtnrName" runat="server" Text="Questionaire Name"></asp:Label>
<asp:TextBox ID="txtQtnrName" runat="server"></asp:TextBox>...
View 14 Replies
Jun 21, 2010
I will have to retrive data from database assume this is the data I got
|No | Name|
46 ANN
24 LISA
20 JOAN
41 JACK
and so on. I will have to create checkbox dynamical by these data like this
checkbox ANN checkbox LISA checkJOAN
checkbox JACK
I will create a container and then create checkbok , then add control to container.. my problem is how to give it a break each 3 controls? and how to format them like this
<TR>
<TD width =33%>
checkbox ANN
</TD>
<TD width =33%>
checkbox LISA
</TD>
<TD width =33%>
checkbox JOAN
</TD>
</TR>
<TR>
<TD width =33%>
checkbox JACK
</TD>
</TD>
View 7 Replies
Jun 5, 2010
In my code behind (c#) I dynamically created some RadioButtonLists with more RadioButtons in each of them. I put all controls to a specific Panel.What I need to know is how to access those controls later as they are not created in .aspx file (with drag and drop from toolbox)?
I tried this:
foreach (Control child in panel.Controls)
{
Response.Write("test1");
[code]....
"test1" and "test2" dont show up in my page. That means something is wrong with this logic.
View 3 Replies
Nov 18, 2010
I know this question has been asked thousands of times, and I've struggled with it before, but for some reason, I can't accomplish what I want to accomplish... I have a dynamically added LinkButton that when clicked will dynamically add a control (in this example, a textbox) to the same panel. The intent is to continuously add on as many controls as times the LinkButton was clicked (i.e. I click it once, one box, then another click will give me 2 boxes, another click adds a 3rd). In the code below, I use the current date and time serialized to create a unique ID for each textbox control.
When I execute the code, clicking "Add Filter" will generate a new textbox, but once clicked again will create a new one, and dispose of the one before it. Instead, I want to persist the previous textbox as well as any data submitted within it.In the aspx:
<asp:Panel ID="pnlFilter" runat="server">
</asp:Panel>
In the aspx.cs:
protected void Page_Init(object sender, EventArgs e)
{
LinkButton lb = new LinkButton(); [code]....
View 4 Replies
Jan 25, 2011
I want to preserve the dynamically created control when postback occurs .
protected void Page_Load(object sender, EventArgs e)
{
} It can be achieved by calling CreateTable() in Page_Load. Is there any alternative way to preserve the control
[code]....
View 2 Replies
Jan 20, 2011
<asp:GridView ID="GridView1" runat="server" >
<asp:TemplateField HeaderText="Token" SortExpression="Token" HeaderStyle-Width="100px">
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
</asp:GridView>
update:
after i view the source code of the page thsi is what i see the id of a textbox that i have created dynamic.
ctl00_ContentPlaceHolder1_tabControl_tabUsers_MyControl1_gv_ctl02__token0_3
OnRowUpdating:
TextBox _token = gvOrg.Rows[e.RowIndex].Cells[7].FindControl("_token " + e.RowIndex + "_" + rowId) as TextBox;
Update end:
i am adding few textbox dynamic in OnRowDataBound and whe i try getting the value then i am getting null
here is my code:
[Code]....
View 2 Replies
Jan 15, 2010
I use this method for inserting a textbox in a tablecell
[code]....
But it doesn't work. beacuse it doesn't find the textbox created previously.
I've put also EnableViewState="true" in the file aspx.
View 2 Replies
Apr 4, 2011
I'm creating textboxes in the Page_Load event and giving them values, however whenever I load the details I am getting the same output. I always seem to get the first output I got, even on subsequent searches.Here's what my code with the irrelevant information missing:
Textbox txtName = New Textbox();
protected void Page_Load(object sender, EventArgs e)
{
[code]...
If DropDownList has two values (e.g. "Item 1" and "Item 2") and has autopostback enabled, first time it will generate and show "Item 1" in the textbox (the default value for the DropDownList), but if this is changed and the autopostback fires, the textbox does not change.I've tried getting around this by creating a new TextBox, overriding the "LoadPostData" function to prevent this from loading, which got around the issue there, but then I couldn't view the data afterwards.
Any idea how I could get around this? I may be approaching this in the wrong way.Edit: I've added another item to DropDownList that removes TextBox, so that it can be re-created again. It seems to show the correct data when it is re-created after being removed, but if I'm attempting to just edit it, this isn't updating correctly.Edit2: Here's the rest of the code for this page in case this helps at all. The objects which I'm having issues with are SBUName and SBUComments, which are both TextBoxes. The same issue is also happening for SBUClientDropdown but I believe the resolution will be similar:
DBHandler DBHandler = new DBHandler();
List<string> clients = new List<string>();
List<string> clientGroups = new List<string>();
[code]...
View 5 Replies