Thank you very much for your reply.
But in the example http://websamples.syncfusion.com/samples/Grid.Web/22.214.171.124/Forum-66566/main.htm
When I select some item in the combo box it is showing the message that selected index fired. But I need to see the item what ever I have selected. Now it is showing always 'none' first item after each load. So please suggest me how to retain the selected value after page resfresh.
Thank you for choosing Syncfusion products.
Please refer the below update to your queries:
Below is the sample link which contains the modified code according to the 5.1 version.http://websamples.syncfusion.com/samples/Grid.Web/126.96.36.199/Forum-66566/main.htm
There is no need to use the code,
Once on defining the DataSource property, the Grid gets binded to the corresponding DataSource.
2. I have tried using the CurrentRecordContextChange event but the action EndEditCalled is never fired:
Please refer the below sample link in which the 'EndEditCalled' fired on the CurrentRecordContextChange event.http://websamples.syncfusion.com/samples/Grid.Web/188.8.131.52/Forum-64541-1/main.htm
In the sample the once the 'EndEditCalled' action is completed the Server side event GridGroupingControl1_CurrentRecordContextChange will help you to get the details of the Edited record as well as AddNew records.
3. Adding dropdownlistbox dynamically into the second column of the grid:
Could you please let us is your requirement is to add dropdownlistbox at the time of editing?
If your requirement is to add the template during the time of editing the below information will help you,
i. You can change the celltype of the column to 'ComboBox' if you want the dropdown to be displayed while editing.
Below is the sample link which will shown the dropdownlist on the column while editing.http://websamples.syncfusion.com/samples/Grid.Web/184.108.40.206/Incident-35505/main.htm
The records enters into editable mode on double clicking it. The 'CellType' of the 'City' field is set to 'ComboBox'. The 'ComboBox' is binded to the DataSource.
ii. You can also use templates at the runtime and design to add dropdownlistbox.
4. Firing the ItemSelectionChanged event for the dropdownlistbox:
The below code which is placed in the 'QueryCellStyleInfo' will help you to fire the 'SelectedIndexChanged' event.
if (e.TableCellIdentity.Column.Name == "Column2")
//Changes the EditItem template of the column specified as DropDownListBox
DropDownList dropdown = new DropDownList();
dropdown.AutoPostBack = true;
dropdown.SelectedIndexChanged += new EventHandler(dropdown_SelectedIndexChanged);
//Here we adding the DropDownListBox programatically using ITemplate Interface
TemplateClass mytemp = new TemplateClass(dropdown);
e.TableCellIdentity.Column.EditItemTemplate = mytemp;
5. Save changes to the DataTable.
You can use 'CurrentRecordContextChange' event to save the changes to the datatable.
6. How do I find out the value that is entered in a particular column of the grid?
To find out the updated values[edited values], you can use the 'CurrentRecordContextChange' event.
The below sample helps you to achieve the same.http://websamples.syncfusion.com/samples/Grid.Web/220.127.116.11/Forum-64541-1/main.htm
Please let us know if you have any other queries.