Showing posts with label display. Show all posts
Showing posts with label display. Show all posts

Wednesday, March 28, 2012

AJAX UpdateProgress

hi

i working with AJAX recently i am facing one problem in UpdateProgress control.It work fine display the message and animation picture perfect.My problem is i want pass a Value to updateprogress control in Example now it give me

Updating databases ..... and some animation.

i want

Updating Databases Employee Name : XXXXXXXXXXXXXXXXXXXX & animation.

How to pass these value in label control in updateprogress control ?

Q2) in UpdateProgress Run how to disable other control execpt the cancel button in updateprogress control ? Or a popup dialog box display on middle of page and disbaled the main web page unless u cancel the control ?

Q3) AJAX control work with microsoft product with out any problem.when i try with component art products it give me error Sys.event.Ui.Dom what could be reason.

Q3)

For Question 1, seehttp://forums.asp.net/t/1152621.aspx

Question 2, you can use a Modal Popup approach. Example here:http://www.visoftinc.com/samples/UpdateProgress.aspx and how to do this, here:http://blogs.visoftinc.com/archive/2007/09/10/modalupateprogress.aspx

Question 3, not to familar with Component Art; you may want to check over in their forums...

-Damien

AJAX Update Panel And ModalPopUpExtender

hi,

Im using the ModalPopupExtender ,Its work's just fine that is the model pop up i display contains a Drop down list a grid etc etc now on an Event of the Selected index changed another Drop downlist is suppose to be filled ..but it does not happen ..!! For the First time the pop up is displayed and the selected index is changed nothing happens the second time onwards the events on those particular controls work,that applies to all controls within the ModalPopUp..!! Pls help me regarding this..!!!!

Thanks n Regards

Francis P.

Put each drop down list in an updatepanel with updatemode="conditional"

On the event handler for dropdown1 changed, do what you must on dropdown2andforce an updatepanel2.update()


Hi,

Ive tried that but still no changes..!!!

I ll explain you the whole code..

The Main Page is within an update panel which also contains the Target to the ModalPopUp now in the Modal popup i ve put the Drop down list into an Update panel and on selected index change of that Dropdown list i get all the values needed to bind and bind that to the second drop down list..And do the

UpdatePanel3.Update() ("UpdatePane3.update()is the Update Panel which contains the second drop down list") but still nothing happens..

Thanks n Regards

Francis P.


- Have u set the dropdownlist as a trigger for updatepanel?

- Tried setting some breakpoints to see what gets "hit"?

Monday, March 26, 2012

AJAX Toolkit Modal Popup Extender - Display Issue

I have a site that is using a master page. Within the master page is a div that has a style sheet entry setting the position to absolute. The content div is within this div. My problem is that when the modal popup is displayed and the user has the screen resolution is set to 800X600 the bottom of the modal popup is off of the screen and as the user scrolls down the page the modal dialog moves along with the scrolling keeping the bottom of the dialog off of the page. I tried setting the X/Y parameters for this but as the user scrolls the dialog box still moves, keeping part of it off of the viewable area of the screen. I remove the position absolute setting in the style sheet for the parent div and this issue does not occur, but, my screen is not displayed correctly. This is using IE6. Any ideas?

Thank You for any help.

Actually I was incorrect. It was not the position=absolute causing the error. It was the top=167px that is causing the error. Top is not applied if the position is not specified. That is the root cause of the issue. Please reply if you have a solution.

Saturday, March 24, 2012

Ajax Timer Tick updating GridView in an unwanted way

I display an empty data set in my gridview by manipulating the gridview to show the headers and a row displaying only No Records Found. Here is the code for that:

if (EQTable.DefaultView.Count == 0)//if filtered data is empty, make sure to show header { EQTable.Rows.Clear(); EQTable.Rows.Add(EQTable.NewRow()); TimeStampGridView.DataSource = EQTable; TimeStampGridView.DataBind();int colNum = TimeStampGridView.Columns.Count; TimeStampGridView.Rows[0].Cells.Clear(); TimeStampGridView.Rows[0].Cells.Add(new TableCell()); TimeStampGridView.Rows[0].Cells[0].ColumnSpan = colNum; TimeStampGridView.Rows[0].Cells[0].Text ="No Records Found."; }

When the timer Tick event goes off is should only check if new data is present by checking the last write time to an xml file. If no new data is present is just returns, On the return, it updates the gridview to show all the cells of the empty row and erases the No Records Found text. Here is the code:

