.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

Question on resizing a control

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :ASP.Net
 

I have an aspx web form with a ComponentOne ReportViewer control on the page.  It is set using the following markup:


<div>
        <cc1:C1ReportViewer  CssClass = "report" ID="C1ReportViewer" runat="server" 
            FileName="~/Reports/Reports.xml" ReportName="Sample" ToolsPaneVisible="False" 
            UseEmbeddedVisualStyles="True" VisualStyle="Office2007Blue" Width="100%">
        </cc1:C1ReportViewer>
</div>


The problem I am having is that the control defaults to a height 600px and I want it to fill the available space.  As you can see, I can set the width to 100%, but if I try to set the height to 100%, 
the control throws an error.

                                     
                                            
                                        

View Complete Post


More Related Resource Links

How to position one control relative to another one even after resizing windows?

  

I used following Jquery code trying to make image close to a table. It worked fine after first load, but the position changed after window is resized. Any ideas? thanks

$(document).ready(function() {
            var pos = $("#mytable").offset();
            var width = $("#mytable").width();
            var left = pos.left + width + 20;
            var top = pos.top + 200;
            $("#ctl00_ContentPlaceHolder1_imgPreview").css({
                position: 'absolute',
                zIndex: 5000,
                left: left,
                top: top
            });
        });


output cache to be used only when parameter has changed + old question of user control not answered

  

hello,

i have 2 questions about output cache:

1.is it just me , or does it seems that it is used only after the second time that the user reaches the webpage? if so, why, and how can i tweak it to my needs? my guess is that it wouldn't be logical to cache every time a user reach a webpage, but only when it happens enough times.

2.i know that i can use "varybyparam" for using the output cache when the parameter doesn't change , but it seems that it would use the output cache even if there is no parameter , or if the specified paramter is not there. is there a way to overcome this?

3.an old question that somehow marked as "answered" , yet i didn't solve : suppose i created a user control and i gave it values through the CTOR via the aspx file . is it possible to show the values from within the split/design mode? remember that i've talking about ASP.NET and not simply C# winforms . i write this because this question was on :

http://forums.asp.net/t/1588671.aspx

and the answer that i got was for C# and winforms . i've tried to do the same for ASP.NET , but i've failed.

can anyone please help me?


Login Control Question

  
I want to put a Login Control and a Create User Control on the same page.. just wondering, before I start am I going to run into any problems by doing this? 

Get control over the other open windows to avoid resizing them

  
Hi, I am developing C# WinForms application. I need to have control over the other open windows to avoid resizing them. If a user try to resize the open document say myDocument.doc, i.e., word file, then i should avoid resizing that window and set back to its previous size. I can get the Windows handle and Process ID and the File path of that document as well. Will any of these help me to solve my problem? Thanks for the help in advance. ViVidyadhar - V the destiny

calendar control question

  

Hello,

I'm using a standard .net calendar control on as asp.net webform. I'm using the DayRender event to get data from a database... currently, if one or more data matches are found for the day, I set the backcolor of the table cell, and set it's tooltip with relevant data from the data record. Now I need to handle the selectionChanged event and I need access to the data that was used in the DayRender event... I realize I can use the calendar's selectedDate property and re-query the database to get the data again, but I wanted to check to see if there are alternatives, and save the extra trip to the database. Is there something I can do in the DayRender event that will persist this data so that it gets passed to, or is available from the SelectionChanged event?


Question about Workflow in Document Library with version control and check-in/out enabled

  

Hi,

I use Sharepoint Foundation 2010 and have a workflow to set some metadata in a document with version control and check-in/check-out enabled (approval content is not enabled because anyone in the team can be a possible editor of the document).

My metadata is:

- a generated doc id with text+id (example P&D_1)

- a calculated status based in version: minor version = "on development" and major-version="published/approved"

I defined two workflows:

1) is called when item is created to define id and status.

2) is called when item is updated and status is re-calculated if version is major. (It is called in every item change, not only when user wants to publish a major version, because this option doesn't appear in SPD)

I noticed that sharepoint workflow must do a check-out to be able to update metadata, and because of this the version number is incremented. When version is minor, I don't care, but when version is major I have a problem, because just after publishing the version 1.0, the workflow changes metadata and the version to 1.1. and 1.1 means that the document is not approved anymore...

Questions:

a) Isn't it possible to do the workflow to check-in and override the last/current version to not generate a new version??

b) Or is it possible to stop versi

Regarding Telerik RadGrid Control Resizing OnColumnResizing event

  

If I have telrik control of radGrid in user control1 ....

That user control1 I have specified in another user control2 through Register tagprefix.

Now in UserControl1 ,I have just mentioned the Definition of rad grid and not specified columns.

The columns I am generating in UserControl2 programatically.

The column I am generating is of type GridTemplateColumn ,

Now please tell how can the OnColumnResizing event of Radgrid.Clientsettings.Clientevents.OnColumnresizing event can be used in UserControl2?

 


Regarding Telerik RadGrid Control Resizing OnColumnResizing event

  

If I have telrik control of radGrid in user control1 ....

That user control1 I have specified in another user control2 through Register tagprefix.

Now in UserControl1 ,I have just mentioned the Definition of rad grid and not specified columns.

The columns I am generating in UserControl2 programatically.

The column I am generating is of type GridTemplateColumn ,

