combobox inside gridview while in editmode - c#

i have gridview with Databound from database in C# WinForm Application.
now ,when cell of gridview gets in Editmode,combobox should be displayed in stead of normal textview cell of gridview.
so that user can select value from combobox.
how?

Related

How to add new editable row on the first row of a Populated GridView OnClick

I am currently working on a website using ASP.Net and C# on Visual Studio 2012.
I have a GridView that displays data on Page_Load from my database and a button that should add new row AT THE FIRST ROW of my GridView .
Is there a way on doing this? I tried adding rows with textboxes dynamically but I can't retrieve the input data from it because it disappears on PostBacks.
Ideas so far:
Start populating the gridview from 2nd row to make the first row
clear and add control to it from the client side but I dont know how
to do it and if it is even possible.
Place the textboxes on the HeaderRow, then hide HeaderRow on Page_Load, then display the HeaderRow on button click. But the labels of the column will disappear because it will be replaced with TextBoxes.

when i give datasource to gridview, the combo in grid is auto selecting

after giving the datasource to grid the first cell of gridview combo is auto selection occuring in datagridview, how to prevent this?
Since it is a dropdown list you have to populate it separately and insert "Select" as 0th item.
I assume this is asp.net application. Here is the link how you can populate and bind dropdown in gridview.
how to bind a dropdownlist in gridview?

How to load Gridview on dropdown selected index changed event?

I have a gridview contains only a drop down box and text box controls for inputting data.I can load the dropdown on gridview rowdatabound event and take the input on gridview roweditevent.Here my question is how to load this gridview it self on another dropdown selected index changed event ,Because nothing is there to load data in to the grid in terms of gridview.datasource ,but inside gridview dropdown is loaded on gridview rowdatabound event.

Change cell value of selected item in datagrid WPF

The datagrid is bound to a collectionview and the columns are not being auto generated. When the user selects a row in the datagrid, a code is generated. I want to insert this code in the Code column of the datagrid in WPF. How can I achieve this?
OnClick using Grid.SelectedCell

How can i access in server side AspxGridView row's combobox after click New Row button

I have an AspxGridView which has another aspxgridview in its detailrows. The second gridview has a combobox in its row. I want to set this combobox's selected value when I click New Row on the second gridview. So, how can i access that combobox after click new row button?
KR,
Çağın
I've answered your question at:
How can i access in server side AspxGridView row's combobox after click New Row button

Categories

Resources