How To Populate Different Records In Row Of A Grid

May 5, 2010

I have a two Grid where I have to display some records from the table. The table consists of employee names ,manager names and their comments. Now on the first gird I am fetching data of employee names. Now on the second grid I have to display data of manager names and their comments. The data is on the same table.
On show button of the first grid it shows all the employees. then on AdvWebGrid.ClickLink or any selected user on the first grid , i have to display the manager names and their comments on the second grid. How can I do that ?

View 1 Replies

Similar Messages:

C# - Populate DataTable With Records From Database?

Oct 8, 2010

This is my GET Method to get my data from my DataTable

Private Function GetData() As PagedDataSource
' Declarations
Dim dt As New DataTable
Dim dr As DataRow
Dim pg As New PagedDataSource

' Add some columns

' Add some test data
For i As Integer = 0 To 10
dr = dt.NewRow
dr("Column1") = i
dr("Column2") = "Some Text " & (i * 5)

' Add a DataView from the DataTable to the PagedDataSource
pg.DataSource = dt.DefaultView

' Return the DataTable
Return pg
End Function

It returns the DataTable as "pg"

What changes must I make to this GET method to get the records from a table in my database?

C# examples will also do but would be great to see a reply with my code and then the changes....

View 1 Replies

How To Populate A Listbox In C# With Values From A Grid

Apr 9, 2010

Hey what i am trying to do is i have a listbox with some simple values in it


and what i want to do is add a value that has multiple values to it...for instance i want a value = All DEV which will represent many values in itself so that once ALL DEV is selected it actually has many different numbers assigned to it. Can this be done? I understand that the value 1 has just one value behind it, same as 2 and 3 but I want the All DEV one to have multiple values behind it such as 5,6,7,8 for clicking just the ALL DEV selection.

View 2 Replies

Label To Populate Grid With Available Classes

Jun 2, 2010

This is the first time I have played with the web part of Visual Studio and I would like to know how to:

1) When A user selects a date from the calendar it will populate the grid with available classes. (I have already setup the query however I don't know how to execute it using the text from Label1).

See picture, "Label1" will show the date from the selected date on calendar, from there I want the label to populate the Grid with available classes.

View 2 Replies

DataSource Controls :: Populate Grid Using Search Options?

Apr 22, 2010

I have a grid which displays a set of columns and I m trying to display only those rows in grid based on the options chosen or searched.

I filter options are

1) search for (textbox) - search from (listbox with columns product, product id , userid )

2) Date filter - choose 1 checkbox out of 3 checkboxes(create Date, submit date, Approve ) and whateevr is selected for the criteria we choose between date from and to calender.

3) Status - listbox with status ID 's Basec on this three filter options I need to frame a LINQ to SQL query that gives me results in grid any option can either be choosen or can be left blank I am using 3 - tier architecture and passing all this fields as parameters in a method from UI.cs to UI.DAL where I am writing a query to generate grid view rows. I think I need to use Dynamic LInq and I have not done that before !!

View 2 Replies

ADO.NET :: Searching For Records In Grid View?

Dec 22, 2010

I have a webform that uses a gridview to display a list of records from a table. I also have a search box that allows the users to input their search text and next to it a Find button which will take whatever that is in the search box and match it against each record in the datbase using a simple select query.

Whenever this search is executed it takes up to 20 seconds to display the returned result in the grid. The search query uses the SQl Data connector class through SQL ADO.NET.

However, when I perform the same query in the SQL management studio the search takes a total of 2 seconds. I'm wondering why there is a big difference in timing. I know that the query searches the table of about 4,000 records. I read up on paging but I am new to this concept.

My code in ASP is:


Code behind is:


View 11 Replies

C# - Filtering The Records In The Second Grid According To The Selection In The First?

Feb 14, 2011

i've header and detail rad grids. when i click a record from header rad grid, it must be filled detail grid.

how to do this?

View 2 Replies

Duplicate Records While Insertion Into Grid?

Mar 22, 2011

