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

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Add selected CheckBox Row details in Second GDView & remove from second GDView onUncheck

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :.NET Framework
i hv two gridviews first is overview of Requisition and second of Requisition Details
In First GDView I have the requisition columns for checkBox , added by following code

DataGridViewCheckBoxColumn dataGridViewCheckBoxColumnObject = new DataGridViewCheckBoxColumn();
dataGridViewCheckBoxColumnObject.Name = "Select";
dataGridViewCheckBoxColumnObject.Width = 60;

In first GDView I have another column of RequisitionID's

How should I loop through the GDView to get the RequisitionID's of selected rows????

I want to add the details of that requisition in Second GDView as soon as I Checked/Click on the CheckBox of First GDView. Also to remove the Requisition Details as soon as I Remove/Uncheck the CheckBox of first GDView

Can anyone help me

Thank you

View Complete Post

More Related Resource Links

how to get the text of selected checkbox from asp.net checkboxlist control using jquery


I have asp.net checkboxlist control that bounded to a data source so the number of items in the control are different from one to to another time.

I have this function:

     $('#<%=chkListGroups.ClientID %> input:checkbox:checked').siblings('label').text();

this function will return all texts for all selected items in the control as a one string.

 I'm looking for a way that when I check a check box from the ckeckboxlist control will return only last checked checkbox.

this code :

$('#<%=chkListGroups.ClientID %> input:checkbox:checked').last().siblings('label').text(); 

returns last checked item for example if I checked second will return
second item then when I checked fifth item will return fifth item but
if now when I check third item will return fifth item so it is always
returning last item checked in the list and I'm looking to

Please advice me how to do this using jquery.

Getting Details from "Selected" Files.

I'm working on a program that uses the OpenFileDialog class for users to select 2 program Exes. The idea behind it is I want them to be able to connect to a MySQL db and check their versions against the current one. How can I collect data from the selected exe file such as the version of the file. Many programs have a File Version that I want to read off of. Is this even possible; or should I be doing this a different way?

if 'other' from drop down is selected, the respective details textbox is now validated using a req

Hi, I'm developing a system with a number of drop down lists. One of the questions relates to the light conditions at the time of the incident (for example, it could be dark, poorly lit, dusk etc...)One of the options on the drop down list is 'other'. (i argue with my client that if they're using dropdown lists, don't use other, but they disagree)The next field is 'If other, please give details'. What i'm basically looking to acheive is to say that if you select 'other' from the dropdown list, the 'if other' field becomes required using a requiredfield validator. (and the reverse too, so if you choose a pre-poulated answer such as 'dusk', the 'if other' field is not required.)I have all my other validations working fine and my drop down list is populated from an SQLDatasource (not ASP.net Items)My dropdown list id= ddlLightMy 'other' field id= txtbxLightOtherMy required validator for the 'other' field id= requiredvalLightOthermy sqldatasource id= sqldatasourcelightI'm thinking something like this, but it's not quite working for me:If ddlLight.Text = ("other") Thentxtbxlightother...Any assistance would be great. I've done this before and i'nm frustrating myself as i can't seem to work it out!ThankMike

Get selected row value based on checkbox selected in gridview using jquery

Hi ,    i am having gridview with two columns.one column contains checkboxes and another column contains Name.i have given UserId to DataKeyNames in gridview.Now i will check some checkboxes in gridview and click on button GetData. whenver i click on button GetData i need to get datakey values of all the gridview rows whatever checked in gridview using JQUERYPlease help me i am new to JQUery

How do I remove a parameter value from one paremeter after it is selected in another?


I have two single valued parameters each populated from the same dataset.  After a value is selected in the first parameter I want to remove it as an available value from the second.

So the first parameter list is A,B,C

The users selects B, and then list of values in the second parameter changes from A,B,C to A,C.


how to compare to check box list and show selected in first checkbox list


how to show first check box chkched which in show in second check box list

 <table> <tr> <td> <b>Author</b> </td> <td> <b>Reader</b> </td> </tr> <tr> <td> <div style="BORDER: thin solid; OVERFLOW: auto; WIDTH: 200px; HEIGHT:200px"> <table id="Chklist_Author" border="0"> <tr> <td><input id="Chklist_Author_0" type="checkbox" name="Chklist_Author$0" /><label for="Chklist_Author_0">Select</label></td> </tr><tr> <td><input id="Chklist_Author_1" type="checkbox" name="Chklist_Author$1" /><label for="Chklist_Author_1">1029.Aarti</label></td> </tr><tr> <td><input id="Chklist_Author_2" type="checkbox" name="Chklist_Author$2" /><label for="Chklist_Author_2">1025.Akash

