Is it possible to have combobox with 2 valuefields, other words, if we are inserting some columns, this combobox should give value to 2 columns. Hope its undersentable.
Is it possible to have combobox like this inside ASPxGridView?
Use this procedure:
1. Submit one combo box value
2. In ASPxGridView.RowInserting event use that value (retrieve it from e.NewValues) to fetch others.
3. Insert fetched values into e.NewValues.
This will work if you can fetch all row values using combo box value.
Related
I want to design a grid view or table that gets data from database then i want leave first row blank. when user click in the cells of first row and type in, it shows every data that matches.
You can use textBoxes to query your requested data in gridView and use onTextBoxChanged to update the gridView. Instead of increasing the code you also can do it using Table let's say you have 5 columns on the gridView you make table with 5 columns and 2 rows, the first row you put 1 textBox in each cell, in the second column you use colspan property and set it to 5. Then use the event onTextBoxChanged call the SQL command and query the data on textBox then update the gridView.
I have a table in database.
This table has 10 rows and 4 columns which contains ID( an integer value coming from UI ).
In front end in asp.net application i bind all 10 rows to a Grid-view.Grid-view has 4 column and each column contains a drop-down list.
There is a button called Update on screen.
I want to update database table on clicking on Update button i.e. whatever option is selected in Grid-view should update in database table.
What would be the best approach to do it?
Thanks
Use a codebehind handler to handle the button click, then do a database update based on the values in the Gridview.
I have a DevExpress ASPXGridView which has been bound with a dataset.
I'm using the edit row command to edit the data in the row and return it to the database.
When the edit button is clicked, the row opens up and there is an ASPXComboBox that is bound to another dataset. The TextField and the ValueField have both been properly set in the ASPXComboBox and are displaying data correctly. The data is as shown
List item
List item
When e.NewValues("") is called the integer value field i.e 1 is returned. However, when e.OldValues("") the TextField is returned i.e. "List Item"
Is there a way of returning the the integer value when calling e.Oldvalues without having to make another call to the database?
Thanks
my application needs to allow users to insert rows below the current datagrid row. My solution is to to add a row to the dataproviders collection. This works, but the row does not appear beneath the current row the user clicked on.
The Datagrid has a default sort order (date ASC), which re-orders the data...so this seems to affect the position of the row in the grid.
Any ideas how to fix this?
Two possible answers:
1. define your own sort function that sorts according to item order in dataprovider (i.e. it does nothing), and assign it to the sortFunction property
2. simply comment out the sorting of the data inside the component.
I have an asp.net application in which I am using a grid view. Paging and sorting are applied to the grid view. One action what I am doing is on click of any grid view row, am getting the column values of the selected row and redirecting to the other page.
The problem is after the grid view is sorted, if I click on any of the row in ayy page (paging index), am getting only first page values even though the visible row is different.
I am getting the row values in gridview_rowcreated() method and putting in some variable. In sorting scenario, before sorting is done, the gridview_rowcreated() method is called but not after the sorting is done.
In case you still need an answer to this...
You should be using the gridview's SelectedIndexChanging event with something like the following:
gridView.Rows.Item(intNewIndex).Cells(# of column, zero-based).Text
This will give each cell's current value, you'll just have to loop through each cell and assign each cell's value to desired variable(s).
Hope this helps!!!