displaying difference of two columns in repeater control

how to display the difference of two coulmns having float values in a repeater control?

0
shahid123
3/16/2009 8:22:52 AM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

3 Replies
850 Views

Similar Articles

[PageSpeed] 57

Hi,

You can get the difference from sql query like : select (a-b) as result.

Then you can bing the same column field in Repeater control.


Always "Mark as Answer" the Post That Solves the problem.Because It helps others to find the solution.
Mohammad Hussain
http://mohdhussain.blogspot.com/
0
mohd786hussain
3/16/2009 8:49:02 AM

Hi,
There is many way to do this...

1) Using foreach {} loop you go through each and every column and in that loop write business logic such that when wanted two column value get sum. Value of the cell is retrived by using .value property of cell item.

2) Get the wanted Column of the repeter using .Colmuns method and perform the action and run the loop and display the diffrence in the destination column.

To get more clear picture Please refer below artical ot click on the link to downlaod the Example.

http://www.dotnetjunkies.com/zip/4365153F-D2F5-4C77-9FE7-94DD1AAF6F98.zip

A recent project had a user interface requirement where data could be displayed two ways: either in chronological order (easy!) or grouped by family member (less easy). Furthermore, if the user selected a family-member sort, the name of the person was to be shown on a line before the data — in a different style than the data itself — and subtotals of some of the columns were to be shown after the individual’s data.

Yikes! Not so easy — no supplied ASP.NET control delivers that type of functionality. While one solution would be to loop through the data and dynamically create a table, that’s hardly elegant or reusable and not much fun to boot.

A Google search for possible solutions turned up an excellent article by Rob van der Veer, A Grouping Repeater Control for ASP.NET. Rob’s article presented a control that grouped data based on a single column (with no subtotaling) — not quite what I was looking for but a great start. This article extends that idea (in VB .NET) to create the output shown above.

Why the Repeater?

The repeater is the natural choice to extend because:

  1. It’s a databound templated control, which is what we need.
  2. It exposes events that come in handy in creating our custom functionality.
  3. It's unburdened by a lot of unnecessary functionality other templated databound controls like the DataGrid and DataList have — we don’t need paging and our sorting options are constrained.

We can avoid the performance penalties of these rich controls by extending a control that provides only the base functionality and interface we require.

The repeater is a lightweight control that lends itself perfectly to the problem at hand, and has a lot of built-in functionality that we get by extending the control — we don’t have to re-create what is already working. That’s the beauty of extending an object!

The Demo Data

I have included an example XML file ("STRData.xml") that will serve as our data source for this article. We need to sort the data source in this example, so I read it into a DataSet and then return DataSet.Tables(0) to the control. A DataTable is used as the base data source because it can be sorted by one or more columns — a requirement for our control, as it needs a pre-sorted data source. Your data will likely come from a database query with an OrderBy command providing the pre-sorted (but not grouped) data for you. Your data can of course be in a DataReader, DataSet, or any other legitimate .NET data container object.

Feel free to queue up “Appetite For Destruction,” while working through this demo.

The Control in Action

This section describes how the control can be used on an ASP.NET page. We’ll look under the hood to see how it works in the next sections.

First, we declare the control at the top of our code-behind class:

Protected WithEvents strpt As Utils.Webcontrols.GroupingRepeater

In the Page_Load event, we call a private method (PopulateSubtotalRepeater) that configures and populates the control:

Private Sub PopulateSubtotalRepeater()
Dim dt As DataTable = Me.GetData ' retrieve the data source
Dim dv As DataView
If Not dt.Rows.Count = 0 Then
   dv = dt.DefaultView
   Dim blnIsGroupingDisabled As Boolean
   Dim strColToSort, strSecondarySort As String
   If Me.IsSortByPerson Then
      strColToSort = "TAG_NUMBER"
      strSecondarySort = ", SERVICE_DATE, CLAIM_ID"
      blnIsGroupingDisabled = False
   Else
      ' don't group or sort by person
      strColToSort = "SERVICE_DATE"
      strSecondarySort = ", INITIALS"
   blnIsGroupingDisabled = True
   End If
   dv.Sort = strColToSort & " ASC" & strSecondarySort

   With Me.strpt
      .DataSource = dv
      .ColumnToGroup = strColToSort
      .IsGroupingDisabled = blnIsGroupingDisabled
      ' specify columns
      .AddSubTotalColumn("CLAIMED_AMOUNT", GetType(Double))
      .AddSubTotalColumn("ELIGIBLE_AMOUNT", GetType(Double))
      .AddSubTotalColumn("DEDUCTIBLE_AMOUNT", GetType(Double))
      .AddSubTotalColumn("PAID_AMOUNT", GetType(Double))
      .DataBind()
   End With