Listview/gridview checkbox is selected or not



I have a question about checkbox in listview or checkbox. How do I know when checkbox is selected or not? Do I have to add Binding or..

Import-Module wpk
Add-Type -AssemblyName presentationframework

[xml] $xaml = @"
  Title="MainWindow" Height="350" Width="525">
    <ListView Grid.Row="0" Grid.Column="1" Grid.RowSpan="3" Margin="3" Name="ListView1" SelectionMode="Extended">
 <GridView AllowsColumnReorder="true">
 <GridViewColumn Header="ServerName">               
      <CheckBox Margin="-4,0,-4,0" IsChecked="False" Name="nupp" Content="{Binding ServerName}"/> 

Drop down remove selected item on post back


Hi ,i have a place order form and i have a drop down list that contains list of items

whenever i add item (for example item1)  to place order and click add another item button,

i need to remove  (item1 ) from drop down list to avoid dupplicate insert in sql table

or mayb need to fill the drop down but without (item1) cause i already selected it

it s kind of validation

i am using sql datasource to fill the drop down list of items

Enable TextBox in GridView when CheckBox is Selected


Hi Friends,

There is small exercise, I want to enable TextBox when the CheckBox of same row in GridView is Selected. Right now I’m doing this by using Javascript.

In my GridView

1st Column is : Checkboxes

2nd Column is : First Name

3rd Column is : TextBoxes (which is to be enabled)

And RollNo field Column is hidden.

Here is my code –

<script type="text/javascript">

        function selectAll(invoker)


            var inputElements = document.getElementsByTagName('input');

            for (var i = 0 ; i < inputElements.length ; i++)


                var myElement = inputElements[i];               

                if (myElement.type === "checkbox")


AJAX GridView Checkbox Select All in ASP.Net

In the previous article GridView Select Multiple Rows you learnt the multiple row selection in GridView control. Here you will get the C# code sample to select all the gridview rows using single checkbox server control. You can highlight the selected rows with different color and Font state Bold. If you want to use the selection values on different ASP.Net

Displaying Row Details Tooltip on GridView using JQuery

Continuing exploring JQuery! I decided to implement a feature to display some kind of details related to a row displayed on GridView. For example when displaying employees details on GridView some information might not fit in the GridView because it will make it huge and wide. These infomration can be diplayed as Tooltip. Or when you want to display a picture and some kind of formated text to be diplayed as tooltip when mouse hover on the image.

jQuery: Highlight Gridview Rows with Checkbox

Im learning and experimenting with jQuery and ASP.NET. Below is a simple solution I created to highlight rows in a gridview by clicking on a checkbox next to the row.

Gridview setup:

jQuery: Highlight Gridview Rows with Checkbox

Im learning and experimenting with jQuery and ASP.NET. Below is a simple solution I created to highlight rows in a gridview by clicking on a checkbox next to the row.

Dropdown list in ASP.NET - How to get value selected

am sure this must be very simple, but unforunately I can't figure it out.
I have the following code which populates the dropdown lists from the database. This works fine. Now, when the user selects a particular employee name from the list, I want to get the Employee Id of the selected employee. i.e. I need to get the "Eid" value. I can do this if the EId is loaded in the dropdown list, but in this case only the employee name is displayed. Please let me know howI can get the Eid value even though it is not loaded in the dropdown list.
I would really appreciate your help

Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List

This is an example of an editable gridview containing different ASP.NET controls. When user wants to edit values in gridview, she/he can use these controls to edit existing values in Gridview Edit Mode.

Using the Code

Gridview that exports selected rows to Excel

his seems like a messy workaround, but I ended up using two Gridviews - one to display my data and show my checkboxes, and the other which was invisible amd would eventually end up as my Excel spreadsheet.

How to let user edit selected gridview columns, not entire row



I've got a gridview I would like to let the user edit a couple of columns.  Seems like everything I'm coming across so far makes the entire row editable.  

Hopefully the solution isn't too complicated.  Can someone point me in the right direction?


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