We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ComboBox events

Thread ID:

Created:

Updated:

Platform:

Replies:

73505 May 8,2008 01:17 PM UTC May 9,2008 03:06 PM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
-
Asked On May 8, 2008 01:17 PM UTC

Hi, is there a way to capture the OnChange event from a cell of CellType = "ComboBox", in a GridGroupingControl, at the stage when creating a new entry or editing an existing entry?
I have the following situation: An item is selected from ComboBox1 and upon selecting such an item, ComboBox2 is to be updated respectively. Thanks.


Janagan [Syncfusion]
Replied On May 9, 2008 03:06 PM UTC

Hi,

Thanks for your interest in Syncfusion products.

You can retrive the values in one dropdownlist in the grid based on selection of values in the other dropdown as mentioned in the code below:



protected void GridGroupingControl1_QueryCellStyleInfo(object sender,Syncfusion.Web.UI.WebControls.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{

if (e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell || e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell)
{

if (e.TableCellIdentity.Column.MappingName == "DropDownSection")
{

DropDownList firstdropdownList, seconddropdownList;
firstdropdownList = new DropDownList();
seconddropdownList = new DropDownList();
Panel panel = new Panel();
panel.Controls.Add(firstdropdownList);
panel.Controls.Add(seconddropdownList);
firstdropdownList.AutoPostBack = true;
seconddropdownList.AutoPostBack = true;

PopulateFirstDropDown(firstdropdownList);
PopulateSecondDropDown(seconddropdownList);

firstdropdownList.SelectedIndexChanged += new EventHandler(firstdropdownList_SelectedIndexChanged);
seconddropdownList.SelectedIndexChanged += new EventHandler(seconddropdownList_SelectedIndexChanged);

TemplateClass mytemp = new TemplateClass(panel);
GridGroupingControl1.TableDescriptor.Columns.FindByMappingName("DropDownSection").ItemTemplate = mytemp;

}
}
}



http://websamples.syncfusion.com/samples/Grid.Web/6.1.0.34/29283_378a085c/29283/main.htm

Please try running the sample and let me know if this helps.

Thanks,
Janagan.




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;