Else ' empty datatable: don't bother with binding or calculations
      Me.strpt.DataSource = Nothing
End If
End Sub

This code looks a lot like what we would use to bind data to a regular Repeater. After sorting the source DataTable (via a DataView), we specify the DataView as the DataSource of the control and call the DataBind() method afterwards — nothing new there. In between, we configure a couple of custom members of our control.

We need to specify which column will be used to “group” our results, and do so by setting the public ColumnToGroup property. Only one such column can be specified — for our purposes, it’s the person’s initials.

Our control allows the grouping/subtotaling behavior to be “turned off” via a public property called IsGroupingDisabled.  We set this based on user input — whether we are sorting by date (disable grouping) or person (enable grouping). Our control also requires us to specify which columns we wish to display group subtotals and a grand total for. We use the public method AddSubTotalColumn to do so. This interface is analogous to how we would add a column to a DataTable (for good reason, as we’ll soon see). That’s it — two new properties to set and one method to call.

The user interface code is also quite similar to what we’d see in a Repeater, with an itemtemplate and alternatingitemtempalte specified (see the default.aspx page code). Three new templates are presented: grouptemplate, grouptemplateheader, and grouptemplatetotal.

These custom templates are responsible for displaying the subtotaled amounts, the group “name” row that precedes the grouped data (in our case, the person’s name), and the total of all subgroups displayed, respectively. Notice that the grouptemplate and grouptemplatetotal are calling on the same columns specified in our AddSubColumnTotal method calls in the code-behind page. All of the data items (i.e. column names) bound in the UI code come straight from the DataSource.

Building the Control

The implementation details of the control have been hidden from the caller, as they should be, subsumed into three new templates, two public properties and one public method call. Simple! The user manual for this control would be very short. So what’s going on under the hood?

This control relies on a private DataTable (_dtColumnTotals) to keep track of both the subtotals and totals of the columns specified by the consumer. Each call to AddSubTotalColumn adds a new column to this underlying DataTable.

When the DataBind method is called, the process of looping through the source data and binding to the control begins. This fires the ItemCreated event, whose handler (GroupingRepeater_ItemCreated) is specified in the control’s constructor via the AddHandler statement. This insures that each time a DataItem is bound to our control we can perform whatever logic and processing are required first.

Before any items are bound, we initialize the DataTable by adding two rows — one for subtotals, one for totals — and initializing all column values to zero. This is done by the InitialiseColumnTotals method. This method also sets a private boolean property, _dtInitialised, which informs us in the PreRender event whether in fact any data were bound to the control — that is, whether we have two rows of valid data to work with in the final rendering stage of the control’s life. This is really just a safety check to prevent the code from bombing if no data are bound to the control.

Next, after determining whether we are supposed to be grouping data based on a check of the Public boolean property IsGroupingDisabled, we check whether we are on the same group or whether a new group needs to be created via a call to the private ItemComparer property of our control.

The ItemComparer Class

This simple class, which implements the System.Collections.IComparer interface, is the key to deciding whether a new group needs to be created on each ItemCreated event (thanks to Rob van der Veer for this insight). The interface requires only one member to be implemented – Compare, a public function that returns an integer (0 for equality, -1 for inequality).

Our ItemComparer class implements this interface and exposes a single public property, ColumnToCompare, which is set when our control’s ColumnToGroup property is set (we also instantiate an instance of ItemComparer when this property is set — the constructor of the class requires ColumnToCompare be passed). Compare takes two objects as arguments — we pass the current DataRowView and the previous DataRowView (e.Item.DataItem, from the RepeaterItemEventArgs, e, passed to the ItemCreated event handler).

ItemComparer.Compare takes the previous e.Item.DataItem object and the current e.Item.DataItem object as arguments. We know which column from these DataRowView objects we are going to compare, because it was set in the constructor. Now all we need to do as grab the column values for each, and cast them to strings:

item1 = CType(v1.Row.Item(Me.ColumnToCompare), String)
item2 = CType(v2.Row.Item(Me.ColumnToCompare), String)

