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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

can table size will remain same if any of columns are hidden

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :Sql Server

Hi all...

im haveing table where columns will hide according to condition but if any of the column is hidden table size must  be same as all columns in table .

i have employeedetails table :



ID Number






View Complete Post

More Related Resource Links

Entity Data Model and database view returning the same columns as there are in a table


When adding a stored procedure into the Entity Data Model I can select whether the procedure returns a scalar, a (new) complex type or one of the entity types I already defined. 

How do I do something similar for a view?

I mean assuming I have a view like this

CREATE VIEW FilteredFoos as SELECT Foo.* FROM Foo join ... WHERE ...

(that is a view that implements some involved filtering, but returns all columns from one table) how do I add it to the project so that I can use the entity set, but get the Foo objects, not some new FilteredFoo objects.

var foos = myDB.FilteredFoos.Include("Bar").ToList();

foreach (Foo foo in foos) { ...

Thanks, Jenda

How to create scrolling table for columns in a SharePoint Designer Data View


I have a fairly complex SharePoint Designer 2007 Data View they have added two more requirements.

1. Have the columns on the right side be able to scroll left to right as there is a large number of columns, while the first 3 columns on the left side stay locked in place.  This is only one list not two, and because of some other requirements I have it must remain to be just one list.

2. Then they also need to have scrolling up and down of the entire list with the headers locked in place.

The first requirement is more important than the second, but preferrably I need to do both.

I am new to XSL so not familar with the syntax. Is this something I can do on a custom Data View? Does anyone have any examples of how?

I have a drawing that show how it needs to look but I don't see an option here to upload a graphic.

So here is a link to my graphic example uploaded to my blog area: http://lindachapman.blogspot.com/  or just the image here: http://4.bp.blogspot.com/_aB01ue__NvQ/TGL42MOvrGI/AAAAAAAAAA4/c3xP4uCy4BU/s1600/Scrolling.png

I failed to mention that 3/4 of the columns are HTML Calculated fields wh

SMO classes to generate alter table script to add columns

How to generate ALTER TABLE script to add columns using SMO and c#.

Computed Columns in Table Variables or Table Types

I was just looking for confirmation that computed columns can or cannot be used in a @Table Variable or User-Defined Table Type. I'm trying this: declare @testtable as table(  [testcol] as case when [testcol] = '' then 'a' else 'b' end,  [testcol2] varchar(100) ); insert into @testtable select '','someval' insert into @testtable select 'c','someval2' select * from @testtable It all parses fine, but during the first insert an error is returned Msg 402, Level 16, State 1, Line 2 The data types void type and varchar are incompatible in the equal to operator. Thank you, Paul

Mark columns as Identity in multi-table views?

Hello! When you create a view of one table (i.e. SELECT * FROM Table), it marks the table's identity column as an identity col in the view as well. I have a few that selects columns from several nested tables, but they are all related in a main identity column I select as well, but SQL Server doesn't mark this column as identity, is there a way to do it?Shimmy

How to change the size (width) of scorecard columns in Dashboard Designer?

Is there any way to change the size (width) of scorecard columns in Dashboard Designer?

Want to show FormView in Edit mode with specific table columns depending on their Genre??

hi, I have  a table in my database called "Profiles". This holds data on Female and Male personal characteristics. On my aspx, I have a formview in edit mode which is binded to an object data source with a GetDataByUserId Select method which retrieves data from the "Profiles" Table via a DAL. The "Profiles" table has some columns which relates to females only and some just males and some are generic to both. See example below     UserId - / of Type GUID GenreId /  of Type BOOL. Hip Size (For females) Dress Size ( For Females) ChestSize (For Men ) TrouserSize (For Men) Weight ( For both )   When the User logs in , they go to an update Page which has the Formview in Edit Item Mode and contains drop down Lists which are binded to the Users Selected Value. The DDL are in turn bound to their related table such as HIP, Dress, Chest, Trouser etc. Objective If a female user logs in I just want to show them the (Hip Size) DDL  and DressSizeDDL in the Edit item template of the formview and not the ChestSize DDL or  TrouserSize DDL. At present the GetProfileByUserId returns all colums from the table My question is how do I do this and just show DDL which are relevant to the Female or Male Only. In some cases the user may not have selected an item in the previous form so they could also be

changing table columns collations

hi i have a database with "SQL_Latin1_General_CP1_CI_AS" collation i changed it to "Persian_100_BIN" but none of columns collations is not converted to "Persian_100_BIN" and remained in "SQL_Latin1_General_CP1_CI_AS" collation. how i can change all columns collations to "Persian_100_BIN"? tank u.

How to calculate a SQL Server performance of a query based upon table schema, table size, and availa

Hi What is the best way to calculate (without actual access to a SQL Server) the processing speed of a query (self-inner-join) based upon table schema, table size, and hardware (CPU, RAM, Drives)? ThanksThanks Jeff in Seattle

IDragSource bug over a hidden (display:none) table row with IE browser

I'm currently trying to create an Extender to move Gridview row order. Some of they are hidden by setting their property display to 'none'.Because the gridview act like a treeview with node that can be expanded or collapsed.From there all is well working, except with Internet explorer !Here is the problem :    When hiding a row, the drag operation works properly until the mouse reach a row having one or more preceding row hiddens.I create a some code to reproduce the bug.    1 - Open the sample in Internet Explorer and try dragging rows. You will then notice that all is well working.    2 - Now, click on the button "Toggle rows display" and retry dragging row 1 over the row 10. You will notice that when the mouse reach the row 5,          the drag operation stuck on the header of the table.    Now open the sample in FireFox, Google Chrome, Safari and repeat the same operation. You will notice that all is well working.ASPX Page :<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test3.aspx.cs" Inherits="Test3" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml&

Bar-graph style - how to keep columns in relative height of size of "graph"

Hi, I need some input for this and imagined that someone else had seen something like it: I have a box, let's say a grid, where there are some bars in it. These bars could be rectangles in a ItemsControl. The grid has a fixed height and width - but the rectangles' height (and width) are set a from a collection of numbers. These numbers go from 0 to 200 - but in periods the numbers only go from 1 to 10. If I use absolute numbers, the rectangles will be tiny in height or width if the numbers are between 1 and 10 and the Grid is 200 in height and width. How do I make the size of these rectangles relative to the tallest one? I guess I could do some calculations 'behind the scenes' in code, but is that really necessary? Is there no other way? Thanks! --Anders

Dynamically sizing columns while keeping two the same size

I am setting up an interface that has a grid with 5 columns.  Three of those columns have a fixed width.  The other two columns I would like to dynamically size according to how big the grid is (i.e. a * size) and I would like them always equal to each other.  The two pieces of code I have tried follow.  Option A keeps the columns the same size but makes everything as wide as it wants w/ no respect for the size of the grid and Option B allows the two columns to size independently. Option A <Grid Grid.IsSharedSizeScope="True" > <Grid.ColumnDefinitions> <ColumnDefinition Width="14" /> <ColumnDefinition SharedSizeGroup="FirstColumn" Width="200*"/> <ColumnDefinition Width="105"/> <ColumnDefinition SharedSizeGroup="FirstColumn" Width="200*"/> <ColumnDefinition Width="14" /> </Grid.ColumnDefinitions> </Grid> Option B <Grid > <Grid.ColumnDefinitions> <ColumnDefinition Width="14" /> <ColumnDefinition Width="200*"/> <ColumnDefinition Width="105"/> <ColumnDefinition Width="200*"/> <ColumnDefinition Width="14" /> </Grid.ColumnDefinitions> </Grid>

how to fix the height of the table to be same as the screen size?

hi,iam trying to have my web page design inside a table that fills the screen in width and height.i tried like this<table  border="0" cellspacing="0" cellpadding="0"                         style="width:100%; height:100%; margin-right: 0px; margin-left:0;margin-top:0; margin-bottom: 0px;">            <tr> etc...the table width is filling 100 % but the height is not expanding to the bottom of the screen.my aim is to have a column in the table that looks like a left pane and it will contains dynamically added controls so if there is controls or no the column will have the height of the screenthanks for the help

How to know the number of columns displayed on the last page for Multi column table

Hi, How will I determine how many columns to be displayed on the last page of the report if I am using a Multiple column table.  I am going to use the number of columns to multiply with the width of the body of the report. I am going to use a Function to get the product. 

To Search a word in all the columns of a Single Table

Dear Friends, How can I search a word in all the columns of a table?Please advise.

Move columns in table using BIDS?



Call me crazy, but I can't figure out how to do something as simple as change the order of the columns in a report without cutting and pasting. Is there someway to reorder columns easily? Say like drag and drop like every other grid on the face of the planet supports?


Arrange columns from nested table in a dataset that writes into XML file



I have 3 related data tables. I added these tables into a dataset and finally write it to a XML file. But the related columns from table 2 and 3 is appended after all the columns from table 1. How can I have something like:
in a dataset that I write to XML instead of

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