I have a page which consists of a grid and add new button. When the user clicks add new button he gets several fields to be entered. So, when he clicks submit I usually write a query which checks if there is an entry already in the database. In this case, I succeeded. However, my task is to also show the records identical and let the user decide to proceed or not.SO, I am not sure of how to proceed with this one. So, can anyone just help me in giving an idea on how to proceed with this one?

View 1 Replies

Forms Data Controls :: Search Multiple Words Into Textbox And Populate All Records In Gridview

Aug 24, 2010

I have a textbox and a gridview which is bound to a table what I want to achieve is a solution where lets say there are two records - e.g. "1. Book and 2. Red", i want a user to type in those words and the gridview shows the results as followed;

1. Book
2. Red

I have set up the sql data source and everything and my like operator is this.

LIKE '%' + @record + '%'

how can I solve this problem?

View 3 Replies

HTML - Can Use The Grid View To Insert New Records

Jun 19, 2010

Using the ASP.NET grid view. It displays 3 columns with 1 row for each, displaying an integer saved in the database. I would like to have a text input one for each column, so the user can add a new row of integers to the database. (The table only displays the last row updated, that part seems to be working OK)

Here is the code I have that displays data but without the input option I would like.

What is the way this is done in ASP.NET (3.5)? Are there more options in the control or do I need to manually bring in text input controls and give each one manual code to update the database?

View 1 Replies

Display 10 Empty Records In A Grid View?

Oct 12, 2010

how to display 10 empty records in a grid view while in page load?

View 1 Replies

C# - Filtering The Records In The Second Grid According To The Selection In The First In GridView?

Feb 15, 2011

When i click on a row in gridview1, i want to go to gridview2 with the id i get from first grid.

How to get id from gridview1 to gridview2 and gridview2 autobinding?

View 1 Replies

Populate Grid View Auto-generated Column Data Type?

Mar 10, 2011

I am using grid view which has is populated dynamically that means it has auto generated columns at run time.

I just want to know db type of these columns whether a column is text , date or int type.

View 1 Replies

Forms Data Controls :: Drop Down In Grid Header Doesn't Populate?

Apr 29, 2010

I tried adding a ddl into my grid header, it was origiinally out side and worked when i put it in the header it no longer worked, i am guesssing i have to do something other than cut past


View 4 Replies

Web Forms :: Display 5 Fields Of Records In List / Grid?

Jan 19, 2011

I have to display about 1000 records in a list or grid.

Each row will have about 5 fields/columns,


The list or grid must allow the user to select a row.

In addition, when a row is selected by user, the address will be shown under the list or grid.

View 5 Replies

Forms Data Controls :: Binding Different Records To Grid View?

Dec 8, 2010

I have an gridview consisting pager Templet. In pager templet, add first, previous,next and last Buttons to control records. PageSize is 3. First I am binding first 3 records from the list (Consisting 9 records) to the GridView.

My question is:

<1> Is it possible to bind the next 3 records(record4, record5,record6) to GridView when click on next Button?

<2> Similally, Is it possible to bind records for other buttons?

View 1 Replies

Forms Data Controls :: Make A Dataset And Put Into A Grid Or Repeater With The Records

Mar 25, 2010

I have an xml file with this structure:


I need to make a dataset and put into a grid or repeater with the records that have <show>1</show>. Can anyone point me in the right direction?

View 2 Replies

Forms Data Controls :: Filtering The Records In The Second Grid According To The Selection In The First GridView?

Feb 15, 2011

When i click on a row in gridview1, i want to go to gridview2 with the id i get from first grid.

How to get id from gridview1 to gridview2 and gridview2 autobinding?

View 4 Replies

Forms Data Controls :: Binding Grid View With Empty Records?

Mar 11, 2010

as we all know

Dataset ds=new DataSet();

when the dataset has no reccrds then the grid view will not displayed.

I need to show the grid with 10 rows with no details means empty records.

View 3 Replies

Forms Data Controls :: Dynamically Populate Grid View Dropdown List On Edit Template?

Nov 23, 2010

I have grid view which databind from object datasource. my problem is i want to disply dynamic dropdown list on edit template based on the id which has in grid view. but still i can't figure out a way to do this.