and call the CompareTo property of item1:

Return item1.CompareTo(item2)

So, returning to the control’s ItemCreated handler, if the call:

_comparer.Compare(lastvalue, e.Item.DataItem) <> 0

then we know that we need to start a new group. But first, what if we don’t need to start a new group, as will be the case on the first item bound and subsequent items where the value of the grouping column hasn’t changed?

Totaling The Columns

On each iteration of the ItemCreated event, we have to make sure we keep track of the totals (and possibly subtotals, if grouping is enabled) of the data source’s columns specified through calls to AddSubTotalColumn This is done via the private AddColumnTotals method, which loops through all of the columns in the DataTable, grabs their current item value, and increments each column’s total via a call to IncrementColumnTotal.

This method is responsible for incrementing the value of a single column, and depending on whether grouping is enabled increments the subtotal and total row appropriately. If grouping is enabled, we call this method twice for each column; if not, we only call it to track the total value. Thus, as we loop through our datasource, our underlying DataTable is keeping track of the column values for which we wish to display totals (and possibly subtotals).

Back to ItemCreated

Column totaling happens on every call to ItemCreated. But now we need to figure out what to do when our grouping value changes.

If our call to ItemComparer.Compare indicates that our grouping value has changed, we need to perform a series of tasks in response:

  1. Create a new Heading row (template) for the previous group.
  2. Create a new Subtotal row (template) for the previous group.
  3. Provide these new template items with data.
  4. Add the new items to the control and DataBind to them.
  5. Reset the subtotal values for the next group.
  6. Add the next group’s item totals for this round.

Here’s the code:

If (Me._globalCount > 1 And _comparer.Compare(lastvalue, e.Item.DataItem) <> 0) Then
   Dim item As New GroupSubTotal
   Dim itemHeading As New GroupHeader
   
   Me._groupTemplate.InstantiateIn(item)
   Me._groupTemplateHeader.InstantiateIn(itemHeading)
   
   ' the subtotals are bound to the FIRST row of the Private datatable that keeps continuous track of the running totals:
   item.DataItem = Me.dtColumnTotals.Rows(0)
   ' the header template is bound to the previous data item:
   itemHeading.DataItem = lastvalue
   ' check that we aren't trying to add the header to a bad index:
   Dim intCurrentIndex As Integer = Me.Controls.Count
   
   If Me._lastHeaderIndex <= intCurrentIndex Then
      Me.Controls.AddAt(Me._lastHeaderIndex, itemHeading)
   Else
      Me.Controls.AddAt(intCurrentIndex, itemHeading)
   End If
   
   ' add the subtotal template to the bottom of the control:
   Me.Controls.AddAt(intCurrentIndex + 1, item)
   ' bind to both templates:
   item.DataBind()
   itemHeading.DataBind()
   ' for the next / last rendered headers (PreRender event handler), we need to know where to put the last header control in the controls collection
   Me._lastHeaderIndex = intCurrentIndex + 2
   ' finally: reset the column totals and add the new first row:
   Me.ResetAllColumnSubTotals()
   Me.AddColumnTotals(CType(e.Item.DataItem, DataRowView), False)
Else
   ' grouping hasn't changed: add to subtotals
   Me.AddColumnTotals(CType(e.Item.DataItem, DataRowView), False)
   
End If

These steps are all accomplished in the code fragment. We create the two new templates, of types GroupSubTotal and GroupHeader, and associate these with our custom Public properties, GroupTemplate and GroupTemplateHeader.

Next we assign these templates data: in the case of the Header template, the data is the previous DataItem we processed (since the group has changed on this iteration). For the Subtotal template, it is the first row of our private DataTable, which has been tracking the subtotal values for us through all the previous iterations of the group’s items.

We need to tell the control where to render these new template items. For the subtotal item, that’s easy: it goes at the end of the Controls collection. For the header, things are a little more tricky: it has to preceed the items already bound to the control for this group (that is, all the individual data items). The private field _lastHeaderIndex helps us in this regard: the first time we add a header, we add it at the zero position. Then we set the _lastHeaderIndex value to (current number items + 2). The next time we add a header, it will be at this position, which is one below where the Subtotal template is created.

To finish off the group, we call the DataBind() methods for each of our template items, reset the subtotals row of the DataTable (the row at index 0, through a call to ResetAllColumnSubTotals) and add the current DataItem’s values to the DataTable.

