protected void RadDockLayout1_LoadDockLayout(object sender, DockLayoutEventArgs e)
{
Widget _widget = new Widget();
List<DockState> _currentDockStates = _widget.GetCurrentDockStates((Session[TCSessionConst.SessionFrmDefault_XpoUser] as XpoUser).KeyID, DebugFormName);
foreach (DockState state in _currentDockStates)
{
e.Positions[state.UniqueName] = state.DockZoneID;
e.Indices[state.UniqueName] = state.Index;
}
}
protected void RadDockLayout1_SaveDockLayout(object sender, DockLayoutEventArgs e)
{
List<DockState> stateList = RadDockLayout1.GetRegisteredDocksState();
StringBuilder serializedList = new StringBuilder();
Widget _widget = new Widget();
List<DockState> _currentDockStates = _widget.GetCurrentDockStates((Session[TCSessionConst.SessionFrmDefault_XpoUser] as XpoUser).KeyID, DebugFormName);
bool state_closed;
foreach (DockState _dockState in stateList)
{
state_closed = false;
foreach (DockState _dockState2 in _currentDockStates)
{
if (_dockState2.UniqueName == _dockState.UniqueName)
{
if (_dockState2.Closed)
{
state_closed = true;
serializedList.Append(_dockState2.ToString());
serializedList.Append(";");
}
}
}
if (!state_closed)
{
serializedList.Append(_dockState.ToString());
serializedList.Append(";");
}
}
string dockState = serializedList.ToString();
if (dockState.Trim() != String.Empty)
{
DbUtils.SetUserSetting((Session[TCSessionConst.SessionFrmDefault_XpoUser] as XpoUser).KeyID, "Default", "WidgetState", dockState);
}
}
private RadDock CreateRadDockFromState(DockState state)
{
Widget widget = new Widget();
XPOWidgetSettings xpoWidgetSettings = widget.getWidgetSettingsObjectById(state.UniqueName);
RadDock dock = new RadDock();
dock.DockMode = DockMode.Docked;
dock.ID = string.Format("RadDock{0}", state.UniqueName);
dock.ApplyState(state);
DockExpandCollapseCommand cmd = new DockExpandCollapseCommand();
dock.Commands.Add(cmd);
return dock;
}
private RadDock CreateRadDock(string oid, string displayName, string widgetSettings)
{
RadDock dock = new RadDock();
dock.DockMode = DockMode.Docked;
dock.UniqueName = oid;
dock.ID = string.Format("RadDock{0}", dock.UniqueName);
DockCloseCommand closeCmd = new DockCloseCommand();
dock.Commands.Add(closeCmd);
DockExpandCollapseCommand cmd = new DockExpandCollapseCommand();
dock.Commands.Add(cmd);
return dock;
}
private void CreateSaveStateTrigger(RadDock dock)
{
//Ensure that the RadDock control will initiate postback
// when its position changes on the client or any of the commands is clicked.
//Using the trigger we will "ajaxify" that postback.
dock.AutoPostBack = true;
dock.CommandsAutoPostBack = true;
AjaxUpdatedControl updatedControl = new AjaxUpdatedControl();
updatedControl.ControlID = "Panel1";
AjaxSetting setting1 = new AjaxSetting(dock.ID);
setting1.EventName = "DockPositionChanged";
setting1.UpdatedControls.Add(updatedControl);
AjaxSetting setting2 = new AjaxSetting(dock.ID);
setting2.EventName = "Command";
setting2.UpdatedControls.Add(updatedControl);
RadAjaxManager1.AjaxSettings.Add(setting1);
RadAjaxManager1.AjaxSettings.Add(setting2);
}
private void LoadUserWidgets()
{
Widget widget = new Widget();
string radDockID;
string displayName;
string settingString;
List<DockState> _currentDockStates = widget.GetCurrentDockStates((Session[TCSessionConst.SessionFrmDefault_XpoUser] as XpoUser).KeyID, DebugFormName);
XPCollection widgetSettingsObjectsByUserLevel = widget.getWidgetSettingsObjectsByUserLevel((Session[TCSessionConst.SessionFrmDefault_XpoUser] as XpoUser).Userrole);
Boolean _doContinue;
foreach (XPOWidgetSettings _widgetSetting in widgetSettingsObjectsByUserLevel)
{
_doContinue = false;
radDockID = _widgetSetting.Oid.ToString();
displayName = _widgetSetting.DisplayName;
settingString = _widgetSetting.Settings;
foreach (DockState _ds in _currentDockStates)
{
if (_ds.UniqueName == radDockID)
_doContinue = true;
}
if (_doContinue) continue;
RadDock dock = CreateRadDock(radDockID, displayName, settingString);
//find the target zone and add the new dock there
//adding the dock to the docklayout and then docking it to the zone to avoid ViewState issues on subsequent postback
RadDockLayout1.Controls.Add(dock);
dock.Dock(DZCenter);
CreateSaveStateTrigger(dock);
//Load the selected widget in the RadDock control
dock.Tag = _widgetSetting.AscxFile;
LoadWidget(dock);
}
}
private void LoadWidget(RadDock dock)
{
string siteUrl = TCFramework.TCConfigSettings.HostUrlGroups + Session[TCSessionConst.SessionFrmDefault_SelGroup];
string userName = (Session[TCSessionConst.SessionFrmDefault_XpoUser] as XpoUser).Username;
string password = (Session[TCSessionConst.SessionFrmDefault_XpoUser] as XpoUser).GetPassword();
string ascxFile = "";
string settings = "";
string oId = dock.UniqueName;
Widget widget = new Widget();
XPOWidgetSettings xpoWidgetSettings = widget.getWidgetSettingsObjectById(oId);
ascxFile = xpoWidgetSettings.AscxFile;
settings = xpoWidgetSettings.Settings;
Control widgetControl = LoadControl(ascxFile);
if (widgetControl != null)
dock.ContentContainer.Controls.Add(widgetControl);
}
private void CreateDocksFromStateDB()
{
Widget _widget = new Widget();
List<DockState> _currentDockStates = _widget.GetCurrentDockStates((Session[TCSessionConst.SessionFrmDefault_XpoUser] as XpoUser).KeyID, DebugFormName);
for (int i = 0; i < _currentDockStates.Count; i++)
{
RadDock dock = CreateRadDockFromState(_currentDockStates[i]);
dock.Visible = !_currentDockStates[i].Closed;
RadDockLayout1.Controls.Add(dock);
//We want to save the dock state every time a dock is moved.
if (dock.Visible) CreateSaveStateTrigger(dock);
}
}
protected void Page_Init(object sender, EventArgs e)
{
CreateDocksFromStateDB();
}
protected void Page_Load(object sender, EventArgs e)
{
foreach (RadDock _rd in RadDockLayout1.RegisteredDocks)
try
{
LoadWidget(_rd);
}
catch
{
//error in loading widget _rd.
}
if (!IsPostBack)
{
LoadUserWidgets();
}
}
Default.aspx
<div>
<telerik:RadDockLayout ID="RadDockLayout1" runat="server"
onloaddocklayout="RadDockLayout1_LoadDockLayout"
onsavedocklayout="RadDockLayout1_SaveDockLayout">
<table width="100%" cellpadding="12px">
<tr>
<td width="25%" valign="top">
<telerik:RadDockZone ID="DZLeft" runat="server" BackColor="#BFDBFF"
ForeColor="#BFDBFF">
</telerik:RadDockZone>
</td>
<td width="50%" valign="top">
<telerik:RadDockZone ID="DZCenter" runat="server" BackColor="#BFDBFF"
Visible="True" ForeColor="#BFDBFF">
</telerik:RadDockZone>
</td>
<td width="25%" valign="top">
<telerik:RadDockZone ID="DZRight" runat="server" BackColor="#BFDBFF"
ForeColor="#BFDBFF">
</telerik:RadDockZone>
</td>
</tr>
</table>
</telerik:RadDockLayout>
</div>
<div style="width: 0px; height: 0px; overflow: hidden; position: absolute; left: -10000px;">
Hidden UpdatePanel, which is used to help with saving state when minimizing, moving
and closing docks. This way the docks state is saved faster (no need to update the
docking zones).
<asp:UpdatePanel runat="server" ID="UpdatePanel1">
</asp:UpdatePanel>
</div>