View 1 Replies

Forms Data Controls :: Any Grid: Multiple Records Per Row (as In ListView) But With Formatted Textboxes?

Dec 2, 2010

I am building a retail shopping website and want multiple db records per row - e.g. 2 records per row side by side. Each record will have an image, a couple of labels from the database to state Item title / name, description etc and I need to add a textbox for the quantity. In clothing section a radio button for size and another textbox for item colour. I will then add a button (any button) to gather the info (recordID and textbox input) and take me to the shopping cart.

Problem: In ListView I get the multiple records but can't get the data from the textboxes: In Gridview I can get the textbox data but can't get multipe records per row.Which grid should I use to get both of these features working?

View 1 Replies

Web Forms :: Forming Query Based On Condition For Displaying Records In Grid On Demand

Feb 22, 2012

I have a function or binding grid where i pass the flag for query to be displayed for page load i have below query

if (flag=="pageload){sql= "select  ";  sql= sql *  "  from (select top  50   *  "  from ";   
sql= sql+ "(select top  50  *   from EMPLOYEE  order by NAME )"; 
sql= sql+ " as T1 order by T1.NAME  DESC) as T2 order by NAME  ASC  ";
} else if flag=="filteration select * from EMPLOYEE

In the above query i get 50 records per page & the next prev navigation works fine but when i filter out the records  i cant use the above query to get the filtered records as I need to filter from the whole recordset say I have total 1000 records after filtering i get 500 records after filtration i am not able to navigate across the records correctly...

View 1 Replies

Forms Data Controls :: Show A Grid View Control That Is Initially Displayed To Allow The User To Enter Multiple Records?

Jan 19, 2010

I want to show a grid view Control that is initially displayed to allow the user to enter multiple records. This grid view will not be tied to a database nor will it need to save the data that is enter into the GridView Control directly to a database.

View 3 Replies

Forms Data Controls :: How To Populate The Data In Textbox While Clicking On Grid View Control

Mar 11, 2011

I have used the gridview in 3.5 framework to dispaly a report ,In grid view i have used an Image button as Edit,While clicking on that Edit Button The row data fields in gridview likename ,Address etc have to populate in the Textboxes (Not in the Grid view row I am giving entry form in the same page )all the textboxes must be in editable mode

View 3 Replies

Mysql - Parameters In Odbc - "selected Value" Of Datalist Doesn't Populate Grid Control

Aug 4, 2010

I have a page 3 datacontrols (in order, datalist->grid->listview, the selection from one feeds into the next) works perfectly locally, using dot net connector for mysql. My webhost uses ODBC, and I had to remove [ ] from the select statements in my code and put the table names. I removed the [ ] 's and my page runs, and my 1st/datalist control shows but now my "selected value" of my datalist, doesn't populate my grid control. I imagine theres another peculiarity with the way odbc handles parameters. Here is my original, for my grid:

<asp:SqlDataSource ID="recipegrid" runat="server"
ConnectionString="<%$ ConnectionStrings:exoticingConnectionString %>"
ProviderName="<%$ ConnectionStrings:exoticingConnectionString.ProviderName %>"
SelectCommand="SELECT [Id], [Name], [Cal], [Pro], [Fat], [Carb], [Fiber], [Chol], [Sod] FROM [tblrecipes] WHERE ([filenameid] = @filenameid) ORDER BY [name]">
<asp:ControlParameter ControlID="DataList1" Name="filenameid"
PropertyName="SelectedValue" Type="Int32" />

example of changes to select that allowed my page to run again: SelectCommand="SELECT tblrecipes.Id, tblrecipes.Name, tblrecipes.Cal, tblrecipes.Pro, tblrecipes.Fat, tblrecipes.Carb, tblrecipes.Fiber, tblrecipes.Chol, tblrecipes.Sod FROM tblrecipes WHERE tblrecipes.filenameid = @filenameid ORDER BY">

BTW, I also tried removing my scriptmanager & updatepanel,, and using autopostbacks instead in my controls, jik, and nothing changed so I put it back.

View 1 Replies

Copyrights 2005-15, All rights reserved