The PreRender Event

The last concern we have is the control’s PreRender event. This method takes care of two important final chores:

  1. Render the last group’s header and subtotal templates, if grouping is enabled.
  2. Render the Total template.

This is the last event fired before the control is rendered, so it’s the appropriate place for these final steps. Step 1’s logic is essentially the same as the logic described for the ItemCreated event — we create, provide a data source for, and DataBind the last Header and Subtotal templates if grouping is enabled.

The last step is to create the GroupTotal template item, which holds the totals for all the DataItem's bound regardless of group (we assume that if a consumer is using this control, they at least want Totals for specified rows; otherwise why not just use a Repeater?). The process is much the same as creating a SubTotal template, except now we create a GroupTotal template instead and set it’s data source as the second row of the DataTable — where we’ve been storing the running total of all item values. We add this last control to the end of the Controls collection, call DataBind, and finally dispose of the DataTable as it is no longer needed and our object is about to expire. Mission accomplished!

Conclusion

I think this is a great example of the power and flexibility available to a developer through extending an existing control. With very little code, we have modified the Repeater control to group, subtotal, and total columns of our choosing — behavior not supported by the base control. Furthermore, we now have a control we can reuse to solve this problem next time it arises. Another tool in the developer toolkit! Again, thanks to Rob van der Veer for the initial inspiration for this solution. I hope it helps you meet a tough requirement as well.


Thanks & Regards
Jaiswar Vipin Kumar R.
Mumbai - India
Contact : +91 977 359 6947
+91 986 956 6849
0
jaiswarvipin
3/16/2009 8:50:42 AM
hi,


It would be much better if you can get the difference from the sqlQuery and the second option if like you can get the difference onRowCreated event and the bind the data to the repeater.
-Arvind.
Ramp Technology Group.
0
arvind
3/16/2009 9:02:30 AM
Reply:

Similar Artilces:

What is the real difference between Server Controls and .NET controls?
This was a class discussion question and I'd like to know, what exactly are the differences? Is there a clear answer? .NET framework controls are server controls. The only difference that I can think of is that the .NET controls are part of the FCL (Framework Class Library). HTH,RyanRyan OlshanASPInsider | Microsoft MVP, ASP.NEThttp://ryanolshan.comHow to ask a question...

Repeater control in another repeater control
Hi, I want Repeater control in another repeater control but it is not working Code : <asp:Repeater ID=CourseMaster Runat=server > <ItemTemplate> <table border=0 cellpadding=0 cellspacing=0 style="font-family:tahoma;font-size:12"> <tr> <td >&nbsp;<b</b></td> </tr> <tr> <td> <asp:repeater ID="CourseDetails" Runat=server> <ItemTemplate> <table > <tr> <td </td> <td ></td> </tr> </table> </ItemTemplate> </asp:repeater></td> </tr> </table> </ItemTemplate> </asp:Repeater> But one error occurs Name 'CourseDetails' is not declared. CourseDetails is the name of the second repeater Help Pls CourseDetails control belongs to the outer repeater control so it does not exist untill the outer repeater has some items created. You can access the inner repeater only going through the Item property of the outer repeater given it has some items created. Let me know if you need more info. Post your code in that case.B...

two column repeater control?
I want to display my data in a two column repeater control.  Art some point it may go to three columns.  My control looks like this:          <asp:Repeater ID="Repeater1" runat="server">            <HeaderTemplate>              <table class="p_innerTable">            </HeaderTemplate>     ...

display different controls on same page based on node selection from a treeview control?
My asp.net app has 2 div columns.   On the left div column I have a treeview control.  When I run the app I populate the treeview from an xml file and by default display a gridview with some data on the right div.  When I select a given node on the treeview I need to replace the gridview and display some textboxes and a dropdown box in the same location as the gridview.  Is it possible to display the text/drop down boxes on the same page as the gridview - thus replacing/hiding the gridview?  I am thinking using a panel control(s) - place the gridview on one...

Any difference between two control classes in net 2005
I have a problem with net 2005, i have two controls having the same namespace (namespace is: Controls), the first control class's name is 'Controls_ToolBar', and the second control class's name is 'Controls_ToolBarSeparator'. In the first class, i declare a variable which points to the second class, but it give error. Following is my code:First control class:Namespace Controls   Public Class Controls_ToolBar      Inherits Controls.ControlBase      Private lastLabel As Controls.Controls_ToolBarSeparator = Noth...

