Web Forms :: Create A Group From Selected Rows Of Grid?
Oct 14, 2010
Let me see if I can explain what I am trying to do...From a gridview a user would be able to select as many rows as they wanted and create a "custom group" ... that user group would then be available from a dropdown list for future selection. So next time they would just select the "custom group" from a dropdown list and the resulting datagrid would only have those rows that were originally selected.So if I had a datagrid which had: empoyeeID, name, address, phone#, etc...
1. I select what ever rows I want
2. Create a name for the new custom group
3. Click a "save group" button ... this would save all the employeeID's from selected rows.
4. A dropdown list would then be updated with the new custom group ... ie, MIKE's GROUP
5. User could then select MIKE's GROUP from a dropdown list and work only with rows that were added to it.
View 1 Replies
Similar Messages:
May 31, 2010
I have one big DataTable with X rows. I want to select Y rows from it and bind them to a new ViewList. While doing it, I want to delete these rows from the DataTable (Having X - Y rows).
What is the best and fast way to do it?
I don't know if it is better to create a new DataTable to have the Y and after that bind them to a ViewList or something else?
I'm also looking for example in code how to select/delete rows from DataTable.
View 1 Replies
Sep 22, 2010
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.
View 2 Replies
Sep 20, 2010
I created a gridview that is made up of 4 gridviews and using a stored procedure to populate it. I create columns at runtime because the number of columns changes all the time.To make the grids editable I am adding template fields at runtime as I create the columns, this is to ensure that a user is able to edit the cells and some foot values update. Reason why I have four grids is to freeze rows and columns like in excel using javascript. The problem is that performance is very bad especially in IE, the grids take a long time to load. I am not sure if this is caused by the data load or the creation of text boxes. see some of the code below for my _aspx page:
[Code]....
View 1 Replies
Mar 21, 2011
I have been handling everything in code which is not working consistently same in all scenarios.
View 1 Replies
Jun 30, 2010
I'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" />
View 1 Replies
Jul 6, 2010
I am trying to create a second grid in the same page with detailed info for a given record of the first Grid, but when I press select in the first grid nothing happens. I follwed everything I read.
<asp:GridView runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" style="margin-right: 0px" Width="659px"
AutoGenerateDeleteButton="True" AutoGenerateEditButton="True"
AllowSorting="True" DataKeyNames="accession_num,organ"
EnablePersistedSelection="True" EnableSortingAndPagingCallbacks="True" onselectedindexchanged="Unnamed1_SelectedIndexChanged"
>
<Columns>
<asp:BoundField DataField="organ" HeaderText="organ"
SortExpression="organ" />
<asp:BoundField DataField="weight" HeaderText="weight"
SortExpression="weight" />
<asp:BoundField DataField="unit" HeaderText="unit" SortExpression="unit" />
<asp:BoundField DataField="accession_num" HeaderText="accession_num"
ReadOnly="True" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:pdmstestConnectionString %>"
SelectCommand="GetGrossOrgan" SelectCommandType="StoredProcedure"
UpdateCommand="UpdateGrossOrgan" UpdateCommandType="StoredProcedure"
DeleteCommand="DELETE FROM [Pathology_Gross_Organ] WHERE [accession_num] = @accession_num AND [organ] = @original_organ"
OldValuesParameterFormatString="original_{0}"
> <SelectParameters>
<asp:ControlParameter ControlID="accession_num" Name="accession_num"
PropertyName="Text" Type="String"/>
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="accession_num" Type="String" />
<asp:Parameter Name="original_organ" Type="String"/>
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="accession_num" Type="String"/>
<asp:Parameter Name="organ" Type="String"/>
<asp:Parameter Name="weight" Type="Int16" />
<asp:Parameter Name="unit" Type="String"/>
</UpdateParameters>
</asp:SqlDataSource>
View 8 Replies
Jan 8, 2010
i have the following objects:
Event:
- EventID (PK)
- GroupID (FK)
- StartDate
Group:
- GroupID (PK)
- GroupName
What i need to do is select the last 5 events for each group using LINQ to Objects. I tried starting with:
[Code]....
But i'm not sure how i only take the last 5 per group.
The simple way of doing this is to get the groups and then have a property on that which returns the last 5 events but if i databind this i will have to use a nested Repeater/ListView. Ideally i would like to have a row foreach event.
View 3 Replies
Dec 1, 2013
How we can group data in asp template field..
View 1 Replies
Nov 30, 2013
How we can group data in bound field...
1 1-1-2013 x a 1 1-1-2013 x b
1 1-1-2013 x c
2 2-1-2013 y a 2 2-1-2013 y b
2 2-1-2013 y c
i want to show it in this format...
serialNo date name item
1 1-1-2013 x a b
c
2 2-1-2013 y a b
c
View 1 Replies
Apr 30, 2010
How do i create a drop down box that can break by group?
for example.
bachelor
- science
- art
master
- mba
- mis
- cs
View 7 Replies
Aug 8, 2012
I want to click on the grid row and want to show another grid on the click of that row how it can be solved...
View 1 Replies
Jun 8, 2010
I am able to validate radiobutton with JQuery using the code below, but I do not know how to highlight the unchecked radio button groups. Does anybody have any idea?
[Code]....
View 2 Replies
Nov 16, 2010
I am able to validate radiobutton with JQuery using the code below, but I do not know how to highlight the unchecked radio button groups.
[Code]....
View 1 Replies
Feb 1, 2011
I've found this code, but I was wondering whether there's a more streamlined way to do it.
So for example, rather than having all the if statements can you have one line that says Label1.text = "You selected " & RadioGroup1.Text
Sub SubmitBtn_Click(Sender As Object, e As EventArgs)
If Radio1.Checked Then
Label1.Text = "You selected " & Radio1.Text
ElseIf Radio2.Checked Then
[Code]....
View 3 Replies
Oct 19, 2010
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 Replies
Jan 13, 2011
I am using a nested listview to display a seperate grid for each group of data returned from my db query. To get this working, I have adapted a piece of code to group the data prior to it being bound:
[Code]....
I am then using the following html markup:
[Code]....
[Code]....
This works as I want it to however some of the fields within the nested table need to be formatted as currency so I am trying to use Eval and {0:c} to do this however the moment I use Eval, the data items cannot be found
DataBinding: 'System.Data.DataRow' does not contain a property with the name '0'.
View 4 Replies
Oct 7, 2010
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.
View 3 Replies
Jun 25, 2010
I 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]....
View 4 Replies
Jun 16, 2010
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]....
View 8 Replies
Jan 25, 2011
I 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 Replies
Nov 9, 2010
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...
View 34 Replies
Oct 17, 2010
How do you select value from a gridview? I would like to pass values of rows selected to a query with the code below, but the grid seems to be frozen and I can't find a property for the grid that allows me to select rows.
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles GridView1.SelectedIndexChanged
Dim DB As New AOP29DBDataContext
If GridView1.SelectedValue = "Receiver" Then
Dim Query = From p In DB.Receivers
Select p
GridView2.DataSource = Query
GridView2.DataBind()
End If
If GridView1.SelectedValue = "Donor" Then
Dim Query = From p In DB.Donors
Select p
GridView2.DataSource = Query
GridView2.DataBind()
End If
End Sub
View 4 Replies
Mar 22, 2011
am using a stored proc: that uses text of a textbox as input parmeter and returns single result each time ,am binding grid view to this stored proc:,now wat happens is the data gets displyed in grid view and whn i give new input in text box ,the old data in grid view is lost and new data comes...now wat are the options i have to keep the old data in grid view?/.
View 8 Replies
May 30, 2010
How to control the number of displayed rows in a grid? Which property to change?
View 2 Replies