or
When I update an item in RadGrid, it updates my datasource but doesn't switch back to normal mode. The item still shows in edit mode. Here is what I have.
| <telerik:RadGrid ID="RadGrid1" ShowStatusBar="true" GridLines="None" runat="server" AllowAutomaticDeletes="True" |
| AllowAutomaticInserts="True" OnNeedDataSource="RadGrid1_NeedDataSource" PageSize="5" |
| AllowAutomaticUpdates="True" AllowPaging="True" MasterTableView-AllowAutomaticInserts="true" |
| AutoGenerateColumns="True" AutoGenerateDeleteColumn="true" AutoGenerateEditColumn="true" |
| OnInsertCommand="RadGrid1_InsertCommand" OnUpdateCommand="RadGrid1_UpdateCommand" |
| Skin="Web20" OnDeleteCommand="RadGrid1_DeleteCommand" OnColumnCreated="RadGrid1_ColumnCreated"> |
| <PagerStyle Mode="NextPrevAndNumeric" /> |
| <MasterTableView CommandItemDisplay="Top" Width="90%" DataKeyNames="id" > |
| <Columns> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
| protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e) |
| { |
| GridDataItem gridEditFormItem = (GridDataItem)e.Item; |
| Hashtable ht = new Hashtable(); |
| gridEditFormItem.ExtractValues(ht); |
| String ID = string.Empty; |
| foreach (DictionaryEntry entry in ht) |
| { |
| if (entry.Key.Equals("id")) |
| { |
| ID = entry.Value.ToString(); |
| break; |
| } |
| } |
| DataTable myTable = (DataTable)this.Session["myDatatable"]; |
| DataRow[] rowList = myTable.Select("id = '" + ID.ToString() + "'"); |
| foreach (DataRow dr in rowList) |
| { |
| foreach (DictionaryEntry entry in ht) |
| { |
| if (!entry.Key.Equals("id")) |
| dr[entry.Key.ToString()] = entry.Value; |
| } |
| } |
| Session["myDatatable"] = myTable; |
| RadGrid1.Rebind(); |
| } |
function
RowSelected(sender, eventArgs) {
var grid = sender;
}
RadScheduler1_TimeSlotCreated event.
Sub RadScheduler1_TimeSlotCreated(ByVal sender As Object, ByVal e As TimeSlotCreatedEventArgs)
e.TimeSlot.CssClass = "colorStyle1"
End Sub
However, i would like to set different background color for each group of the Room.
For example:
Room1: Background color = Green
Room2: Background color = Red
Is there anyway i am able to acheive this??
Your kind help is very much appreciated.
Thanks.
Lim
| // currently my RadComboBox client-id name is ddlTopic. | |
| // please substitute your proper combobox name appended by "_Arrow" | |
| Link radComboBoxDropDownImage = ie.Link(Find.ById("ddlTopic_Arrow")); | |
| radComboBoxDropDownImage.Click(); | |
| // my RadComboBox client-id name is ddlTopic | |
| // please substitute with your proper combobox name appended by "_DropDown" | |
| Div divTopic = ie.Div(Find.ById("ddlTopic_DropDown")); | |
| ElementCollection elColl = divTopic.ElementsWithTag("li"); | |
| // here i would like to select the 4th option inside the combo-box | |
| // the dropdownlist option index is started with 0 | |
| elColl[3].FireEvent("onmouseover"); | |
| elColl[3].Click(); |