Data presentation control in another Data presentation control
 Hello,I want to make a menu with datalist or gridview control.Basically,the menu will be like this,Categories     Sub Categories.For example, for COMPUTING category there will be NOTEBOOKS DESKTOPS etc.There will be a image for CATEGORIES and linkbuttons with Subcategories.If I put a datalist inside a datalist and a link button inside the second datalist visually it satisfies my need.However,CommandArguments come from database to linkbutton.Andwhen one of these command buttons is cliked it must go to proper page.I dont know how to wrie an event_handler ,specifically, for...

refering to controls in a repeater control
Hey, (this is an example situation) I have a repeater control which displays a textbox. As the repeater control is 'run' when the page is loaded. I'd like to give a unique id to each textbox. ie: name1, name2, name3, name4 etc. And I'd also like to store the number of times the repeater control is 'iterated' through. I imagine the best way to store the number of times is to either return a values with my select query (Stored Procedure), or to increment a cached int each time I run through the repeater control. How would I assign a 'unique' id to each textbox? Thanks ...

Validation controls displayed over other controls
Does anyone know of away to display a validation control on top of a dropdownlist? Or any other ideas on how to display an error message on top of a dropdownlist. I'm a novice at this so please don't get too deep in programming. Hi, first of all, most people are used to see validation controls, being it either in a web application or a winforms application, right of the control that needs attention. Being said that you could use the z-index of CSS to display a <span> or <div> tag above your control and put the validation control inside that html tag that you display above y...

how to radiobuttonlist control in repeater control?
Hi there, I tried this code for nested repeater control.  The following code is working fine. Only the thing is  I want radio buttons instead of bullet points.Could any  one help me in  that?  In reapeater.aspx<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="repeater.aspx.cs" Inherits="repeater" Title="Untitled Page" %> <%@ Import Namespace="System.Data" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentP...

Repeater control in a composite control...
How do I put a repeater control in a composit control. Currently, I putting textbox, dropdowns, etc. There is a very small different between the dropdownlist and repeater if both of then are databound. Basically, all you need to cater for is databinding of the Repeater during the databinding of your composite control BugBug [MCSD]...

Get control in repeater control
Dear all, I want to use HtmlControls.HtmlTableCell in repeater control but i cant not access it,  in my table in Repeater Control,  i have 2 "td" which on page_load, i want to show only 1 of them depend on condition given. But i cant do it. This is my code : <asp:repeater id="repeaterViewNew" runat="server">                   <HeaderTemplate>                      <table width="100%" cellpadding="1" cellspacing="1">   &...

Responding to control in Repeater Control
I'm attempting to respond to events by a dropdownlost/checkbox/radiobutton and I am having trouble getting the code to do this to work. For the aspx file I have tried setting the function to call in the dropdownlist in the OnSelectedIndexChanged property yet. That causes the module to have an unhandled error when I attempt to view it. This also happens when I put it in the repeater controls OnItemCommand="SetNewUpline", the module becomes unloadable. My function looks like         private void SetNewUpline(object sender, RepeaterCommandEventArgs e) ...

select control in a repeater control
Hi I have a repeater control which data are selected that way:  Strsql = "SELECT T_PRODUIT.NO_PRODUIT, T_PRODUIT.UNITE, T_PRODUIT.NO_CATEGORIE, T_PRODUIT.NO_CSBE,T_PRODUIT.NOUVEAU,T_PRODUIT.ID_PRODUIT, " & _ "CASE WHEN IMAGE IS NULL THEN 'Aucun.gif' ELSE IMAGE END AS IMAGE1, T_PRODUIT.NOM, " & _ "T_PRODUIT.DESCR, T_PRODUIT.DETAIL,T_FOURNISSEUR_PRODUIT.NO_FOURNISSEUR_PRODUIT, T_FOURNISSEUR_PRODUIT.PRIX, T_FOURNISSEUR_PRODUIT.PRIX_LISTE, " & _ "T_FOURNISSEUR.NOM as FNOM, T_FOURNISSEUR.NO_F...

difference between these three control very deeply in step by step (Datagrid, Datalist, Repeater Controls) (Urgent)
Hi Guys,I know these all are container control and they are generally consiered with  database data But i want to gets very deeply setp by step difference between these three control i) DataGridii) DataListiii)Repeater ControlIn such way 1) Uses (with sutiable example)2) Performance ( which is better in which stuiation )3) Advantage (each of above control)4) Disadvantage (each of above control) here  you can get brif introduction of above objects.for detailed comparision you can refer Professional ADO.NET Programmins (Wrox Pub.). This article might helpBug [MCSD]...

