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


Top 5 Contributors of the Month
SP
satyapriyanayak
Subhransu Sekhar Jena
abhays
DotnetUser
Post New Web Links

Databinding to table that has a custom format

Posted By:      Posted Date: September 12, 2010    Points: 0   Category :ASP.Net
 
My problem is that I have a different format table for each section in my form. And I would like to bind data to these tables. A repeater I don't think is going to work. It would be great if I can do it like this:<table id="exampleOfWhatIWant" runat="server"> <tr> <td><%# Eval("data") %></td> <td><%# Eval("data") + 1 %></td> </tr> <tr> <td><%# Eval("data") + 2 %></td> </tr> <tr> <td><%# Eval("data") + 3 %></td> <td><%# Eval("data") + 4 %></td> <td><%# Eval("data") + 5 %></td> </tr> </table> Where the "+ 1" is the next record from that datasource --which is bound in code behind. Is there anyway, I can accomplish this without resorting to dynamically created tables (ugh).


View Complete Post


More Related Resource Links

DataGrid: Tailor Your DataGrid Apps Using Table Style and Custom Column Style Objects

  

One of the most enduring challenges in writing user interfaces is figuring out how to display large amounts of data efficiently and intuitively without bewildering the user. The problem becomes particularly thorny when the interface must reflect hierarchical relationships within the data that the user needs to modify. The Windows Forms DataGrid control gives developers a powerful and flexible tool to meet this challenge. This article explains its basic operations and shows how to extend the DataGrid to display columns of data in an application-appropriate manner.

Kristy Saunders

MSDN Magazine August 2003


Table format of RadioButtonList

  

Hi All,

I have radiobuttonlist with 3 listItem, i need to give the table format to radiobuttonlist means it looks like table with row, how can i give, Any idea?

My code:-

<asp:RadioButtonList ID="RbAccount" runat="server" cssClass="Request">
<asp:ListItem Value="update" Selected="True">Change existing account </asp:ListItem>
<asp:ListItem Value="deprovision">Remove an account </asp:ListItem>
<asp:ListItem Value="new" Enabled="false">Create a new account </asp:ListItem>
</asp:RadioButtonList>

If i am using this css style, it is giving me border all all the tables i have on page, i just want only this radiobuttonlist, Any idea ?

<style type="text/css">
    Request
    {
    border-collapse:collapse;
    border:1px solid black;
    }
  
</style>


Adding table to a page, but the format lost when I use clear border

  

Hi,

I added a table to a page, by default, the table layout is the light border. So, I add my content and the vertical align seems to set to the top. But when I changed it to clear border, the content of the table will set vertical align to center. Is there a way to change this back to top align but with the clear border. I don't think I can do this by what is available in the ribbon. Please advice.


Implementing a custom Membership Provider vs. using aspnet_Profile table - Which should I do?

  

I wanted to expand the amount of information that is associated with each user(MembershipUser) in the ASPNETDB.MDF database file. Adding columns like FirstName, LastName, etc. So I began implementing my own custom Membership Provider. I created a derived MembershipUser class with the extra private variables that I wanted each MembershipUser record to store. Its basically done. Almost after I did this I stumbled across the columns in the ASPNETDB.MDF->aspnet_Profile table called "PropertyNames" and "PropertyValuesString".  Could I have simply used these two columns to accomplish what I was attempting to do or are these columns for global application configuration settings?  

Is the aspnet_Profile table purpose to store expanded/related information about users such as personal information? Or is it for something else? Thanks.


Showing available time slot in table format

  

I'm currently developing a system for booking of discussion room in a college. This system will allow the staff to help the students to make booking in advanced as well as for instant walk in usage.

I've got a table to keep track of bookings, another for walk in and one for time slot.

For the time slot table, it includes start time slot and end time slot, which is 30 minutes interval for each.

What i'm currently facing is that the system could not display the correct available time slot. I think it's the formula problem which I still can't get it solved.

Example:

If the booking time is 8.30am - 9.00am, I have no problem showing the 1st slot as N/A.

But if the time is 8.45am - 9.15am, the system only update the 1st slot as N/A while the 2nd slot still remain as AVAILABLE which is wrong. Because since the time ends at 9.15, I would like the slot 9.00am - 9.30am to be N/A as well.

This would be my code:

for (int x = 0; x < countTimeSlot; x++)
{
     if (int.Parse(arrEndTimeSlot[x].ToString()) > intBookedStartTime && int.Parse(

Custom component Table name dynamic table name

  
Hi All How to i call the table dynamiclly in to C# class library. I can able to call the columns names.. but i unable to call the table name.. please suggest it Example:   IDTSOutputColumn100 column = output.OutputColumnCollection[x]; columnInfos[x] = new ColumnInfo(); columnInfos[x].columnName = column.Name; columnInfos[x].Column_reference = column.CustomPropertyCollection[ "Column_reference"].Value.ToString(); columnInfos[x].bufferColumnIndex = BufferManager.FindColumnByLineageID(input.Buffer, column.LineageID); columnInfos[x].lineageID = column.LineageID;   geting the columns names .. how to i get table name...?? Regards Ram

using Custom Formatter when format is unknown at design time

  
I have class "CF" that implements IFormattable interface. I can convert it to string var cf = new CF(); string str = cf.ToString("MYFORMAT", CultureInfo.InvariantCulture) or str = String.Format("{0:MYFORMAT}", cf);   the problem is that "MYFORMAT" is a parameter. so i can still use string fmt = "FORMAT"; string str = cf.ToString(fmt, CultureInfo.InvariantCulture) Is it possible still use String.Format for formatting? That doesnt work str = String.Format("{0:{1}}", cf, format)      

Custom Control and DataBinding pb

  
Just Build a Simple Control with an embeded TextControl(RootTxt) and a Property Contents : Public Class Menu Inherits UserControl Public Sub New() InitializeComponent() VisualStateManager.GoToState(Me, "Normal", False) End Sub Public Shared ContentsProperty As DependencyProperty = DependencyProperty.Register("Contents", GetType(String), GetType(Menu),Nothing) Public Property Contents As String Get Return Me.RootTxt.Text End Get Set(ByVal StrContent As String) Me.RootTxt.Text = StrContent End Set End Property End Class When a Try to Bind Contents with a ressource Property it does not work : EX xmlns:local="clr-namespace:TMTemplate" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <UserControl.Resources> <local:ApplicationResources x:Key="LocStrings" /> </UserControl.Resources> ..... <local:Menu x:Name="menu1" Contents="{Binding Path=Strings.MainPage_SubTitle, Source={StaticResource LocStrings}}" FontFamily="Fonts/Fonts.zip#Genx Package" FontSize="17" Foreground="#FF0A0A0A" RenderTransformOrigin="0.5,0.5" Cursor="Hand">Any Idea bacause it's work q

How to submit data to a SQL Server database table from a custom page ?

  
Using SPD, I have created a custom page. It has a form with ASP.NET controls textbox, radio buttons, dropdown, submit button etc., Also, I created a Database connection (to the SQLServer database table) under Database Connections. But not sure how to connect this form to the database connection so that when form data is submitted, the data will be inserted into the table.

How to add a Repeating Table to Sharepoint Custom List (via Customize Form)

  

 

I have create a InfoPath Form Library, and I have a repeating table on the InfoPath form. Now I want to submit the same Templete to a SharePoint List(with the repeating table), is it possible?  

 

TKS!


Mapping custom values and columns to destination table **Newb question**

  

Hi,

I am copying data from one source to destination SQL CE table using the data flow task. I have two extra requirements which I am not sure how to achieve.

1.)  One source column needs to be mapped to two destination columns. In the column mapping dropdown the column name disappears after mapping it to one destination column.

2) some custom values for columns need to be added, which are not present in source. For e.g. a default value for some destination columns which is not present.

Any pointers would be extremely appreciated. Thanks,


Ganesh Ranganathan
[Please mark the post as answer if it answers your question]
blog.ganeshzone.net

InfoPath 2010: Create custom "Table Templates" and "Page Layout Templates"

  
Hey!

Is it possible to create your own table templates and/or page layout templates for InfoPath 2010?

Regards
Anders

SSRS 2008 how to define a custom legend and display colors of legend in table

  

How would i go about setting the background color in a table to a legend series color in a chart control?

Thanks!

Jay


creating custom table in share point database in sqlserver is fine ?

  

we are creating custom table in share point database in sqlserver.


is it fine to create custom table?

are we violating any rule  because of the creation of custom table ?

does share point recommended to create custom table  ?


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