Data Controls :: Gridview Row Span

Apr 27, 2016

I have gridview binding from data base which has column

type ingredients     no of ingredients

A        abc              2
B        cde              2
C        xyz               3
C       afg                3
C        zbc               3

I want to merge row of gridview based on no of ingredients result should be like ..

type ingredients     no of ingredients

A        abc             2
          cde              2

C        xyz               3
         afg               3
          zbc               3

I am using following on gridview row databound it works fine when no of ingredients has equal no else not giving expected result.. Here is aspx code

<asp:GridView ID="GridView2" runat="server" DataSourceID="SqlDataSource2" Width="100%" AutoGenerateColumns="False" OnRowDataBound="GridView2_RowDataBound">
<Columns>
<asp:BoundField DataField="TypeName" HeaderText="Type" SortExpression="TypeName" />
<asp:BoundField DataField="IngredientName" HeaderText="Ingredient" SortExpression="IngredientName" />

[code]...

View 1 Replies


Similar Messages:

Forms Data Controls :: Repeater Remove Span And Br Tags?

Aug 17, 2010

Split off from [URL] I can't just change for a repeater.

Is it possible to remove <br /> tags by setting RepeatDirection="Horizontal"?

View 1 Replies

Custom Server Controls :: How To Remove Span On Rendering

Mar 10, 2011

I am rendering custom control. After rendered the control it dynamically creates one span. how to remove that span. I explained it below

<span id ="CustomControl">

<div id ="CustomControl_CC" runat ="server">

rendering part

</div>

</span>

The bold part only i am rendering how it creating span

View 4 Replies

AJAX :: User Controls And Control Extenders / Rendering A SPAN As An Element To Surround The Control?

Aug 24, 2010

Two separate questions, but sufficiently intertwined that I'm going to try the two together....

Firstly - User Controls and Behaviours

I have a User Control which contains a few visual controls. I am attaching some behaviours by using GetScriptDescriptors and am passing some JavaScript to the browser using GetScriptReferences. That is all rock solid and working well. However, when developing, I did discover that I couldn't attach the ehaviours to the User Control itself - not surprising as rendering a User Control does not create a DOM element which represents the actual control. So, I have attached my behaviours to a "random" TextBox within the User Control.

So - first question, is there a better way to do that? For example, should I always be rendering a SPAN as an element to surround the control? Not sure what that would do to the robustness of the rendering. What is the right way to attach a behaviour to a User Control.

Secondly - Accessing those same Behaviours later

Assume I have placed a User Control on the page. That User Control exposes a Property (actually a Javascript Function of course) which does "something" to the control - for the sake of example we'll say that the function is set_Border(colour). I then have a behaviour on the same page (actually an Extender on a different control) which needs to call the function. I have a reference to the User Control in my script, so I have tried TheControlReference.set_Border('red') and find that my control doesn't support the set_Border method.

I guess this is probably because the behaviours are not attached to the User Control itself, but to a GUI element within it. Hence, I suspect that the answer to the second question lies within the answer to the first.

View 3 Replies

Custom Server Controls :: Can Create Server Control Without Span

Mar 6, 2010

when i create a server control by default

my controls place in a span this span give server control id

can i create a server control that when campile to html not have a span

View 4 Replies

How To Change Css On Span Tag In C#

Mar 31, 2011

I'm trying to change the css for the span tag below using C# but i am unable to. I have tried to give it a type of HTMLGenericControl but can not get the CssClass tag to popup.

<span id="collegeSpan" runat="server" class="college">other code here</span>

View 1 Replies

JQuery :: How To Add Row Span In Table

Jan 26, 2011

i want add row span=2 where td contain b0

[code]...

View 2 Replies

How To Label Or Span Tag With Spaces

May 20, 2010

I have a requirement to display text with spaces before like the one below.

<asp:Label Text=" LabelValue" runat="server" ID="lbl"></asp:Label>

But after the code gets rendered, the displayed text is like "LabelValue" and not as " LabelValue".

How to get " LabelValue" this text to be displayed.

View 2 Replies

Web Forms :: Row And Colum Span In .net?

Feb 28, 2011

I am creating dynamic HTML Table , feel every cell button ,Now i want to Merge or particular cell ?

View 3 Replies

Web Forms :: Get The Value Of The Span In Code Behind?

Jul 16, 2010

I can I get the value of the span in code behind? Does it matter if it is dynamically being written with javascript

<span
id="spanAvailability"
runat="server">The
Value</span>

View 2 Replies

Attaching Jquery Function To A Span?

Jun 20, 2010

I am trying to add some jquery to span with a class added to it. I am using asp.net and trying to use RegisterClientScriptBlock to attach the below code to my element. "cphMain_ed1" is hardcoded in this example however I would normally been passing a parameter here just for the ease of this.

[code]....

What am I doing wrong as the function is not been attached to the span with the class "closeButton"

View 1 Replies

How To Make Jquery To Select Span By Id

Dec 28, 2010

[code]...

how to iterate through spans that have this string on the id 'lblCSVFileName'
and get their values

for the first row i should get 19_71914066_2010-11-11_0849_ENG_SOFALI.csv and for the second
19_71914070_2010-11-11_0850_ENG_TRUDE.csv

View 2 Replies

C# - How To Remove Span Tag From WebControl When Rendered

Jan 31, 2010

When using an asp.net CheckBox (and in out case, inherited from a CheckBox) it renders a span around the checkbox input control, this span control is affecting jQuery scripts.

Is it possible to remove this span when rendering?

View 4 Replies