How to Display Repeater control like table with rows and columns
I am getting display of repeater Items like NameAddress NameAddress NameAddress NameAddress...................Like this 50 in number So I want display to look like Name            Name      NameAddress      Address     Address Name            Name      NameAddress      Address     Address Name       &nb...

Can a Repeater Control display records in 2 Columns?
I am trying to make use of some empty space on my page that displays in a Repeater control a bunch of records that only have a small amount of data to display in 3 Columns. I am trying to figure out if I can split 2 records into 2 columns side by side then repeat the next 2 records below the first 2. So essentially I want the repeater to repeat twice horizontally, then step vertically down one line and repeat 2 more records horizontally. ie. Record 1 Record 2 Record 3 Record 4 Record 5 Record 6 and so on... Anything would be great and yes no maybe so, or a li...

Ajax calendar control not displaying last two columns
Hi,  I am using the ASP.Net Ajax calendar extender in my application. It works fine on many pages, first time I tried using it in user control and it is not displaying a couple of columns on right side. Thus weekends and Apr, Aug and Dec months are not displayed in the respective views.  Following are the images: 1.      Calendar on normal aspx page  2.      Calendar on user control (ascx) Looking at the images closely, there is more spacing in calendar on user control than the normal page. But I am using same css at both the places and problem still appears after removing all the styling. Following is the code for extender:<ajaxtoolkit:CalendarExtender ID="calendarExtenderDeliveryDate"  EnabledOnClient="true" Animated="false" runat="server" PopupButtonID="imageIconCalendar" TargetControlID="textBoxDeliveryDate" CssClass="AjaxCalendarStyle">                               </ajaxtoolkit:CalendarExtender> I am really not getting what could be the problem. Any directions will be helpful. Thanks in Advance,Anup  --Go for it now. The future is promised to no one.-- Most probably you have some overriding CSS that sets the padding/margins on table ro...

How do the different data presentation controls equate in ADO.net?
How does Visual Studio create ado.net equivalents of the datagrid's and gridview's columns and rows?  I am assuming they make a DataRow for each of the rows.  Am I on the right track with this?Is the table created by gridview basically a dataset from ADO.net?  Can anyone offer any guidance with this?Thanks to everyone that has ever helped me with any posts. Hi newbie2C#, The row in datagrid is called DataGridItem and in gridview is called GridViewRow. They are all inherits TableRow Class. DataRow is only one kind of row in GridView control. There are many other t...

i have 3 pages student information , i filled two pages ,then go to 3rd page . First Two pages iam having 100 controls.how to store that controls and how to send these controls into 3rd page in ?
i have 3 pages student information , i filled two pages ,then go to 3rd page . First Two pages iam having 100 controls.how to store that controls and how to send these controls into 3rd page in ?  There are a number of ways storing values. Check out: http://msdn2.microsoft.com/en-us/library/75x4ha6s.aspxhttp://www.csharphelp.com/archives/archive207.html Thanks,Karan~ Remember To Mark The Post(s) That Helped You As The ANSWER ~ Hi, Welcome to asp.net forums. Now as far as your requirements goes, the first thing that strikes me is that 100 controls are way too many to kee...

How do I control one control from another control?
I have a page page1.aspx which is within a master page. On page I have a table with two cells. Within each cell I have placed two controls (ascx) that I have developed. Now I'd like to be able to get these two controls to interact. One needs to update the other. One has some search criteria that the other one needs to update its gridview. One needs to make the other visible/not visible at certain times. Out of the box neither control can see each other at all. Is there a good article or someplace I can find some information on how to do this?  AllAboutFocus.com. Information Technolo...

Custom Control within a Control Control
I am developing a custom controls that will render headers for different web sites. Within these controls, I want to place another custom control that will change the language. I created the language control and had it implement IPostBackDataHandler. This control works fine if I drag it on a new web form, but if I tell a header custom control to render it problems occur. The Language Selector custom control does not have a Page member anymore and the event handlers do not work. Does anyone have any experience with doing something similiar? Anyone have any suggestions? Thanks, ...

