Hi!
I have a radGrid on the page, which has a [AddNew] button that will trigger a <EditFormSettings> popup window.
Also, when users click on the Edit button on each row, I also have a code-behind ImgBtn.Attributes.Add("onclick", sb.ToString()) that will popup a window for users to edit data.
My problem now is when I click on the Edit button of the gridrow, both windows popup.
It was fine before I add DetailWin.focus to bring the popup to front. How can I fix this?
Attached is my code, thanks in advaned.
SH.
(aspx)
<
telerik:RadGrid
ID
=
"RadGd1"
AutoGenerateColumns
=
"false"
PageSize
=
"10"
AllowPaging
=
"true"
ShowFooter
=
"true"
AllowSorting
=
"true"
ShowStatusBar
=
"true"
AutoGenerateDeleteColumn
=
"false"
AllowAutomaticInserts
=
"false"
OnItemCreated
=
"RadGd1_ItemCreated"
OnNeedDataSource
=
"RadGd1_NeedDataSource"
OnItemDataBound
=
"RadGd1_ItemDataBound"
Width
=
"90%"
Skin
=
"Simple"
runat
=
"server"
>
<
MasterTableView
DataKeyNames
=
"FormId"
CommandItemDisplay
=
"Top"
CommandItemSettings-AddNewRecordText
=
"Add New"
>
<
CommandItemTemplate
>
<
asp:LinkButton
ID
=
"lkBtnAdd"
runat
=
"server"
CommandName
=
"InitInsert"
Visible='<%# !RadGd1.MasterTableView.IsItemInserted %>'>
<
img
style
=
"border:0px;vertical-align:bottom; height:16px; margin-top:6px;position:relative; float:left"
alt
=
"Add New"
src
=
"../images/document_add.png"
/>新增
</
asp:LinkButton
>
<
div
style
=
"padding-left:20px"
></
div
>
</
CommandItemTemplate
>
<
Columns
>
<
telerik:GridEditCommandColumn
UniqueName
=
"EditCmdCol"
ButtonType
=
"ImageButton"
ItemStyle-CssClass
=
""
ColumnGroupName
=
"cmdGroup"
EditImageUrl
=
"~/images/edit_data_20x19.png"
ItemStyle-Width
=
"20"
ItemStyle-Height
=
"19"
>
<
HeaderStyle
/>
</
telerik:GridEditCommandColumn
>
<
telerik:GridButtonColumn
UniqueName
=
"SaveAsDocCmdCol"
ButtonType
=
"ImageButton"
ItemStyle-CssClass
=
""
ColumnGroupName
=
"cmdGroup"
ImageUrl
=
"~/images/doc_save_as.png"
ItemStyle-Width
=
"16"
ItemStyle-Height
=
"16"
>
</
telerik:GridButtonColumn
>
<
telerik:GridButtonColumn
UniqueName
=
"SaveAsPdfCmdCol"
ButtonType
=
"ImageButton"
ItemStyle-CssClass
=
""
ColumnGroupName
=
"cmdGroup"
ImageUrl
=
"~/images/pdfDownload_4.png"
ItemStyle-Width
=
"16"
ItemStyle-Height
=
"16"
>
</
telerik:GridButtonColumn
>
<
telerik:GridBoundColumn
HeaderText
=
"CustomerName"
DataField
=
"CustomerName"
UniqueName
=
"CustomerName"
ItemStyle-Width
=
"70px"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
HeaderText
=
"Created Time"
DataField
=
"CreateDT"
UniqueName
=
"CreateDT"
ItemStyle-Width
=
"100px"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
HeaderText
=
"Updated Time"
DataField
=
"SentDT"
UniqueName
=
"SentDT"
ItemStyle-Width
=
"100px"
></
telerik:GridBoundColumn
>
</
Columns
>
<
EditFormSettings
UserControlName
=
"../UserControl/UCNewCSDetail.ascx"
EditFormType
=
"WebUserControl"
PopUpSettings-Height
=
"600px"
PopUpSettings-Width
=
"800px"
PopUpSettings-ScrollBars
=
"Vertical"
PopUpSettings-Modal
=
"true"
>
<
EditColumn
UniqueName
=
"EditCmdFrm"
></
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
<
ClientSettings
>
<
ClientEvents
OnPopUpShowing
=
"PopUpShowing"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
--------------------------------------------------------
(aspx.cs)
protected void RadGd1_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridDataItem oItem = (GridDataItem)e.Item;
string strFormId = RadGd1.MasterTableView.DataKeyValues[e.Item.ItemIndex]["FormId"].ToString();
StringBuilder sb = new StringBuilder();
sb.Append("var DetailWin = window.open");
sb.Append("('");
sb.Append("CSDetail.aspx?FormId=" + strFormId);
sb.Append("',");
sb.Append("'NewWindow',");
sb.Append("'scrollbars=yes,status=no,location=no,resizable=yes,Height=650,Width=1000,top=80,left=200'");
sb.AppendLine("); "); //return false;
sb.AppendLine("DetailWin.focus();");
ImageButton elemImgBtn = (ImageButton)oItem["EditCmdCol"].Controls[0];
elemImgBtn.Attributes.Add("href", "javscript:void(0);");
elemImgBtn.Attributes.Add("onclick", sb.ToString());
}
}
Suppose I have a radgrid that displays records from a database table. The radgrid has an edit template, for editing these records. Inside the edit template is a user control. The user control has a textbox.
The question: How can I examine the contents of the textbox in the user control from the main page, client side? By main page, I mean the page that contains the radgrid. Is this even possible?
I've not been able to figure it out so far.
Hello,
I need move production website from one server to another. I'm not developer and I can see JavaScript throws error "Telerik not defined" on line below. I moved all bin folders etc. GAC does not have those assemblies. I can see Telerik.Web.UI.dll in BIN folder. Original web.config in place as well. Is it license issue or what do I do? Entries in web.config are below
<httpHandlers>
<add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
<add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.3.1314.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" />
<add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.3.1314.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" />
</httpHandlers>
<add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" scriptProcessor="" resourceType="Either" requireAccess="Read" />
<add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />
<add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.3.1125.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />
WebForm_InitCallback();Sys.Application.add_init(function() {
$create(Telerik.Web.UI.RadComboBox, {"_dropDownW
Hi Guys,
I have used RadGrid with batchupdate. I have datalist, When I choose one item from DataList (Product code, Name, Quantity, Quom..), I want to add a new row into Radgrid and auto fill product code, name, quantity.. that I had chossen from Datalist.
I have function below:
I$("[id*=btnAddNewD]").live("click", function () {
var prdccode = $("[id*=lblPrdcCode]", $(this).closest("table")).html();
var prdcname = $(this).parent().parent().parent().find("input[type=hidden]").val();
addNewItem(prdccode, prdcname);
return false;
});
function addNewItem(prdccode, prdcname) {
var grid = $find('<%=RadGrid1.ClientID%>');
var grid_master = grid.get_masterTableView()
var grid_batchmanager = grid.get_batchEditingManager()
grid_batchmanager.addNewRecord(grid_master);
var newItem = grid_master.get_dataItems()[0]
var v_prdccode = newItem.get_cell("PrdcCode");
var newItem1 = grid_master.get_dataItems()[0]
var v_prdcname = newItem1.get_cell("MPrdcNme");
setTimeout(function () {
grid.get_batchEditingManager().changeCellValue(v_prdccode, prdccode); => change
grid.get_batchEditingManager().changeCellValue(v_prdcname, prdcname); => Not change
}, 0);
}
...but only first column was changed value. please help me.
Thanks.
<
telerik:RadSearchBox
ID
=
"rsbSearch"
runat
=
"server"
InputType
=
"Text"
TextSettings-SelectionMode
=
"Single"
DataSourceID
=
"SqlSearchDataSource"
DataValueField
=
"ID"
OnDataSourceSelect
=
"rsbSearch_DataSourceSelect"
EmptyMessage
=
"Rechercher"
Width
=
"250px"
MaxResultCount
=
"5"
>
<
SearchContext
ShowDefaultItem
=
"false"
DataKeyField
=
"Titre"
>
<
Items
>
<
telerik:SearchContextItem
Text
=
"Nouvelle"
Key
=
"News"
/>
<
telerik:SearchContextItem
Text
=
"Bottin"
Key
=
"Bottin"
/>
</
Items
>
</
SearchContext
>
<
DropDownSettings
CssClass
=
"rsbSearchPopUp"
>
<
ItemTemplate
>
<
asp:PlaceHolder
ID
=
"test1"
runat
=
"server"
>
<
table
class
=
"tableNews"
style
=
"z-index:200;"
>
<
tbody
>
<
tr
>
<
td
class
=
"actualityDescription"
>
<
table
>
<
tr
>
<
td
>.............
protected
void
rsbSearch_DataSourceSelect(
object
sender, SearchBoxDataSourceSelectEventArgs e)
{
SqlDataSource source = (SqlDataSource)e.DataSource;
RadSearchBox mySearchBox = (RadSearchBox)sender;
string
filterString = e.FilterString;
if
(e.SelectedContextItem !=
null
&& e.SelectedContextItem.Key.ToLower() ==
"news"
)
{
source.SelectCommand =
"SELECT TOP 100 * FROM [NewsData] WHERE DescriptionCourte Like '%"
+ filterString +
"%'"
+
" OR Titre Like '%"
+ filterString +
"%'"
+
" OR DescriptionLongue Like '%"
+ filterString +
"%'"
;
}
else
{
//mySearchBox.DataSource = Intranet.BL.Employe.GetEmployees(true, filterString);
}
}
Hi, I want something like
http://demos.telerik.com/aspnet-ajax/tabstrip/examples/multipage/dynamic-pageview-creation/defaultcs.aspx
but I don't want to create any RadPageView in server-side way, but only use the RadPageViews already created client-side.
Until now, I have
a RadMultiPage with RenderSelectedPageOnly="true"
and in RadTabStrip AutoPostBack="true"
.... I totally want to avoid postbacks.
Is possible?