Hai! I have editable radgrid with two columns..one is subject column and another one is marks column..I have dropdownlist_index changed event..In this event change subject's depend on dropdownlist selected value in grid..In run time I enter marks in marks column and then click button1..In button1 click event I need to get the value of editable column...but I can not get run time editable value..I can get only column default value that is 0..why i cannot get the runtime edited value.. can anyone help me?
protected void Button1_Click(object sender, EventArgs e)
{
foreach (GridEditableItem grdRow in grdMarksEntry.Items)
{
string str = (grdRow["Marks"].Controls[0] as TextBox).Text;
}
}
protected void grdMarksEntry_ItemCreated(object sender, GridItemEventArgs e)
{
for (int i = 0; i <= grdMarksEntry.PageSize; i++)
{
grdMarksEntry.EditIndexes.Add(i);
}
}
protected void grdMarksEntry_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
{
if (e.Column.UniqueName == "Id")
{
e.Column.Visible =
false;
}
}
protected void DDLCourses_SelectedIndexChanged(object sender, EventArgs e)
{
SqlConnection Cnn = new SqlConnection();
Cnn.ConnectionString =
@"Data Source=DEVI\SQLEXPRESS;Initial Catalog=Acarin_SchoolManagement;Integrated Security=True";
Cnn.Open();
DataSet ds = new DataSet();
SqlCommand cmd = new SqlCommand("SELECT SubjectName,Id FROM [tblCourseSubject] WHERE ([CourseId] = '" + DDLCourses.SelectedValue + "' )", Cnn);
SqlDataReader dr = cmd.ExecuteReader();
DataTable dt = new DataTable("StudentMarks");
dt.Load(dr,
LoadOption.OverwriteChanges);
ds.Tables.Add(dt);
DataColumn dc = new DataColumn("Marks", System.Type.GetType("System.Int32"));
dc.DefaultValue =
"0";
dc.ReadOnly =
false;
ds.Tables[
"StudentMarks"].Columns.Add(dc);
ds.Tables[
"StudentMarks"].Columns[0].ReadOnly = true;
grdMarksEntry.DataSource =
null;
grdMarksEntry.DataSource = ds;
grdMarksEntry.DataBind();
}
Hello, Telerik Team
I got a problem to register the httphandler for the captcha control. Like this document says I placed this two codes in the web.config
But as this is done I still get this error on my page.
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'Telerik.Cms.Web.UI' or one of its dependencies. The system cannot find the file specified.
Source Error:
|
|
Version Information: Microsoft .NET Framework Version:2.0.50727.4016; ASP.NET Version:2.0.50727.4016
Hope you guyes can help me out with this problem.
Thanks in advance,
Jeroen Speldekamp
if
(_d[i].id==this._getUpdatePanelID()) where object is expected as "this" is null..
My Code ...
MainUserControl.ascx
<%
@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<% @ Register src="../ToolTips/ToolTipInfo.ascx" tagname="ToolTipInfo" tagprefix="uc3" %>
<
telerik:RadToolTipManager ID="RadToolTipManager1"
runat="server" Position="Center"
OnAjaxUpdate="ToolTip_OnAjaxUpdate">
</telerik:RadToolTipManager>
<
telerik:RadGrid ID="ClientUserRadGrid" runat="server" EnableEmbeddedSkins="False"
Skin="Shepherd"
AutoGenerateColumns="false"
onitemdatabound="UserDetailRadGrid_ItemDataBound"
onpagesizechanged="ClientUserRadGrid_PageIndexChanged" AllowSorting="True"
OnItemCommand="ClientUserRadGrid_ItemCommand"
AllowPaging="True" PageSize="40" onneeddatasource="User_NeedDataSource"
AllowFilteringByColumn="true" onitemcreated="ClientUserRadGrid_ItemCreated">
<
HeaderContextMenu Skin="Shepherd" EnableEmbeddedSkins="False" EnableTheming="True">
<
CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</
HeaderContextMenu>
<PagerStyle AlwaysVisible="True" Mode="NextPrevAndNumeric" PagerTextFormat="{4} Page {0} of {1},items {2} to {3} of {5}" />
<
MasterTableView DataKeyNames="UserID" AllowMultiColumnSorting="true">
<
RowIndicatorColumn>
<
HeaderStyle Width="20px"></HeaderStyle>
</
RowIndicatorColumn>
<
ExpandCollapseColumn>
<
HeaderStyle Width="20px"></HeaderStyle>
</
ExpandCollapseColumn>
<
Columns>
<telerik:GridBoundColumn DataField="UserName" HeaderText="Logon Name"
UniqueName="UserName" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Department" HeaderText="Department"
UniqueName="Department" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Name" HeaderText="Name"
UniqueName="Name" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ProductType" HeaderText="Product Type"
UniqueName="ProductType">
</telerik:GridBoundColumn>
</Columns>
</ MasterTableView>
< FilterMenu Skin="Shepherd" EnableEmbeddedSkins="False" EnableTheming="True">
<
CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</
FilterMenu>
</
telerik:RadGrid>
MainUserControl.ascx.cs
protected
void UserDetailRadGrid_ItemDataBound(object sender, GridItemEventArgs e)
{
if
(e.Item is GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
RadToolTipManager1.TargetControls.Add(e.Item.ClientID, e.Item.OwnerTableView.DataKeyValues[0][
"UserID"].ToString(),true);
}
}
protected
void ToolTip_OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
{
Control ctrl = LoadControl("ToolTipInfo.ascx");
args.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl);
ToolTipInfo Info = (ToolTipInfo)ctrl; // this is a control with a only one label and trying to set a text to that Label
Info.LabelText = args.Value;
}
And that is all I have done to get the tooltip, but keep experiencing js error..
thanks,
DIP
<
telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btnDelete">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" />
<telerik:AjaxUpdatedControl ControlID="RadGrid2" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" />
<telerik:AjaxUpdatedControl ControlID="RadGrid2" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RadGrid2">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" />
<telerik:AjaxUpdatedControl ControlID="RadGrid2" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<
telerik:RadWindow
ID="PostWindow"
runat="server"
Modal="true"
BackColor="Gray"
Behavior="None"
InitialBehaviors="Pin"
ShowContentDuringLoad="false"
Title="Add/Edit Post (Fields in BOLD are required!)"
Width="650"
Height="470"
ReloadOnShow="true"
DestroyOnClose="true"
KeepInScreenBounds="true"
BorderStyle="None"
OnClientClose="refreshGrid1()"
>
</telerik:RadWindow>
1) when user clicks on close button it passes arg value called 'editPost'
<
telerik:RadScriptBlock runat="server">
<script type="text/javascript">
function refreshGrid1(arg)
{
$find(
"<%= RadAjaxManager1.ClientID %>").ajaxRequest(arg);
}
</script>
</telerik:RadScriptBlock>
2) RadAjaxManager1_AjaxRequest is then fired and the following code is performed but nothing happens
if
(isPost)
{
radGrid = radGrid2;
RadGrid1.MasterTableView.Rebind();
radGrid.MasterTableView.Rebind();