protected void UpdateTimer_Tick(object sender, EventArgs e) {string oldTime = Lb_LastRun.Text;string newTime = GetLastRunTime();if (oldTime != newTime)//doesn't go in for an empty row, but messes up cells of gridview { Lb_LastRun.Text = newTime; EnableExtractorCols(); LoadGrid(); DisableExtractorCols(); } }

Anyone know what I'm doing wrong here? Thanks for the help!!!

I got around this problem by changing the timer tick code:

protected void UpdateTimer_Tick(object sender, EventArgs e)
{
string oldTime = Lb_LastRun.Text;
string newTime = GetLastRunTime();
if (oldTime != newTime)
{
Lb_LastRun.Text = newTime;
EnableExtractorCols();
LoadGrid();
DisableExtractorCols();
}
if (TimeStampGridView.Rows.Count > 0)
{
Label EQLabel = (Label)TimeStampGridView.Rows[0].FindControl("Label1");
if (EQLabel.Text == "")//check for empty row, this is important for displaying headers only on a status filter
{
int colNum = TimeStampGridView.Columns.Count;
TimeStampGridView.Rows[0].Cells.Clear();
TimeStampGridView.Rows[0].Cells.Add(new TableCell());
TimeStampGridView.Rows[0].Cells[0].ColumnSpan = colNum;
TimeStampGridView.Rows[0].Cells[0].Text = "No Equipment Found.";
}
}
}

is there another way to stop this updating?

Ajax Timer Control Refresh Problem Only In Production

Hi All,

I had a page, which display long content, i had a scroll bar for the page. I had a updatepanel in the page, with ajax timer control, this timer will raise event timer_tick for every 3000 milli seconds, then i will query the database and get some data and display in the updatepanel, now this updatepanel is location at the bottom, when i am moving cursor to the top of the page, my cursor position is coming down to the updatepanel even though when i am moving the mouse to the top of the page, through scroll bar of the page, it is not going to the top, don't why it is happening only in production environment, can anyone kindly please help on this issue.

Thanks & Regards,

Karthikeyan.

Hi Karthikeyan,

Do you set like this:

<%@. Page Language="C#"MaintainScrollPositionOnPostback="true" %>

Hope this help.

Regards,

AJAX Timer control

Hi

I have a problem trying to display the timer control in ajax.

I have installled the controls and the collapsible panel works ok but not the timer control.

below is the code

<asp:ScriptManagerID="ScriptManager1"runat="server"></asp:ScriptManager>

<asp:UpdatePanelID="UpdatePanel1"runat="server">

<ContentTemplate>

<asp:LabelID="Label1"runat="server"Text="Label"></asp:Label>

<asp:TimerID="Timer1"runat="server"Interval="3000">

</asp:Timer>

</ContentTemplate>

</asp:UpdatePanel>

any help wud be great

cheers

The timer does not display anything on the HTML is just a way to call the server side every X amount of time. In Design mode, look at the properties, you'll find an event, double click and will create a method on your code behind. Now you can add any code that will be executed every x amount of time, in your case every 3 seconds.

Ajax Tabs UI and Data Controls

Hi all

Not too sure if this is covered else where? Does the Ajax Tab control have a display on demand method?

I want to display customer details on an Ajax Tab UI, I could do this with a custom tab but would like to use the MS Ajax framework where possible.

The tabs need to include the following:

tab 1: Customer Summary/Details

tab 2: Customer Contacts

tab 3: Customer Orders/History

and so forth...

My issue is, I don't quite know how to do this as each tab accesses a different DataSource/Stored Procedure to bring back the results. I obviously want to write this in a "best practices" way and therefore avoid long loading times etc... Any help would be greatly be appreciated.

Thanks in advance.

Check this out:http://blogs.msdn.com/sburke/archive/2007/06/13/how-to-make-tab-control-panels-load-on-demand.aspx

-Damien


Thanks Damian, I'll give it a go.

ajax tabs display in firefox

hi there; using asp.net 2.0 (vb), can someone please copy and paste this basic ajax tab page into their site and explain why, in firefox, the content is not being contained within the tab content container. look at the same page in internet explorer and it works fine.

is it a css issue? i can't image why it would be. just a simple 2 column div.

thanks all.

<%@dotnet.itags.org. Page Language="VB" %
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<script runat="server"
</script
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Tabs</title>


</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager id="ScriptManager1" EnablePartialRendering=true runat="server"/>

<div>
<div id="Tabs" style="width:100%; clear:both;">
<ajaxToolkit:TabContainer ID="TabContainer3" runat="server">
<ajaxToolkit:TabPanel ID="TabPanel3" runat="server">
<HeaderTemplate>
Tab 1
</HeaderTemplate>
<ContentTemplate>
<div style="text-align:left; clear:both; width:100%;">
<div style="width:545px; float:left; margin:0px; padding:0px;">
Left Side 1<br />
Left Side 1<br />
Left Side 1<br />
</div>

<div style="width:375px; float:left; margin:0px; padding:0px;">
Right Side 1<br />
Right Side 1<br />
Right Side 1<br />
</div>

</div>
</ContentTemplate>
</ajaxToolkit:TabPanel>


</ajaxToolkit:TabContainer>



</div>
</div>
</form>
</body>
</html>

found the issue ... needed a third div ... clear

<%@.PageLanguage="VB" %>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<scriptrunat="server">

</script>

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headid="Head1"runat="server">

<title>Tabs</title>

</head>

<body>

<formid="form1"runat="server">

<asp:ScriptManagerid="ScriptManager1"EnablePartialRendering=truerunat="server"/>

<div>

<divid="Tabs"style="width:100%; clear:both;">

<ajaxToolkit:TabContainerID="TabContainer3"runat="server">

<ajaxToolkit:TabPanelID="TabPanel3"runat="server">

<HeaderTemplate>

Tab 1

</HeaderTemplate>

<ContentTemplate>

<divstyle="text-align:left; clear:both; width:100%;">

<divstyle="width:545px; float:left; margin:0px; padding:0px;">

Left Side 1<br/>

Left Side 1<br/>

Left Side 1<br/>

</div>

<divstyle="width:375px; float:left; margin:0px; padding:0px;">

Right Side 1<br/>

Right Side 1<br/>

Right Side 1<br/>

</div>

<divstyle="clear:both;"></div>

</div>

</ContentTemplate>

</ajaxToolkit:TabPanel>

</ajaxToolkit:TabContainer>

</div>

</div>

</form>

</body>

</html>

Wednesday, March 21, 2012

AJAX TabPanel ScrollBars

Hello,

I use AJAX Tabs to display text and image content in 4 tabs (fixed height, no scrolling). I'd like to add 5th tab to display a text which is pretty long so it's supposed to be scrollable. Whatever I do, I'm not able to make scrollbars apper in the tab. The text just flows down the page with no limits. I've tried to set fixed height for both TabContainer and TabPanel together with ScrollBars attribute set to all possible values. It simply doesn't work for me. Where is the catch?

 <atk:TabPanel ID="tabComments" runat="server" HeaderText="Nové komentá?e" ScrollBars="Both" Height="100px">
<ContentTemplate>
<table>
<asp:Repeater ID="rptComments" runat="server" DataSourceID="sqlDS_DefaultComments">
<ItemTemplate>
<tr>
<td><%#Eval("ItemName")%></td>
<td><%#Eval("ItemOriginalName")%></td>
<td><%#Eval("RatingInserted")%></td>
</tr>
<tr>
<td colspan="3"><%#Eval("RatingText")%></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
</ContentTemplate>
</atk:TabPanel>

Thanks for any help,
Radoslav

Add a DIV to your TabPanel and set the CSS overflow (or overflow-x and/or overflow-y) to be auto along with a fixed height.

-Damien


It works! Thanks a lot.Smile
Radoslav

Ajax tab display issues in IE7 (fine in firefox)

This is how the tabs are looking in IE7 under default - no style changes. The middle tab is currently mouseovered. When a tab is mouseovered, the white bar goes away, and shows what you see below. Anyone have ideas on how to fix it?

ie tab problem

I'm with this problem tooSad

But, my problem is when the page is loaded!!!

And the Tabs of this skill...

P.S: My englosh ins't good!


I'm with this problem tooSad

But, my problem is when the page is loaded!!!

And the Tabs of this skill...

P.S: My englosh ins't good!

AJAX Slideshow using a dynamic Webservice to display images

Hi there,

I have just managed to get the example slideshow working within my own project. I would like to take it a step further by using a database and a folder within my site to display selected images.

Let me try explain.

For the ease of explaining things lets say a user adds their UserID into a textbox and pressing a button. I then have a select statement that gets all the image names for that user. The webmethod then uses those names from the SELECT statement to loop through the folder which contains the images and then displays the images within the slideshow.

The current web method looks like this

public static AjaxControlToolkit.Slide[] GetSlides() {return new AjaxControlToolkit.Slide[] {new AjaxControlToolkit.Slide("/images/Blue hills.jpg","Blue Hills","Go Blue"),new AjaxControlToolkit.Slide("/images/Sunset.jpg","Sunset","Setting sun"),new AjaxControlToolkit.Slide("/images/Winter.jpg","Winter","Wintery..."),new AjaxControlToolkit.Slide("/images/Water lilies.jpg","Water lillies","Lillies in the water"),new AjaxControlToolkit.Slide("/images/VerticalPicture.jpg","Sedona","Portrait style picture")}; }

As you can see everything is hard coded with the images and the comments and names.

Has anyone done something like this before?

Any advise or tips would be really helpful.

Thanks Shane

Check out forum posthttp://forums.asp.net/thread/1608950.aspx. It talks about passing in user context to retrieve images from the database.