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.
Unfortunately, activation email could not send to your email. Please try again.

My grid Cells doesn''t Refresh

Thread ID:

Created:

Updated:

Platform:

Replies:

77215 Oct 21,2008 02:20 AM Oct 22,2008 09:11 AM Windows Forms 3
loading
Tags: GridControl
solmaz Bahramian
Asked On October 21, 2008 02:20 AM

hi;
i used a grid control in my application.it has 2 combo box columns.i also have a listbox which has diffrent values.with selecting diffrent items in listbox the combo column should be refresh with new bound values (from a query based on listbox value).but the combo column doesn't refresh with changing listbox values.i was wondering if it is possible to find the best way for refreshing the bound combo box column .Thanks.


Nisha Arockiya A [Syncfusion]
Replied On October 21, 2008 03:19 AM

Hi Shayesteh,

Thanks for your interest in Syncfusion Products.

You can acheive this by refreshing that row after the selection has been done by handling the CurrentCellCloseDropDown event.



private void gridDataBoundGrid1_CurrentCellCloseDropDown(object sender, Syncfusion.Windows.Forms.PopupClosedEventArgs e)
{
GridDataBoundGrid grid = (GridDataBoundGrid)sender;
GridCurrentCell currentCell = grid.CurrentCell;

if(grid.Binder.NameToColIndex("Col1") == currentCell.ColIndex)
{
currentCell.ConfirmChanges();
grid.RefreshRange(GridRangeInfo.Row(currentCell.RowIndex));
}
}


Please let me know if this helps.

Regards,
Nisha



solmaz Bahramian
Replied On October 21, 2008 06:21 AM

thanks but it doen't work for me.because if i want my combo box column Refresh correctly,i should Click on another column first ,then click on my combo box column again.in this case it will refresh.so how can i refresh my combo box values whithout clicking on another columns of grid .i want refresh my combo box column in MyListView_SelectedIndexChanged() event.i mean when i change diffrent items in listbox ,The combo box column refresh.Thanks.


Nisha Arockiya A [Syncfusion]
Replied On October 22, 2008 09:11 AM

Hi shayesteh,

This can be achieved by using the CurrentCellShowingDropDown event. In the event, the datasource / cellvalue of the second column can be changed depending on the value selected in the first combobox column.

Refer to this forum thread for more details : Forum_42073

KB article : How do I change the DataSource of one ComboBox cell depending upon the value selected in another ComboBox cell in a GridDataBoundGrid?

Best regards,
Nisha


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.

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.

;