or
<
telerik:RadDatePicker
ID
=
"RadDatePicker1"
runat
=
"server"
/>
RadGrid1_RowDataBound
event. I can this event called up but the label comes up NULL. Can someone please advice how I can achieve this? Thanks.<
telerik:RadGrid
ID
=
"RadGrid1"
PageSize
=
"10"
AutoGenerateColumns
=
"false"
runat
=
"server"
>
<
MasterTableView
TableLayout
=
"Fixed"
DataKeyNames
=
"itemid"
ClientDataKeyNames
=
"itemid"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblDetail"
runat
=
"server"
Text
=
""
></
asp:Label
>
</
ItemTemplate
>
</
MasterTableView
>
<
GroupingSettings
CaseSensitive
=
"false"
/>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
></
PagerStyle
>
<
ClientSettings
>
<
ClientEvents
OnRowCreated
=
"OnRowCreated"
OnRowDblClick
=
"OnRowDblClick"
OnCommand
=
"RadGrid1_Command"
OnRowDataBound
=
"RadGrid1_RowDataBound"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
function
RadGrid1_RowDataBound(sender, args)
{
var
lbl = args.get_element().findElement(
"lblDetail"
);
lbl.innerHTML =
"This is test"
;
}
using
System;
using
System.Web.UI;
using
Telerik.Web.UI;
using
System.IO;
public
partial
class
_Default : System.Web.UI.Page
{
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!Page.IsPostBack)
{
AddTab(
"Home"
,
"Home"
);
AddPageView(DaveRadTabStrip.FindTabByText(
"Home"
));
AddTab(
"Apps"
,
"Applications Created by Dave"
);
AddTab(
"Blog"
,
"Blog"
);
AddTab(
"Contact"
,
"Contact Dave"
);
}
/* Using jQuery's document.ready method would only attach the fancybox when the page first loads,
* which is too early because the content in the RadMultiPage control has not loaded yet and will not
* work on the other tabs because the content is being loaded using AJAX, so the javascript call
* at the top of the page does not attach itself to those newly loaded elements.
*
* The piece of javascript needs to be called on each ajax request so it sets up the fancybox on
* those links. (That is why it is not included in the "if" statement above). To do that, modify the ResponseScripts collection of the RadAjaxManager in your
* AddPageView method:
*/
RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
manager.ResponseScripts.Add(
"$(\"a.lib\").fancybox({ 'transitionIdn': 'fade','transitionOut': 'fade' });"
);
}
private
void
AddTab(
string
tabName,
string
tabText)
{
RadTab tab =
new
RadTab();
tab.Text = tabText;
tab.Value = tabName;
this
.DaveRadTabStrip.Tabs.Add(tab);
}
protected
void
DaveRadMultiPage_PageViewCreated(
object
sender, RadMultiPageEventArgs e)
{
string
userControlName = @
"~/UserControls/"
+ e.PageView.ID +
".ascx"
;
Control userControl = Page.LoadControl(userControlName);
userControl.ID = e.PageView.ID +
"_userControl"
;
e.PageView.Controls.Add(userControl);
}
private
void
AddPageView(RadTab tab)
{
RadPageView pageView =
new
RadPageView();
pageView.ID = tab.Value;
DaveRadMultiPage.PageViews.Add(pageView);
tab.PageViewID = pageView.ID;
}
protected
void
DaveRadTabStrip_TabClick(
object
sender, RadTabStripEventArgs e)
{
AddPageView(e.Tab);
e.Tab.PageView.Selected =
true
;
}
}