Now please tell how can the OnColumnResizing event of Radgrid.Clientsettings.Clientevents.OnColumnresizing event can be used in UserControl2?


Regarding Telerik RadGrid Control Resizing problem in MOSS2007

  

If I have telrik control of radGrid in user control1 ....

That user control1 I have specified in another user control2 through Register tagprefix.

Now in UserControl1 ,I have just mentioned the Definition of rad grid and not specified columns.

The columns I am generating in UserControl2 programatically.

The column I am generating is of type GridTemplateColumn ,Now plaease suggest that How can radgrid column can be resized by user at run time programatically?


Regarding Telerik RadGrid Control Resizing OnColumnResizing event

  

If I have telrik control of radGrid in user control1 ....

That user control1 I have specified in another user control2 through Register tagprefix.

Now in UserControl1 ,I have just mentioned the Definition of rad grid and not specified columns.

The columns I am generating in UserControl2 programatically.

The column I am generating is of type GridTemplateColumn ,

Now please tell how can the OnColumnResizing event of Radgrid.Clientsettings.Clientevents.OnColumnresizing event can be used in UserControl2?


Regarding Telerik RadGrid Control Resizing OnColumnResizing event

  

If I have telrik control of radGrid in user control1 ....

That user control1 I have specified in another user control2 through Register tagprefix.

Now in UserControl1 ,I have just mentioned the Definition of rad grid and not specified columns.

The columns I am generating in UserControl2 programatically.

The column I am generating is of type GridTemplateColumn ,

Now please tell how can the OnColumnResizing event of Radgrid.Clientsettings.Clientevents.OnColumnresizing event can be used in UserControl2?


AccessDataSource and Listview control question

  

Hi!

Let me try to explain what I want to do:

I want to display an post using a Listview control connected to a AccessDataSource, and I display one post at a time.

But each post has comments, so I want to display the comments of each post on the bottom of the page using other Listview control.

I'm not sure how to do this... do I need a new AccessDataSource control to get the comments, if that's so, how do I synchronize  the two AccessDataSource's so they use the same post ID ... or am I doing this wrong?


Any idea ? Undecided


Thanks


asp.net with third pary control question

  

i am using a third part calender control...in my asp.net application.

at the run time it is not fired... please help me and dont give the liks.... my code is

 

 

</tr>

<

 

ew

Custom Control looking strange when resizing

  
I've created a custom control that can show a separator line with optional caption text in a 3D-ish look (full code shown below.)
Design-time I add it to a Form and set the anchor of the custom control to both left and right, and everything works and looks fine.
However, at run-time it looks strange when the Form is resized, like it doesn't redraw all of the line correctly.
Does anybody know how to solve this?

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Test
{
  public partial class Separator : Control
  {
    private Pen _lightPen = new Pen(SystemColors.ControlLightLight);
    private Pen _darkPen = 

menu server control question

  

I got a menu server control where the "parent node display text" is A and the "child nodes" are B and C

when i put the mouse over the A, it will display the rest of the items (B and C) then if I select B, is it possible to change the top node to be B? (instead of originally A)


cheers


     claudi


Newbie custom web control question

  

I'm trying to create an .ascx control from scratch for the first time, and running into issues.  I get the following error when I run my code.  Many thanks for any guidance!

 

Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Content ('</MyCustomControls:TestUserControl>
   </p>
</asp:Content>') does not match any properties within a 'CustomUserControl.TestUserControl', make sure it is well-formed.

Source Error:

Line 7:  <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
Line 8:      <p>
Line 9:      <CustomControls:TestUserControl Name="MyControl" runat=server></MyCustomControls:TestUserControl>
Line 10:     </p>
Line 11: </asp:Content>

Source File: /default.aspx    Li

Another Menu Control Question

  

protected void Page_Load(object sender, EventArgs e)
{
	System.Diagnostics.Debug.WriteLine("Page_Load IsPostBack: " + Page.IsPostBack.ToString());
	if (Page.IsPostBack)
	{
		if(footermenu.SelectedValue != null) 
		{
			System.Diagnostics.Debug.WriteLine("link: " + footermenu.SelectedValue);
		}
	}
}

protected void Page_Init(object sender, EventArgs e)
{
	System.Diagnostics.Debug.WriteLine("Page_Init IsPostBack: " + Page.IsPostBack.ToString());
	if (!Page.IsPostBack)
	{
		Menus menu = new Menus();
		imgMainLogo.ImageUrl = VARIABLES.MainLogoImage;
		menu.PopulateMenuControl(ref mainmenu, 2);
		menu.PopulateMenuControl(ref footermenu, 9);
	}
}

public void PopulateMenuControl(ref Menu menucontrol, int menuparentid)
{
	//menucontrol.Items.Clear();

	foreach (MenuFields mf in GetMenusByParentID(menuparentid))
	{
		MenuItem menuitem = new MenuItem(mf.MenuName, ReplaceSystemNameLink(mf.Link));
		menucontrol.Items.Add(menuitem);
		
		foreach (MenuFields cmf in GetMenusByParentID(mf.MenuID))
		{
			MenuItem childmenuitem = new MenuItem(cmf.MenuName, ReplaceSystemNameLink(cmf.Link));
			menuitem.ChildItems.Add(childmenuitem);
		}
	}
}

That's a sample code I have right now .. The menu items are populated dynamically at runtime as you can see. One of the menu items there has a link that goes off site.. my b

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend