Forms Data Controls :: Database Results Shown In Expandable Boxes Based On Group Name?

Oct 8, 2010

I haven't been using asp.net for that long and i am wondering if i can use a datalist, repeater, etc to pull data from a database, into one of these, but then group them by group with expandable boxes.

I have a SQL database set up, it will be used to list applications upon a webpage. e.g. office.

So colums are id, pro_name, pro_link, group_name, icon_name

I can extract the data but i am unsure on how to get it to display in the way that i want, as i wish it to show it so it is like below

[code]...

View 1 Replies


Similar Messages:

Web Forms :: Align The Boxes Shown In Role Privilege Together?

Mar 2, 2010

I need to align the boxes shown in Role Privilege together, but I seem to be unable to do so.

[Code]....

View 1 Replies

Data Controls :: Hide Shown Items In GridView Based On Stored Procedure?

Mar 11, 2013

I have 2 page admin.aspx page  and search.aspx

in admin .aspx page I have textbox=txtsearch and image button=imgs

in txtsearch we can type Mobile Or phoneNumber and when we click on Imgs we go to search.aspx page

below are code
 
protected void imgs_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("admin/search.aspx?Mobile=" + Server.UrlEncode(Txtsearch.Text));
}

in search.aspx page I have gridview that bind from database and show data according to Mobile or PhoneNumber that I typed in txtsearch in admin.aspx below are code

 <ContentTemplate>
<asp:GridView ID="GridView1" runat="server" CssClass="DGridViewSV"
AutoGenerateColumns = "false" Font-Names = "Tahoma"
Font-Size = "9pt"

[Code].....

Now I want when I enter Mobile in txtsearxh and click button when it go to search.aspx page it in grid view it show Mobile number in HLcalss from database and it doesn't show PhoneNumber and Code in Hyperlink1 and lblCode

and if I type phoneNumber in txtsearch in gridview it showes PhoneNumber and Code and it doesn't Show Mobile number

View 1 Replies

Forms Data Controls :: Bind Xml To Gridview With Expandable Ability?

May 10, 2010

how to display data in gridview with XML datasource and that too in expandable format.

Is nested gridview the only choice for this ?

View 3 Replies

Forms Data Controls :: Checkbox Selection Based On Group Column Values In Gridview?

Jul 28, 2010

I have to select checkboxes besed on group column values. If you see below gridview, column 3 (GroupN) has 1,1,1,1,2,2,2,2....etc (this column data is not static, will change based on page index. i.e PageIndex =2 may starts with 7,7,7,8,8,8,8,8,9,9,9 etc).

Now My question is.

1). If user selected '1', we have to store value and user must and should select another '1' (atleast two times).

2) If user selected '1', and user trying select '2'. Giving error says "Must have select one then one record in group to combine' (will not allow) and unselect '2'.

3) If user selected '1' atleast two times, and user trying select '2'. Will allow.

4) If user selected '1' atleast two times and selected '2' one time, trying to select '3'. will not allow user to select '3'.

View 3 Replies

Forms Data Controls :: Adding Controls To A Webpage Based On The Results Of A SQL Sproc

May 11, 2010

Depending on the data returned from a Stored Procedure, I need to add specific controls to a page and then when they are populated by the user, write them back to the database. What is the easiest way of doing this?

View 9 Replies

Forms Data Controls :: Gridview: Filter Display Results Based On What Roll A User Belongs

Oct 20, 2010

I have enabled User Rolls and assigned several Roll names such as 10, 11, 12, etc. I have a SQL Table that contains various fields of information including one named AuthorizedUserRoll, it's nchar(2).

A logged in user should only see the records in Gridview that matches his/her roll.

I'm using Web Forms and VB.

View 1 Replies

Forms Data Controls :: Access Database Data Into Text Boxes?

Jun 9, 2010

I have to create some code for my website which will bring data from a database into my specific boxes. I have a map on my site which on click of a hotspot, a page will pop up showing a smaller map and the data underneath it. The data will be in text boxes. How do I get the data from the database into these text boxes?

View 3 Replies

Data Controls :: Group RadioButtons Inside GridView Row Based On Data?

Nov 22, 2015

how to group radiobutton in gridview when its type is same

