Hi,
I would like to know if you have an easy way to implement Undo-Redo on all node action (Moving, deleting, adding, rename, drag and drop from one control to another, etc...)?
The only way I found is to save all the control structure in xml temp file after each change but this way is absolutely not efficient... I would like to know if there is a better and faster way.
Thanks in advance for your help.
Best regards,
Fred
private void searchListBox(object sender, EventArgs e) |
{ |
int count = 0; |
foreach (RadListBoxItem item in this.lbLiveClients) |
{ |
if(item.DescriptionText == this.txtFindLiveClient.Text) |
{ |
this.lbLiveClients.SelectedIndex = count; |
break; |
} |
count++; |
} |
} |
for (int i = 0; i < this.lbLiveClients.Items.Count; i++) |
{ |
this.lbLiveClients.Items[i]. |
} |
Hi,
I am displaying customer data [Id, Name and Address] in grid view. I also need to display some calculated value “Customer Points” in the grid. For the “Customer Points” I have added a GridViewTextBoxColumn “txtCustomerPoints” to the grid.
For displaying data in “txtCustomerPoints” i am using the CellFormatting Event as below:
private void RadGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
{
try
{
string columnUniqueName = ((GridViewDataColumn)e.CellElement.ColumnInfo).UniqueName;
if (columnUniqueName == "txtCustomerPoints " )
{
if (IsColumnExistsInGrid(RadGridView1.MasterGridViewTemplate, columnUniqueName))
{
RadGridView1.GridElement.BeginUpdate();
e.CellElement.RowInfo.Cells[columnUniqueName].Value = "Some Calculated Value";
RadGridView1.GridElement.EndUpdate();
}
}
}
catch (Exception ex)
{
throw ex;
}
}
But this generate an error on this line:
e.CellElement.RowInfo.Cells[columnUniqueName].Value = "Some Calculated Value";
The error is:
ex = {"Object reference not set to an instance of an object."}
StackTrace " at MSMainPrj.FormsEmbedded.Booking. RadGridView1_ValueChanging(Object sender, ValueChangingEventArgs e) in D:\\Users\\Yaqub.Ahmad\\CS2\\trunk\\code\\MSMainPrj\\FormsEmbedded\\Booking.cs:line 1755\r\n at Telerik.WinControls.UI.RadGridView.OnValueChanging(Object sender, ValueChangingEventArgs e)\r\n at Telerik.WinControls.UI.RadGridView.CallValueChanging(Object sender, ValueChangingEventArgs e)\r\n at Telerik.WinControls.UI.GridViewCellInfo.set_Value(Object value)\r\n at MSMainPrj.Libraries.TelerikGridHelper.SetGridColumnValue(RadGridView grid, CellFormattingEventArgs e, String columnName, Object value) in D:\\Users\\Yaqub.Ahmad\\CS2\\trunk\\code\\MSMainPrj\\Libraries\\TelerikGridHelper.cs:line 292" string
TargetSite {Void RadGridView1_ValueChanging(System.Object, Telerik.WinControls.UI.ValueChangingEventArgs)} System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}
Kindly help me to update a custom column's value.
Thanks.