Forms Data Controls :: Expand Rows In A Data Grid To Show Details In The Same Page?
Aug 31, 2010<asp:templatecolumn headertext="Purchase Order">
View 4 Replies<asp:templatecolumn headertext="Purchase Order">
View 4 RepliesI have been handling everything in code which is not working consistently same in all scenarios.
View 1 RepliesI want to populate the search results in grid. The results should be grouped based on condition. I mean if i am searching for name called Osama laden, all the names containing Osama be grouped(+) and Laden as well. I should get the count side to the (+) button. When i click on + button the results should expand and when i click on(-) the results should collapse.
View 2 Repliesi have one grid and one button when i click on that button then it expand and showing another grid under the row of parent grid how to do that.
View 2 RepliesI found code [URL] that allows multiple-row inserts, and tried to convert it to vb.net. I can't get the blank grid with 5 rows to show up -- for some reason the datasource won't bind.
[Code]....
Code gridview:
[Code]....
My goal is to load a row details from db to a webform and let the user update it's value .
The user searches an id (i have a stored procedure for that), how i show that data from the row nicely in the web page through the dal layer. After the data is shown on the page the user need to update a cell in the row and send it.(the part of updating is not the problem).
in other questions how should the dal method should look and how i integrate it's result in the presentation layer (the aspx webform).
How can I Expand and Collapse the rows in gridview for a column having same row data.
View 2 RepliesI have on a page a gridview that can be filtered with one text box. I set up the gridview to show select and wanted to then connect a details view so that when you selected a row the entire details would show up. When I run it I get this error. Data keys must be specified on GridView 'GridView1' before the selected data keys can be retrieved. Use the DataKeyNames property to specify data keys.
<%@ Page language="C#" masterpagefile="MainContent.master" title="Electrical Storage" EnableEventValidation="false" %>
<asp:Content id="Content1" runat="server" contentplaceholderid="Content">
<div id="Rightside">
<h2>Search Electrical Storage
</h2>
<li><a href="EStorageResultsAll.aspx">View All Files</a></li>
<li>Specify Projects to View</li>
<br />
<br />
<form>
Search: <asp:TextBox id="Search" runat="server"></asp:TextBox>
(% is wildcard)<br /><br />
<asp:Button runat="server" Text="Search" id="Button1"
PostBackUrl="electrical_storage.aspx" Height="26px" BackColor="#000066" ForeColor="White" Width="129px"></asp:Button>
<br />
<hr />
<asp:GridView id="GridView1" runat="server" AutoGenerateColumns="False" BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px" CellPadding="4" CellSpacing="2" DataSourceID="AccessDataSource1" ForeColor="Black" Width="820px" AllowSorting="True">
<RowStyle BackColor="White" />
<Columns>
<asp:commandfield ShowSelectButton="True">
</asp:commandfield>
<asp:boundfield DataField="CoID" HeaderText="Co ID" SortExpression="CoID">
</asp:boundfield>
<asp:boundfield DataField="ProjClass" HeaderText="Project Class" SortExpression="ProjClass">
</asp:boundfield>
<asp:boundfield DataField="Project" HeaderText="Project" SortExpression="Project">
</asp:boundfield>
<asp:boundfield DataField="FileName" HeaderText="File Name" SortExpression="FileName">
</asp:boundfield>
<asp:boundfield DataField="FileAddInfo" HeaderText="File Add Info" SortExpression="FileAddInfo" Visible="False">
</asp:boundfield>
<asp:boundfield DataField="FileNumber" HeaderText="File Number" SortExpression="FileNumber" Visible="False">
</asp:boundfield>
<asp:boundfield DataField="BoxNumber" HeaderText="Box Number" SortExpression="BoxNumber" Visible="False">
</asp:boundfield>
<asp:boundfield DataField="Location" HeaderText="Location" SortExpression="Location" Visible="False">
</asp:boundfield>
</Columns>
<FooterStyle BackColor="#CCCCCC" />
<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#000066" Font-Bold="True" ForeColor="White" />
</asp:GridView>
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="\Elec1DATABASEStorageElectricalFilesBook.mdb" SelectCommand="SELECT [CoID], [ProjClass], [Project], [FileName], [FileAddInfo], [FileNumber], [BoxNumber], [Location] FROM [FilesWithLocation]
WHERE (([CoID] LIKE '%' + ? + '%') OR ([ProjClass] LIKE '%' + ? + '%') OR ([Project] LIKE '%' + ? + '%')OR ([FileName] LIKE '%' + ? + '%')OR ([FileAddInfo] LIKE '%' + ? + '%')OR ([BoxNumber] LIKE '%' + ? + '%'))">
<SelectParameters>
<asp:controlparameter ControlID="Search" Name="CoID" PropertyName="Text" Type="String" />
<asp:controlparameter ControlID="Search" Name="ProjClass" PropertyName="Text" Type="String" />
<asp:controlparameter ControlID="Search" Name="Project" PropertyName="Text" Type="String" />
<asp:controlparameter ControlID="Search" Name="FileName" PropertyName="Text" Type="String" />
<asp:controlparameter ControlID="Search" Name="FileAddInfo" PropertyName="Text" Type="String" />
<asp:controlparameter ControlID="Search" Name="FileNumber" PropertyName="Text" Type="String" />
<asp:controlparameter ControlID="Search" Name="BoxNumber" PropertyName="Text" Type="String" />
</SelectParameters>
</asp:AccessDataSource>
<asp:AccessDataSource id="AccessDataSource2" runat="server" DataFile="\Elec1DATABASEStorageElectricalFilesBook.mdb" SelectCommand="SELECT * FROM [FilesWithLocation] WHERE ([SearchString] = ?)">
<SelectParameters>
<asp:controlparameter ControlID="GridView1" Name="SearchString" PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:AccessDataSource>
<asp:DetailsView id="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="AccessDataSource2" Height="50px" Width="442px">
<Fields>
<asp:boundfield DataField="CoID" HeaderText="Company ID" SortExpression="CoID">
</asp:boundfield>
<asp:boundfield DataField="ProjClass" HeaderText="Project Class" SortExpression="ProjClass">
</asp:boundfield>
<asp:boundfield DataField="Project" HeaderText="Project" SortExpression="Project">
</asp:boundfield>
<asp:boundfield DataField="FileName" HeaderText="File Name" SortExpression="FileName">
</asp:boundfield>
<asp:boundfield DataField="FileAddInfo" HeaderText="File Additional Info" SortExpression="FileAddInfo">
</asp:boundfield>
<asp:boundfield DataField="PeriodBegin" DataFormatString="{0:d}" HeaderText="Period Begin" SortExpression="PeriodBegin">
</asp:boundfield>
<asp:boundfield DataField="PeriodEnd" DataFormatString="{0:d}" HeaderText="Period End" SortExpression="PeriodEnd">
</asp:boundfield>
<asp:boundfield DataField="FileType" HeaderText="File Type" SortExpression="FileType">
</asp:boundfield>
<asp:boundfield DataField="FileNumber" HeaderText="File Number" SortExpression="FileNumber">
</asp:boundfield>
<asp:boundfield DataField="BoxNumber" HeaderText="Box Number" SortExpression="BoxNumber">
</asp:boundfield>
<asp:boundfield DataField="SearchString" HeaderText="Search String" ReadOnly="True" SortExpression="SearchString">
</asp:boundfield>
<asp:boundfield DataField="Location" HeaderText="Location" SortExpression="Location">
</asp:boundfield>
</Fields>
</asp:DetailsView>
</form>
</div>
</asp:Content>
<asp:Content id="Content2" runat="server" contentplaceholderid="head">
<style type="text/css">
table {
width: 820px;
}
.gridview {
width: 820px;
position: fixed;
}
</style>
</asp:Content>
I have this function to expand and collapse rows in gridview from this website:
[URL]
how to have a expand/collapse ALL function on top of individual rows?
I am looking for a expand/collapse script for a grid view. But after searching around, seems like all sample code are for datagrid instead of grid view. And because there are differences between properties of gridview and datagrid, I can just implement it. Does anyone has any reference for grid view?
This is one of them.
[URL]
I am using a SiteMap data source boudn to a navigation control. I would like to also put this in the footer (sort of like the bottom of Yahoo! pages) where all items are expanded and static.
So my major heading would be across the top (horizontal) and the sub items would be indented vertically below and always expanded. Is there a way to do this? Check out the bottom of the BlackBerry DEVCON 2010 site for an example:[URL]
I have an entity "Order", which contains a set of states. Every state has date and name.
I want show grid with all orders and in grid one column with last state of order. But I dont understand how to do it.
I have a gridview which is databound to a database. At runtime the gridview is populated with the information from the database. I also have a select hyperlinkfield column which basically has the select hyperlink in each row, when clicked it displays all the details of that entire row(this opens up on a different page).
What im looking for is when that select hyperlink is clicked a progress bar/progress gear with the word loading should appear for couple of seconds and then display all the details of that row selected which will appear on another page.
I have a grid view that needs to be shown group wise. The grouping of the data should be dynamic and that is based on the column that is selected.
In general it should list all the rows and based on the coloumn header selected, all the rows should group by that column and should be listed under it. That also needs the template column for the check box and while group by there should be a check all option available for each group.
Even having the collapse and expand option for each groups is required.
I currently use VS 2005 and later will use 2008 and 2010, but will use the aspx code and not xaml.
I have a piece of data that has a refererence number and then account name that looks like this in the database:
111111,Member Account~222222,Trial Account
I have the data spitting out just like that in a grid view, but I am wondering if there is some C# I can put in to where it adds a column when there is a comma and another column when there is a ~ in the data?
iam using grid view.i am using in it one templete filed like image button.i want when i click on image.the id which i want to pass passes and new pop up window is open and shows details....can i use Row databound or RowCreated which is better to setting onclick event on each image...if i would success on this i get associate id,s of each row.
View 2 RepliesI'm getting some Xml back from a service. I would like it to be the datasource of a grid view on my aspx page. Here is a sample of the Xml
<?xml version="1.0" encoding="utf-16" ?>
<ArrayOfTripTollCompleteDC xmlns:xsi=[URL]"
xmlns:xsd=[URL]>
<TripTollCompleteDC>
<TripTollId>5</TripTollId>
<DMSLaneModeID xsi:nil="true" />
<HOVOnly>false</HOVOnly>
<CreateDateTime>2010-06-07T15:54:01.023</CreateDateTime>
<ConfigVTMSDelaySeconds>5</ConfigVTMSDelaySeconds>
</TripTollCompleteDC>
and here is my code that parses the xml and tries to bind the grid. What am I missing here?
var retVal = service.GetTripDetailsByTripID(tripId);
var xmlTrips = XDocument.Parse(retVal);
var tripTolls =
from t in xmlTrips.Elements("TripTollCompleteDC")
select new {
TripTollId = (int)t.Element("TripTollId")
, DMSLaneModeID = (int?)t.Element("DMSLaneModeID")
, HOVOnly = (bool)t.Element("HOVOnly")
, CreateDateTime = (DateTime)t.Element("CreateDateTime")
, ConfigVTMSDelaySeconds = (int)t.Element("ConfigVTMSDelaySeconds")
};
grdTripDetails.DataSource = tripTolls;
grdTripDetails.DataBind();
I realize these are anonymous types. Is that a problem? I have verified the service is returning the Xml as stated above. Can anyone out there point me in the right direction? Just for completeness, here is the grid markup <asp:GridView runat="server" ID="grdTripDetails" />
<asp:datagrid
id="dgCertification"
runat="server"
Width="860px"
GridLines="Horizontal"
CellPadding="2"
AlternatingItemStyle-BackColor="Linen"
[code]...
Im not sure what control to use, I want to show a list of results in teh following format
Car Name Ford Fiat Opel
Car Accessory
Leather Yes No Yes
Power Steering Yes Yes Yes
Electric Windows No Yes Yes
Should I use a repeater, gridview or listview. The bit I cant get my head round is how I get the 1st column to show Leather, Power Steering, Electric Windows etc....
I have a Gridview that show the values from mysql database .Can U tell me whn I click on linkbutton on grid view then Display the pop Box nd Data show in textboxes in pop box
id 01
Name GD
Ph 09582901670
I am using devexpress grid view. i have enabled SHOW GROUP PANELData is binded to the gridview using datatable in cs page . But when i drag the coloum to the header to group ...the grid show no data...
View 3 Repliesi have datagrid , data coming from database but data in database as formated , i want to show data wihotu format below example:
<B> test </B> data base has this type data
but in grid i want to show test not with format, i am getting same data from database, how i can do?
I have a gridview on a web form and it is working, but the users find it too slow for data entry with them having to click on the edit and update buttons. I would like to allow them to edit all the rows and then when the form's overall save button is pressed then I save the changes. I found this: [URL] which does something similar, but I don't want to use the check box to indicate which row is being edited.
I've got close based on that code, but one of the controls in the column needs to control how the rest of the columns are displayed and I can't work out how to refer to the other columns and control on the current row from some code that is called by the OnTextChanged associated with a control.
ihave grid in which i want to delete selected rows (checkbox selected)
i have written code as follow but on click on delete button it delete all.
[Code]....
I am having a grid view
[Code]....
now depending on the text of lblstatus i want to count the no of rows in the gridview....
i m binding the lblstatus with two values 1 and 0...
now i want to count the no of rows in gridview whose lblstatus is 1...