Means select only one record from gridview radiocheck according to type 

ex :either ID=1 or 2
3 or 4 etc
if (!this.IsPostBack)
{
DataTable dt = new DataTable();

[Code]....

View 1 Replies

Data Controls :: Group RadioButtons Inside All Templatefield Columns In GridView Row Based On Data?

Nov 22, 2015

[URL] 

Above Links Works For Only When Gridview Has All Boundfield Columns and Last Templatefield Column having Radiobutton.

 But not Works when All TemplateField Columns Having Textbox or Label in gridview like 

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" BorderColor="Black"
DataKeyNames="ID,Type" BorderStyle="Solid" BorderWidth="1px" CellPadding="4"
CssClass="Gridview" OnRowDataBound="GridView1_RowDataBound">
<Columns>

[code].....

View 1 Replies

Forms Data Controls :: Gridview - Save Selected Values And Checked Boxes In Database

Feb 2, 2010

I have a gridview and users would select some records and would click on the submit button and i will be saving those records into database using a stored proc.... now .... just below the gridview and above the submit button there are few checkboxes by default they wud be checked. How would i save the selected values and the checked boxes in database i wrote the stored proc for the gridview but how would i save the checked checkboxes into the same table.

For i As Integer = 0 To gvSelectScreen.Rows.Count - 1
Dim chkTemp As CheckBox = TryCast(gvSelectScreen.Rows(i).FindControl("cbStatus"), CheckBox)
If chkTemp.Checked Then
ContractNumber = gvSelectScreen.Rows(i).Cells(0).Text
ClientProgramNumber = gvSelectScreen.Rows(i).Cells(1).Text
ClientProgramName = gvSelectScreen.Rows(i).Cells(2).Text
StartDate = CType(gvSelectScreen.Rows(i).FindControl("txtStartDate"), TextBox).Text
EndDate = gvSelectScreen.Rows(i).Cells(5).Text
Dim connStr As String = ConfigurationManager.ConnectionStrings("MainConnectionString").ConnectionString
Dim myCon As New SqlConnection(connStr)
Dim cmd As New SqlCommand("usp_ParametersFromGrid")
Dim dt As New DataTable
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@ContractNumber", SqlDbType.VarChar, 22).Value = ContractNumber.ToString()
cmd.Parameters.Add("@ClientProgramNumber", SqlDbType.VarChar, 22).Value = ClientProgramNumber.ToString()
cmd.Parameters.Add("@ClientProgramName", SqlDbType.VarChar, 100).Value = ClientProgramName.ToString()
cmd.Parameters.Add("@StartDate", SqlDbType.VarChar, 20).Value = StartDate.ToString()
cmd.Parameters.Add("@EndDate", SqlDbType.VarChar, 20).Value = EndDate.ToString()
cmd.Parameters.Add("@RequestID", SqlDbType.VarChar, 50).Value = RequestID.ToString()
cmd.Connection = myCon
myCon.Open()
cmd.ExecuteNonQuery()
myCon.Close()
End If

Now above the submit button as i said, there are few checkboxes and they are checked by default...how would i save the selected item (in the gridview and the checked checkbox values in the same row in the database(sql server)

View 5 Replies

Group Of Radio Boxes In Panel

Sep 5, 2011

I have a group of radio boxes in an panel.

But when I click them all they all become checked.

<asp:Panel ID="Panel1" runat="server">
<asp:RadioButton ID="rdoscustom" runat="server" GroupName="sizes"
Text="Custom" />
<br />
<asp:RadioButton ID="rdos1" runat="server" Checked="True"
Text="7" x 5"" />
<br />
<asp:RadioButton ID="rdos2" runat="server" Text="10" x 8"" />
<br />
<asp:RadioButton ID="rdos3" runat="server" Text="15" x 10"" />
<br />
</asp:Panel>

View 1 Replies

Forms Data Controls :: How To Display Results From Database On A Gridview

Jan 17, 2011

I am using visual studio 2010, asp.net 4.0 (c#)

My problem is:

How do I display results from my database on a gridview based on the selected row of another gridview.

For example, I have a e-shop web app and I have a product categories table in my database displaying the data on a gridview.

I want to be able to click on the select button on each row and use that event to populate another gridview based on the ID of the product category that is clicked. E.g say the 'CDs' row is clicked, another gridview shows all the different CDs.

As a result, I need the select(sql) statement for the second table to be dynamic based on what the user clicks.

Has anyone done anything like this before?

View 2 Replies

Forms Data Controls :: Space In Text Boxes & Drop Down Lists / Text Boxes Gets A One Tab Spacing?

Jan 20, 2011

Using C# and SQL as the database.I have a page with a gridview and some text boxes and drop down list boxes. A user selects a record from the grid view I query the database and fill the text boxes and drop down list boxes.

Some fields get updated periodincally thus there is no data in those fields in the database until some time.

A strange thing happens.When filling data some text boxes gets a one tab spacing .

View 1 Replies

C# - Validation Spanning A Group Of Text Boxes?

Mar 15, 2011

I'm trying to achieve the following:

Where:

Surname is always required NI Number OR Reference Number is required Is this beyond the scope of the ASP.NET Validation Controls? The only solution I can think of is writing some bespoke javascript (for client side) and backing that up with some server side code.

View 2 Replies

Forms Data Controls :: Checkboxlist To Retrieve Data From Database To Display Results In Gridview?

Jun 23, 2010

I have a page where I will insert all the data into the database. The page where I'm having problems is when I select an item from the checkboxlist it only displays one item. The data which is displayed is only the one that was inserted with one selected item from the checkboxlist. The following code is the page I'm using to try to retrieve the data from the database. I am trying to do is when a user selects the first, second, or third, or fourth item. The corresponding data appears in the gridview. In my current code, the record which has one item selected appears. If the user has more than one selected it does not appear. It comes up as empty. Is there a way I can do it?

[Code]....

View 4 Replies

Forms Data Controls :: Group Data,- The Group's Header Be On The Top ?

Feb 5, 2010

I'd like to gruop data from a table, for example, by DATE or CATEGORY, something like this:
29/01/2010
News 1
News 2
News 3

30/01/2010
News 1
News 2
News 3

or group by CATEGORY, like this:

ASP.NET
News 1
News 2
News 3

PHP
News 1
News 2
News 3

View 4 Replies

Forms Data Controls :: User Group List Like Graph / Get The List Of Users Under A Group

Oct 26, 2010

I need to develop a page in my applicaiton like the image for the user lists.

I need to get the list of users under a group and need to show likw this.

View 4 Replies

SQL Server :: Group By Not Returning Expected Results?

Dec 17, 2010

I have a procedure that is used on a search page.. im trying to provide a highlevel resultset which you can then click on a record to view all records associated with it.

My expectation is to return 5 columns.. the ID and Date is what i want to group on.. so that if there are 10 records for ID=5 and Date=10/25/2010 then in my results i would have 1 record. Once im done with the page, you can then click on that line in the gridview to view the 10 records for that id. Does that make sense?

I have the following query, but for the criteria i entered, im getting back 3 records instead of just 2 since there is a differnet reboot count, BUT i really still just need overall data. so it should be only 1 record and seen below is what is returned and what is expected..

[Code]....

Here are the 3 records..

Currently returned

id Event Date Mount Errors Reboot Count J1939

225 11/01/2010 0 11 0

225 11/01/2010 0 11 0

225 11/01/2010 0 12 0

Expected returned

id Event Date Mount Errors Reboot Count J1939

225 11/01/2010 0 34 0

View 2 Replies

Security :: How To Protect Form Controls Based On Active Directory Group

Feb 12, 2011

I have a requirement to make parts of forms (and sometimes the entire form) read-only based on the user's active-directory group. I already have integrated AD into the dynamic menu, so that users cannot view certain menu itmes based on their AD group - and this is working fine; however, now they want to get down to the control-level on the forms. The first way that comes to mind is for me to just grab the AD groups for the users and then loop through them, and write my own code to make controls read-only or enabled. Is this a good way to do it, or is there another way? Also, while we're on the topic, is there an easy way to protect an entire form, or maybe an entire panel?

View 1 Replies

Data Controls :: Search Multiple Columns In Database And Display Results

Dec 8, 2012

I want to search record based on  Name, ID, Date, Report Type. from same table with one textbox. I can do search with one column how can do it with multiple column ...

protected void Button2_Click(object sender, EventArgs e)
{
DateTime dt = Convert.ToDateTime(TextBox1.Text);
SqlCommand cmd = new SqlCommand("SELECT * FROM Transactions where report_type = @report_type ");
cmd.Connection = con;

[Code] .....

View 1 Replies

Data Controls :: Search Database Using Partial Text And Display Results In GridView?

Mar 23, 2013

I need a query to fetch records from data from database based on partial text entered in textbox like search data from College table based on College Name entered in text box. I want that all record containing that College name displayed in grid view.

View 1 Replies

Forms Data Controls :: Updating Database Based On Checkboxes In Gridview

Mar 22, 2010

I am binding data in gridview .I have checkbox in gridview

<asp:GridView ID="gv_BankRecon" runat="server" BackColor="#DEBA84" BorderColor="#DEBA84" AutoGenerateColumns="false"
BorderStyle="None" BorderWidth="0px" CellPadding="3" CellSpacing="2" Width="100%"
onrowdatabound="BankRecon_RowDataBound" >
<EmptyDataTemplate>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="height: 20px; color: Red;" align="center">
<strong>No data found</strong>
</td>
</tr>
</table>
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ShowHeader="false" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"
HeaderStyle-Width="5%" ItemStyle-Width="5%" Visible="false">
<HeaderTemplate>
<asp:LinkButton ID="lnkbtn_AutoIdx" runat="server" Text="" CssClass="linkstyle1"
CommandArgument="AutoIdx" OnClick="sort" CommandName="Sort"></asp:LinkButton>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblAutoIdx" runat="server" Text='<%# bind("AutoIdx") %>' Visible="false"></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" Width="20%"></HeaderStyle>
<ItemStyle HorizontalAlign="Left" Width="20%"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField ShowHeader="false" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"
HeaderStyle-Width="20%" ItemStyle-Width="20%">
<HeaderTemplate>
<asp:LinkButton ID="lnkbtn_Payment" runat="server" Text="Payment" CssClass="linkstyle1"
CommandArgument="Credit" OnClick="sort" CommandName="Sort"></asp:LinkButton>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblPayment" runat="server" Text='<%# bind("Credit") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" Width="20%"></HeaderStyle>
<ItemStyle HorizontalAlign="Left" Width="20%"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField ShowHeader="false" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"
HeaderStyle-Width="20%" ItemStyle-Width="20%">
<HeaderTemplate>
<asp:LinkButton ID="lnkbtn_Clr" runat="server" Text="Clr" CssClass="linkstyle1"
CommandArgument="Reconciled" ></asp:LinkButton>
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="chkClr" runat="server" />
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" Width="20%"></HeaderStyle>
<ItemStyle HorizontalAlign="Left" Width="20%"></ItemStyle>
</asp:TemplateField>
</Columns>
</asp:GridView>

when i checked the checkboxes(not all) ,corresponding rows data has to be updating when i click save button which is outside of gridview,Its just same like our gmail delete button.

View 3 Replies

Forms Data Controls :: Change Property Value Of An Object Based On A Database Value?

Nov 18, 2010

I'm new to ASP so this may seem so simple but I cannot work it out.

I am trying to create a script that changes its output based on a range of values. Here is what I mean:

I have a MSSQL database with an ASP scripted website that reads it and displays the data in a table. One of the columns in the database is a percentage and I want that column in the web page to have a background colour based on the figure outputted.

So each cell may be a different colour. If the number is between 0 and 30 then red background, 31 to 70 orange etc.

At the moment I have the database output script looking like this:

[Code]....

How can I implement what I have outlined above?

View 1 Replies

Web Forms :: Treeview Adapted But Not Expandable

Nov 10, 2010

there webcontrol adapter experts.I have created a custom treeview webcontrol, that populates my treeview from a database. I am using a control adapter and this apperas to be working but I get some strange bullet points for my list and I cannot get it to expand or contract (see output HTML below). I am using the default SimpleTreeView.css and this also appears to be working. My list just fails to expand/contract or display the "+" (condensed) or "-" (expanded) symbols.

[Code]....

View 1 Replies







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