Calendar Control inside Repeater, Handling Child control events in parent Data Control
Hi all,I've been researching a problem i have for a couple of days now and i'm still not sure how to even start to handle it.I'm essentially trying to build a page that will display custom form fields/controls for individual items/rows inside a repeater.I've got a fairly complex calendar i need to have working inside each individual row of the Repeater. The calendar is set up to fire the following events: OnDayRender="Calendar2_DayRender" OnSelectionChanged="Calendar2_SelectionChanged" OnVisibleMonthChanged="Calendar2_VisibleMonthChanged"My first question is how do i go about handling these calendar events in the code behind when the code behind complains that "Calendar2 does not exist in the current context"?How do i identify each unique instance of Calendar2 and handle each instances events uniquely?Any pointers to articles, pages etc is greatly appreciated. I've come across "event bubbling" but i'm not sure exactly how this works when attempting to handle a control like a calendar and not a button inside a Data Control.Thanks for any and all help! In each of those events there is a parameter to the event handler "object sender".  "sender" is the control that fired the event. You can use it by casting "sender" as your calendar object.  MyCalendarObject mycalendar = (MyCalendarObject)sender;This will give you a pointer to the control element inside the template.  What you cannot do is access a templated control directly because the IDE has no way of kn...

how do i link two different sitemap with the use of menu control in one .aspx file to two different hyperlink in the master page?
I have two menu control with similar file(eg.defect.aspx) in the master page, whenever i click the similar file(eg.defect.aspx) in either menu control, it will show both the menu control(eg.student menu and staff menu), but i only want to show only either one of the menu (eg,student menu only). Is there any solution to my problem? Am i able to use similar file(eg.defect.aspx) for two different sitemap and two menu control and only show one menu control. Hey, What should or should not be visible; the whole menu, or the selected field?  Are you h...

Re: How to control the columns displayed on a .net page depending on the page the user is coming from
  Hi all,    I have got two pages on wy website which contains a form to submit data into the same database. The two pages have also got a link to view the submitted data. The challenge I have got at the moment is, I want to be able to control columns the users see depending on the which of the two pages they are coming from. I know I can simply create two more separate pages but I don't want to do that. I feel I can be clever and achieve this with a conditional statement but to be honest, I don't know how to go about this. Could you please help me on thsi? Bas...

Web resources about - displaying difference of two columns in repeater control - asp.net.presentation-controls

List of mammals displaying homosexual behavior - Wikipedia, the free encyclopedia
For these mammals, there is documented evidence of homosexual behavior of one or more of the following kinds: sexual behavior , courtship , affection ...

Facebook Displaying Page Insights On Page Admins’ Personal Pages?
Some Facebook page administrators are seeing modules on their personal pages displaying page insights ad, campaign , and like totals for pages ...

Facebook Displaying Unread Messages from Pages in a New Updates Module
Facebook is displaying a new “Updates” sidebar module which shows some users unread messages sent to them by Pages. Users will see the Updates ...

Don Lemon Holds Up Sign Displaying the N-Word, Uncensored, on Air CNN Live - YouTube
Don Lemon Holds Up Sign Displaying the N-Word, Uncensored, on Air Lemon held up a Confederate flag first before holding up the sign. He asked, ...

Hazelwood coal mine fire: Morwell residents displaying symptoms similar to cigarette smokers, expert ...
An expert says some locals near Victoria's Hazelwood mine fire have symptoms similar to cigarette smokers.

Police accused of displaying fake G20 weapons
Toronto's top police officer misled the public by displaying fake weapons used in a medieval-themed role-playing game to help justify their actions ...

No charges for U.S. host for displaying high-capacity magazine on TV
NBC television journalist David Gregory won't face charges for displaying a high-capacity ammunition magazine on his "Meet the Press" news program ...

Jays' Escobar suspended three games for displaying slur
Toronto Blue Jays shortstop Yunel Escobar has been suspended three games for displaying a homophobic slur on his eye-black during a game on Saturday. ...

Google Play Store now displaying age-based ratings
We reported back in May that Google was adding age-based ratings to all apps in the Play Store as determined by the International Age Rating ...

Apple displaying Ferraris & other cars at WWDC hinting at CarPlay announcements
... 2014 Filed under: AAPL Company , iOS Continue reading more about AAPL Company and iOS at 9to5Mac . What do you think? Discuss "Apple displaying ...

Resources last updated: 2/25/2016 3:00:05 AM