C# - How To Change Panel Rendered Tag From Div To Span

Feb 10, 2011

I have an <asp:Panel> inside an li, so the problem is the html will not validate. changing the rendered div to a span? I'm doing this in a ASP.NET 4.0 website using c# code.

View 4 Replies

Web Forms :: Undetected Span Tag Appeared?

Sep 3, 2010

Here's my aspx code.

[Code]....

And here's my CSS "crumbs" class.

[Code]....

And here's the HTML rendered code:

<div id="header"> <h1>Books Class Notes</h1> <div> <div id="cs_control_534"> <a href="http://www.mysite.com/advancement/">Advancement</a>»<a href="http://www.mysite.com/Books/">Books</a>» <span id="ctl00_pathBreadcrumb" style="font-size:11px;"><a href="#ctl00_pathBreadcrumb_SkipLink"><img alt="Skip Navigation Links" height="0" width="0" src="/Books/Classnotes/WebResource.axd?d=2m4Sj_eFxVcOVhHFRb8KwQ2&t=634171796173954658" style="border-width:0px;" /></a><span>Books Class Notes</span><a id="ctl00_pathBreadcrumb_SkipLink"></a></span> </div> </div></div>

And my question is, why does it create the following tag(s)?

[Code]....

Where is this tag comming from? It ruined my bread crumbs links.

View 5 Replies

SQL Reporting :: Span Second Row Across Multiple Columns

Apr 26, 2010

I am new to SSRS and needs some help with a report. The issue I have is that my user wants the report to look as follows:

Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 |

Comment Date: DateField Commentor Role: RoleField Name: NameField

Comment: Comment Field (Column 1, Row 2).

The problem I am running into is that the Comment Field in (Column 1, Row 2) can be quite large. I would like it to Span across all 6 columns. The Dataset can also have multiple datarows returned. Therefore, I could have multiple comments on multiple dates.

How do I get the Comment Field to span across all those rows?

View 2 Replies

Programmatically Wrap A Control In A Span?

Jan 29, 2010

I have programatically created a control. Now I want to wrap that in a <span></span> tag.

View 1 Replies

Web Forms :: How To Set Innerhtml From Code With Dynamic Id Of Span

Mar 4, 2010

I am going to set a couple of span controls to some text. The span controls have ids like,

<span ID="text1" runat="server" />
<span ID="text2" runat="server" />
<span ID="text3" runat="server" />

And now I want to set the innethml to every span control with a while end, like while dr.read I would like to set the ID to the span dynamic, like text & I.innerhtml = "something" I = I + 1 end while but how do a refer to a ID dynamic of a control in the code?

View 1 Replies

Web Forms :: Dynamic Addition Of Span / Div Elements

Feb 28, 2011

i have a problem with creating dovs based on the data in the xml file. What i need to do is to create a page where the xml file is loaded and if the give Node has childnodes it should be displayed as a link and after clicking a span or a div with childnode's value should appear under it and afte a second click it should "fold" back. I van use the __postback function from js but the problem is in the dymanic creation of the "child" divs. A portion of the xml file:

<Car name = "Ford">
<Type Name = "Escort">
<Description>Some description of the car</Description>
</Type>
<Type Name = "Puma">
</Type>
</Car>

Given the sample above the value "Escort" should be displayed on page as a link and after clicking a div containing value of the Description node should appear but value "Puma" should appear in normal text as it doesn't have children.

View 4 Replies

Which Is Better Span That Runat Server Or Default Lable

Dec 26, 2010

I have a simple asp.net web page that contain a table with about 5 TR and each row have 2 TD .. in the page load I get user data ( 5 property ) and view them in this page the following are first 2 rows :

[code]....

I always used <asp:Label to set value by code but i always notice that label converted in runtime to span so i decided to user span by making him runat=server to be accessed by code, so Which is better to use asp:label or span with runat=server?

View 2 Replies

C# - How To Span Tag Onclick To Call A Code Behind Method

Jan 9, 2010

How to make a span tag behave exactly like an asp:button (ie) using its onclick method to call a codebehind method..

<span onclick="MyPageMethod()"></span>

I know linkbuttons can do it for me,but my question is can span tag do it for me?

View 2 Replies

C# - How To Hide Span Tag Of A Master Page From CS File

Nov 17, 2010

I have a span tag on my master page which i want to hide after the user logs in. i want to do this after a button click event.

View 2 Replies

C# - Removing Both Table And Span Tags From Asp:DataList?

Dec 4, 2010

A DataListis rendered with <table> or <span> tags, which I don't want.I've set RepeatLayout="Flow" but that still gives me spans.I've set RepeaterDirection="Horizontal" but that still give me the tables.how can i get a simple datalist without all the spans tables?

<asp:DataList ID="MyDataList" runat="server" RepeatLayout="Flow" RepeatDirection="Horizontal">
<ItemTemplate>
....
</ItemTemplate>
</asp:Datalist>

View 2 Replies

C# - What Is The Life Span Of A Field In A Static Class

Feb 2, 2011

I have a simple web service, in it i have a static class which has a static collection to remember alive tokens.

I just want to make sure that the token collection lives until the next iisreset or the application pool recycles.

And what is the difference between remembering states in Application bag and static class?

View 1 Replies

InnerHTML Attribute Empty On Span Tag During Page Submit?

Jan 12, 2010

I have a hidden TextBox control on my page that updates a span tag on the keyup event using jQuery. When the page is posted back to the server, the innerHTML attribute is empty.

How do I get the value that was set during the keyup event?

Client side code:

[code]....

Server side code

[code]....

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved