6 Answers, 1 is accepted
0
Hi salini,
Thank you for your post.
You should subscribe to the CellBeginEdit event of your RadGridView instance and cancel the edit if the value in the selected cell is null. Please consider the following code snippet:
Feel free to ask if you have any further questions.
Sincerely yours,
Ivan Todorov
the Telerik team
Thank you for your post.
You should subscribe to the CellBeginEdit event of your RadGridView instance and cancel the edit if the value in the selected cell is null. Please consider the following code snippet:
private
void
radGridView1_CellBeginEdit(
object
sender, Telerik.WinControls.UI.GridViewCellCancelEventArgs e)
{
if
(e.Column
is
GridViewComboBoxColumn && e.Row.Cells[e.ColumnIndex].Value ==
null
)
{
e.Cancel =
true
;
}
}
Feel free to ask if you have any further questions.
Sincerely yours,
Ivan Todorov
the Telerik team
0

salini
Top achievements
Rank 1
answered on 03 Dec 2010, 01:39 PM
thanks for your reply...
i have another doubt
how can i refresh my gridview if i make any changes to the db by changing table values from another form.
if only single row values are changed,than i need to refresh only that row..
without any delay in reloading the whole table.
please help!
its urgent
i have another doubt
how can i refresh my gridview if i make any changes to the db by changing table values from another form.
if only single row values are changed,than i need to refresh only that row..
without any delay in reloading the whole table.
please help!
its urgent
0

Yulan
Top achievements
Rank 1
answered on 03 Dec 2010, 03:38 PM
Can someone tell me how to subscribe to the CellBeginEdit event of a RadGridView instance in QA Edition ? Thanks very much.
0
Hi salini,
Thank you for writing back.
If you are using the same data source for the two forms and your data items implement INotifyPropertyChanged then the grid should refresh the affected rows on its own. If not, then you can use the InvalidateRow() method to refresh one particular row:
I hope this will help you. If you need further help, please provide us with more details about your scenario.
@Yulan: I am not sure that I understand the meaning of "QA Edition", so we will be grateful if you provide us with additional details about this term. Usually, you should subscribe to the CellBeginEdit event by adding an event handler to it:
Best wishes,
Thank you for writing back.
If you are using the same data source for the two forms and your data items implement INotifyPropertyChanged then the grid should refresh the affected rows on its own. If not, then you can use the InvalidateRow() method to refresh one particular row:
this
.radGridView1.Rows[i].InvalidateRow();
I hope this will help you. If you need further help, please provide us with more details about your scenario.
@Yulan: I am not sure that I understand the meaning of "QA Edition", so we will be grateful if you provide us with additional details about this term. Usually, you should subscribe to the CellBeginEdit event by adding an event handler to it:
this
.radGridViewInstance.CellBeginEdit +=
new
Telerik.WinControls.UI.GridViewCellCancelEventHandler(
this
.radGridView1_CellBeginEdit);
Best wishes,
Ivan Todorov
the Telerik team
0

salini
Top achievements
Rank 1
answered on 09 Dec 2010, 07:46 AM
Hello Ivan
my data items implement INotifyPropertyChanged ,still grid view isn't refreshed each time i change any value
I also tried with InvalidateRow(), this is also nat working.
please help!
my data items implement INotifyPropertyChanged ,still grid view isn't refreshed each time i change any value
I also tried with InvalidateRow(), this is also nat working.
please help!
0
Hi salini,
Your data source object must implement IBindingList in order to notify the grid of the changes that are made to items. Another issue might be that you are not using the same data-source object reference for both forms. Doing so, changes in the database that are committed by one of the data sources could not be reflected back to the other data-source because the database cannot notify it. Try using the same data source object for your two forms if applicable. Otherwise, changes to the database can only be reflected by reloading the whole grid.
You can check the help section in our site concerning the data binding of the grid.
I hope this was helpful. If you have any further questions, please open a support ticket and send us a sample project that demonstrates your scenario, so we could get familiar with it in details and provide you with the appropriate answers.
Greetings,
Ivan Todorov
the Telerik team
Your data source object must implement IBindingList in order to notify the grid of the changes that are made to items. Another issue might be that you are not using the same data-source object reference for both forms. Doing so, changes in the database that are committed by one of the data sources could not be reflected back to the other data-source because the database cannot notify it. Try using the same data source object for your two forms if applicable. Otherwise, changes to the database can only be reflected by reloading the whole grid.
You can check the help section in our site concerning the data binding of the grid.
I hope this was helpful. If you have any further questions, please open a support ticket and send us a sample project that demonstrates your scenario, so we could get familiar with it in details and provide you with the appropriate answers.
Greetings,
Ivan Todorov
the Telerik team