Occurs in IE11, IE10, or IE9 (Works in IE8).
Unable to select other rows in copied table or edit table cells.

I have run into a whole bunch of problems with the editor control on iPhone/Safari devices in the latest release. The .focus() client-side method doesn't appear to work when inside a timeout. In this case, the editor can never receive focus either. Touching inside the editor does not bring up the keyboard.
Without a timeout, the editor receives focus and the keyboard comes up, however, when users type, no letters are displayed. THe cursor moves along as if typing is occurring, but nothing is shown in the editor. I tried the Lightweight RenderMode, which didn't look very good in iOS. I tried the Mobile Rendermode, which displayed better, but didn't function properly. Typing in the editor would display a white screen which covered the rest of the site and could never be recovered.
I have reverted back to a previous version of the controls (Q1). Needing to do this is becoming an all-too frequent occurrence.

Hi:
I copy those code from local demo on my empty and practice site.
<telerik:RadMediaPlayer RenderMode="Lightweight" ID="RadMediaPlayer1" runat="server" AutoPlay="true"
Height="360px" Width="640px">
<PlaylistSettings YouTubePlaylist="PLvmaC-XMqeBb991YNEWAHYL9ZJAeURr-r" Mode="Buttons" ButtonsTrigger="MouseDown" />
</telerik:RadMediaPlayer>
but when I run, only media player and other nothig.
The same code on local demo can run very well, What's happen on my site ?

protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e){ if ((e.CommandName == RadGrid.PerformInsertCommandName) || (e.CommandName == RadGrid.UpdateCommandName)) { GridEditableItem saveableItem = (GridEditableItem)e.Item; SaveItems(saveableItem, e.Item.OwnerTableView.IsItemInserted);
}
}
aspx: <telerik:GridTemplateColumn UniqueName="TemplateColumn" SortExpression="LastName"> <ItemTemplate> <asp:checkbox ID="checkColumn" runat="server" /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn DataField="OrderID" DataType="System.Int32" HeaderText="OrderID" ReadOnly="True" SortExpression="OrderID" UniqueName="OrderID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ProductID" DataType="System.Int32" HeaderText="ProductID" ReadOnly="True" SortExpression="ProductID" UniqueName="ProductID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="UnitPrice" DataType="System.Decimal" HeaderText="UnitPrice" SortExpression="UnitPrice" UniqueName="UnitPrice"> </telerik:GridBoundColumn> </Columns> aspx.cs: ArrayList selectedItems; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ViewState["Selected"] = null; } } private void RememberSelected() { selectedItems = new ArrayList(); int index = -1; // foreach (GridDataItem row in RadGrid1.MasterTableView.Items)//RadGrid1.Items) foreach (GridDataItem row in RadGrid1.Items) { index = (int)row.GetDataKeyValue("ProductID"); bool result = ((CheckBox)row.FindControl("CheckColumn")).Checked; // Check in the Session if (ViewState["Selected"] != null) selectedItems = (ArrayList)ViewState["Selected"]; if (result) { if (!selectedItems.Contains(index)) selectedItems.Add(index); } else selectedItems.Remove(index); } if (selectedItems != null && selectedItems.Count > 0) ViewState["Selected"] = selectedItems; } protected void RadGrid1_PageIndexChanged(object source, Telerik.Web.UI.GridPageChangedEventArgs e) { RememberSelected(); } protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) { if (selectedItems != null) { if (e.Item is GridDataItem) { GridDataItem row = (GridDataItem)e.Item; int index = (int)row.GetDataKeyValue("ProductID"); if (selectedItems.Contains(index)) { e.Item.Selected = true; } } } } protected void RadGrid1_SortCommand(object source, GridSortCommandEventArgs e) { RememberSelected(); } 
<telerik:radgrid ID="RadGrid1" runat="server" >
</telerik:radgrid>
private void Loadprogramaticgrid()
{
RadGrid1.MasterTableView.DataKeyNames = new string[] { "username" };
RadGrid1.Skin = "Default";
RadGrid1.Width = Unit.Percentage(100);
RadGrid1.AutoGenerateColumns = false;
//Add columns
GridBoundColumn boundColumn;
boundColumn = new GridBoundColumn();
boundColumn.DataField = "username";
boundColumn.HeaderText = "username";
RadGrid1.MasterTableView.Columns.Add(boundColumn);
boundColumn = new GridBoundColumn();
boundColumn.DataField = "firstname";
boundColumn.HeaderText = "firstname";
RadGrid1.MasterTableView.Columns.Add(boundColumn);
boundColumn = new GridBoundColumn();
boundColumn.DataField = "lastname";
boundColumn.HeaderText = "lastname";
RadGrid1.MasterTableView.Columns.Add(boundColumn);
}
protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
RadGrid1.DataSource = loaddata();
}
and i have a Button and in button click i rebind the grid as
protected void Button1_Click(object sender, EventArgs e)
{
RadGrid1.Rebind();
}
now the problem is for first time the grid binds and display the data in grid.
When i click the button the grid is not binding correctly.
i have attached the image for more referance.
Hi,
I'm porting some old code to Telerik and I'm having issues. This application has a grid and two of the columns contains hyperlinks that would execute java code to open a non-modal windows to present more details on the items with hyperliks
In the old code, this solved by a template like this:
<ItemTemplate>
<asp:HyperLink ID="hplnkCatalogDetails" runat="server" ToolTip='Click To View Details' Text='<%# Eval("ID") %>' NavigateUrl="<%#String.Format("javascript:void(window.showModalDialog('CatalogDetailsPopUp.aspx?id={0}','','dialogHeight:500px;dialogWidth:850px'));", Eval("ID")) %>" />
</ItemTemplate>
However this solution fails to execute if using this solution with Telerik GridTemplateColumn :
<telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="Catalog" UniqueName="TemplateColumn" DataField="ID">
<ItemTemplate>
<asp:HyperLink ID="hplnkCatalogDetails2" runat="server" ToolTip='Click To View Details'
Text='<%# Eval("ID") %>' NavigateUrl="<%#String.Format(& quot;javascript:void(window.showModalDialog ('CatalogDetailsPopUp.aspx?id={0}','','dialogHeight:500px;dialogWidth:850px'));", Eval("ID")) %>" />
</ItemTemplate>
</telerik:GridTemplateColumn>
and this other approach does not work neither using GridHyperLinkColumn:
<telerik:GridHyperLinkColumn AllowSorting="False" DataTextField="ID" FilterControlAltText="Filter column column" HeaderText="Catalog" UniqueName="colID"
NavigateUrl= ""<%#String.Format(& quot;javascript:void(window.showModalDialog('CatalogDetailsPopUp.aspx?id={0}','','dialogHeight:500px;dialogWidth:850px'));", Eval("ID")) %>""
DataNavigateUrlFields="ID"
DataNavigateUrlFormatString="javascript:void(window.showModalDialog('CatalogDetailsPopUp.aspx?id={0}','','dialogHeight:500px;dialogWidth:850px'))" >
</telerik:GridHyperLinkColumn>
How should I address this?