Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
138 views
I'm trying to handle a RadDock close command client side so that I can set some other booleans in javascript, but I can't figure it out. I tried doing:
<tel:DockCommand OnClientCommand="CloseEmail" />

then having a javascript function

function CloseEmail(sender, eventArgs) {
    if (sender.get_dockZoneID() != "") {
        showingEmailDetail = false;
        sender.set_closed(true);
    }
}

but that wasn't firing (I put an alert() in there that wasn't showing).
I also tried using
<tel:DockCloseCommand OnClientCommand="CloseEmail" />

but that didn't fire it either. The javascript function is declared globally. Any ideas?
Svetlina Anati
Telerik team
 answered on 11 Jan 2011
2 answers
70 views
I am having trouble getting my dock to save state when I move my panels.  Is there a way to make dock automatically trigger save state without clicking a button or something?  Also is there a way to make my controls auto refresh in my docks?  Like setup a timer in update panel. Thanks
Pero
Telerik team
 answered on 11 Jan 2011
2 answers
187 views
Hi guys,
I am using rad captcha in my site and want to prevent the user if
user type the wrong captcha test . So for this i am validate the captcha by coding.
But i am facing the problem that captcha always give Return false in if(radcaptcha1.isvalid) and print error.
Here my code of Default.aspx
<asp:Label ID="lblCaptcha" runat="server" ForeColor="Red"></asp:Label>
                           <telerik:RadCaptcha ID="RadCaptcha1" runat="server" validationgroup="Submit">
                        </telerik:RadCaptcha>
 <asp:UpdatePanel runat="server" ID="UPbtnUpload" >
                        <ContentTemplate>
                             <asp:ImageButton runat="server" ID="btnUpload" CssClass="btnAdd" ImageUrl="~/Images/btnUpload.jpg"
                                OnClick="btnUpload_OnClick" ValidationGroup="Submit" />
                                
                            </ContentTemplate>
                            <Triggers>
                            <asp:PostBackTrigger ControlID="btnUpload" />
                            </Triggers>
                        </asp:UpdatePanel>
And the code of default.aspx.cs is
protected void btnUpload_OnClick(object sender, EventArgs e)
       {
           RadCaptcha1.Validate();
          Page.Validate();
 
          
           if (RadCaptcha1.IsValid)
           {
                
               testimonial.ClubName = txtClub.Text;
               testimonial.Desciption = txtDiscription.Text;
               if (imageFileUpload.UploadedFiles.Count > 0)
               {
                   Guid guid = new Guid();
 
                   testimonial.FileName = imageFileUpload.UploadedFiles[0].FileName;
                   testimonial.FilePhysicalPath = imageFileUpload.TargetFolder;
                   testimonial.FileUrl = imageFileUpload.TargetFolder + imageFileUpload.UploadedFiles[0].FileName;
               }
               bool isCreated = KiwanisDataServices.CreateTestimonial(testimonial, ddlState.SelectedValue.ToString());
               ResetForm();
           }
           else
           {
               lblCaptcha.Enabled = true;
               lblCaptcha.Text = "The code you entered is not valid";
               return;
               //RadCaptcha1.ErrorMessage = "deepak";
           }
  Plz help me out for this problem there is any general solution of this.
I am structed with this problem plz telrik help me ya give me some example by this i can  accomplish it.
Pero
Telerik team
 answered on 11 Jan 2011
3 answers
192 views
Hi
I have a major prublem
 I have a grid and 4 check boxes   in User Control and they use in a MainGrid ,when I click on the Edit button in MainGrid, these components(gridUserControl and checkboxes ) fill but when I click on the Add New Record(whitout click on cancel button and close the edit ) they empty and don't bind . how can I bind them after clicking  add New Record?

the c# code is:

 

 

public partial class Permissions : System.Web.UI.Page

 

{

 

 

protected void Page_Load(object sender, EventArgs e)

 

{

rwmSuccessPM.Visible =

 

false;

 

}

 

 

private void InitalizeGroupGrid()

 

{

 

 

IQueryable<CDS.Savin.DataAccess.tS000Group> groups = CDS.Savin.Logic.BusinessObjects.UI.Groups.RetriveAll();

 

 

 

this.grdGroups.DataSource = groups;

 

 

 

this.grdGroups.DataBind();

 

}

 

 

protected void grdGroups_NeedDataSource(object source, GridNeedDataSourceEventArgs e)

 

{

 

 

IQueryable<CDS.Savin.DataAccess.tS000Group> groups = CDS.Savin.Logic.BusinessObjects.UI.Groups.RetriveAll();

 

 

 

this.grdGroups.DataSource = groups;

 

}

 

 

protected void grdGroups_EditCommand(object source, GridCommandEventArgs e)

 

{

 

 

GridDataItem item = (GridDataItem)e.Item;

 

rowindex = item.ItemIndex;

 

 

String id = item.GetDataKeyValue("GroupID").ToString();

 

Session[

 

"GroupID"] = id;

 

 

 

 

}

 

 

int rowindex = -1;

 

 

 

 

protected void grdGroups_ItemCommand(object source, GridCommandEventArgs e)

 

{

 

 

 

switch (e.CommandName)

 

{

 

 

case RadGrid.InitInsertCommandName:

 

{

 

 

 

break;

 

}

 

 

 

case "Delete":

 

{

 

e.Canceled =

 

false;

 

 

 

GridDataItem dataItem = (GridDataItem)e.Item;

 

 

 

String id = dataItem.GetDataKeyValue("GroupID").ToString();

 

 

 

try

 

{

CDS.Savin.Logic.BusinessObjects.UI.

 

Groups.Delete(int.Parse(id));

 

}

 

 

catch { rwmSuccessPM.Visible = true; }

 

InitalizeGroupGrid();

 

 

break;

 

}

}

 

}

 

 

protected void grdGroups_PreRender(object sender, EventArgs e)

 

{

 

 

if (grdGroups.MasterTableView.IsItemInserted)

 

{

 

 

GridEditFormInsertItem editItem = (GridEditFormInsertItem)grdGroups.MasterTableView.GetInsertItem();

 

System.Web.UI.

 

UserControl userControl = (System.Web.UI.UserControl)editItem.FindControl(GridEditFormItem.EditFormUserControlID);

 

 

 

TextBox txtbox = (TextBox)userControl.FindControl("txtGroupName");

 

 

 

RadGrid Grid1 = (RadGrid)userControl.FindControl("PermissionGrid");

 

 

 

 

 

 

 

//int? GroupID = CDS.Savin.Logic.BusinessObjects.UI.Groups.GroupID();

 

 

 

//Grid1.DataSource = CDS.Savin.Logic.BusinessObjects.UI.GroupPermissions.Retrieve(GroupID);

 

 

 

//Grid1.DataBind();

 

}

 

 

if (rowindex > -1)

 

{

 

}

 

}

 

 

protected void grdGroups_InsertCommand(object source, GridCommandEventArgs e)

 

{

}

 

 

protected void grdGroups_ItemDataBound(object sender, GridItemEventArgs e)

 

{

 

 

if (e.Item is GridEditFormItem && e.Item.IsInEditMode && !e.Item.OwnerTableView.IsItemInserted)

 

{

 

 

GridEditFormItem editItem = (GridEditFormItem)e.Item;

 

 

 

GridDataItem item = (GridDataItem)editItem.ParentItem;

 

System.Web.UI.

 

UserControl usercontrol1 = (System.Web.UI.UserControl)editItem.FindControl(GridEditFormItem.EditFormUserControlID);

 

 

 

TextBox txtbox = (TextBox)usercontrol1.FindControl("txtGroupName");

 

 

 

RadGrid Grid1 = (RadGrid)usercontrol1.FindControl("PermissionGrid");

 

 

 

IQueryable<CDS.Savin.DataAccess.tS000Group> GroupName = CDS.Savin.Logic.BusinessObjects.UI.Groups.RetriveGroupName(int.Parse(item.Cells[3].Text));

 

txtbox.Text = GroupName.First().GroupName;

 

 

ImageButton ImageButton1 = (ImageButton)usercontrol1.FindControl("ImageButton1");

 

ImageButton1.Visible =

 

false;

 

Grid1.Visible =

 

true;

 

 

 

CheckBox chkWrite = (CheckBox)usercontrol1.FindControl("chkWrite");

 

chkWrite.Visible =

 

true;

 

 

 

CheckBox chkRead = (CheckBox)usercontrol1.FindControl("chkRead");

 

chkRead.Visible =

 

true;

 

 

 

CheckBox chkModify = (CheckBox)usercontrol1.FindControl("chkModify");

 

chkModify.Visible =

 

true;

 

 

 

CheckBox chkDelete = (CheckBox)usercontrol1.FindControl("chkDelete");

 

chkDelete.Visible =

 

true;

 

Grid1.DataSource = CDS.Savin.Logic.BusinessObjects.UI.

 

GroupPermissions.Retrieve(int.Parse(item.Cells[3].Text));

 

Grid1.DataBind();

 

 

int kItems = Grid1.Items.Count;

 

 

 

for (int i = 0; i < kItems; i++)

 

{

CDS.Savin.DataAccess.

 

tS000GroupPermission groupPermision = new CDS.Savin.DataAccess.tS000GroupPermission();

 

groupPermision.GroupPermissionID =

 

int.Parse(Grid1.Items[i].OwnerTableView.DataKeyValues[Grid1.Items[i].ItemIndex]["ID"].ToString());

 

 

 

if ((Grid1.Items[i].FindControl("Modify") as CheckBox).Checked == false)

 

{

chkModify.Checked =

 

false; break;

 

}

 

 

else

 

chkModify.Checked =

 

true;

 

}

 

 

for (int i = 0; i < kItems; i++)

 

{

 

 

if ((Grid1.Items[i].FindControl("Delete") as CheckBox).Checked == false)

 

{

chkDelete.Checked =

 

false; break;

 

}

 

 

else

 

chkDelete.Checked =

 

true;

 

}

 

 

for (int i = 0; i < kItems; i++)

 

{

 

 

if ((Grid1.Items[i].FindControl("Read") as CheckBox).Checked == false)

 

{

chkRead.Checked =

 

false; break;

 

}

 

 

else

 

chkRead.Checked =

 

true;

 

}

 

 

for (int i = 0; i < kItems; i++)

 

{

 

 

if ((Grid1.Items[i].FindControl("Write") as CheckBox).Checked == false)

 

{

chkWrite.Checked =

 

false; break;

 

}

 

 

else

 

chkWrite.Checked =

 

true;

 

}

}

 

 

if (e.Item is GridEditFormInsertItem && e.Item.OwnerTableView.IsItemInserted )

 

{

 

 

GridEditFormInsertItem editItem = (GridEditFormInsertItem)e.Item;

 

System.Web.UI.

 

UserControl userControl = (System.Web.UI.UserControl)editItem.FindControl(GridEditFormItem.EditFormUserControlID);

 

 

 

TextBox txtbox = (TextBox)userControl.FindControl("txtGroupName");

 

 

 

RadGrid Grid1 = (RadGrid)userControl.FindControl("PermissionGrid");

 

 

 

 

Label lblAccess = (Label)userControl.FindControl("lblAccess");

 

 

 

 

 

 

if (txtbox.Text == "")

 

{

 

lblAccess.Visible =

 

false;

 

Grid1.Visible =

 

false;

 

 

 

CheckBox chkWrite = (CheckBox)userControl.FindControl("chkWrite");

 

chkWrite.Visible =

 

false;

 

 

 

CheckBox chkRead = (CheckBox)userControl.FindControl("chkRead");

 

chkRead.Visible =

 

false;

 

 

 

CheckBox chkModify = (CheckBox)userControl.FindControl("chkModify");

 

chkModify.Visible =

 

false;

 

 

 

CheckBox chkDelete = (CheckBox)userControl.FindControl("chkDelete");

 

chkDelete.Visible =

 

false;

 

}

 

 

int? GroupID = CDS.Savin.Logic.BusinessObjects.UI.Groups.GroupID();

 

Grid1.DataSource = CDS.Savin.Logic.BusinessObjects.UI.

 

GroupPermissions.Retrieve(GroupID);

 

Grid1.DataBind();

 

}

}

 

 

}
the aspx code is:

 

<%

 

@ Page Title="" Language="C#" MasterPageFile="~/Template/WebUI.Master" AutoEventWireup="true"

 

 

 

 

 

 

 

CodeBehind="Permissions.aspx.cs" Inherits="CDS.Savin.WebUI.S000.Permissions" %>

 

 

<%

 

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

 

 

 

<

 

 

asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

 

 

 

 

 

 

 

<style type="text/css">

 

 

 

 

 

 

 

.EditFormHeader td

 

 

 

 

 

{

 

 

background: white;

 

 

 

padding: 5px 0px;

 

}

 

 

</style>

 

 

 

 

 

</

 

 

asp:Content>

 

<

 

 

asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

 

 

 

 

 

 

 

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

 

 

 

 

 

<script type="text/javascript">

 

 

 

 

 

 

 

function RowDblClick(sender, eventArgs) {

 

sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());

}

 

 

</script>

 

 

 

 

 

 

 

</telerik:RadCodeBlock>

 

 

 

 

 

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

 

 

 

 

 

<AjaxSettings>

 

 

 

 

 

 

 

<telerik:AjaxSetting AjaxControlID="RadGrid1">

 

 

 

 

 

 

 

<UpdatedControls>

 

 

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

 

 

 

 

</UpdatedControls>

 

 

 

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

 

 

 

</AjaxSettings>

 

 

 

 

 

 

 

</telerik:RadAjaxManager>

 

 

 

 

 

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />

 

 

 

 

 

 

 

<telerik:RadGrid ID="grdGroups" runat="server" GridLines="None"

 

 

 

AllowPaging="True" CssClass="RadGrid"

 

 

 

 

 

 

 

AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="True"

 

 

 

Skin="Office2007" onneeddatasource="grdGroups_NeedDataSource"

 

 

 

 

onitemcommand="grdGroups_ItemCommand"

 

 

 

onprerender="grdGroups_PreRender" oneditcommand="grdGroups_EditCommand"

 

 

 

oninsertcommand="grdGroups_InsertCommand" onitemdatabound="grdGroups_ItemDataBound"

 

 

 

 

>

 

 

 

 

 

 

 

<MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="GroupID"

 

 

 

Dir="RTL">

 

 

 

 

 

 

 

<CommandItemSettings AddNewRecordText="??? ???? ????" RefreshText="????????" />

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

 

<telerik:GridTemplateColumn HeaderText="????">

 

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<%

 

# Container.DataSetIndex + 1 %>

 

 

 

</ItemTemplate>

 

 

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

 

 

<telerik:GridBoundColumn UniqueName="GroupID" HeaderText="?? ???? " Visible="false"

 

 

 

DataField="GroupID">

 

 

 

 

 

 

 

<HeaderStyle Width="60px"></HeaderStyle>

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

<telerik:GridBoundColumn UniqueName="GroupTitle" HeaderText="??? ???? "

 

 

 

DataField="GroupName">

 

 

 

 

 

 

 

<HeaderStyle Width="60px"></HeaderStyle>

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

<telerik:GridEditCommandColumn UniqueName="EditCommandColumn"

 

 

 

CancelText="??????" EditText="??????" UpdateText="?? ??? ?????">

 

 

 

 

 

 

 

</telerik:GridEditCommandColumn>

 

 

 

 

 

 

 

<telerik:GridTemplateColumn>

 

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

 

<asp:LinkButton ID="DeleteColumn" Text="???" CommandName="Delete" runat="server" OnClientClick="return confirm('??? ??????? ?? ??? ????? ??? ????');" CausesValidation="False"></asp:LinkButton>

 

 

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

<%

 

-- <telerik:GridButtonColumn UniqueName="DeleteColumn" Text="???" OnClientClick="return confirm('??? ??????? ?? ??? ????? ??? ????');"

 

CommandName="Delete" />--

 

 

%>

 

 

 

</Columns>

 

 

 

 

 

 

 

<EditFormSettings UserControlName="~/UserControls/Permission.ascx" EditFormType="WebUserControl">

 

 

 

 

 

 

 

<EditColumn UniqueName="EditCommandColumn1">

 

 

 

 

 

 

 

</EditColumn>

 

 

 

 

 

 

 

</EditFormSettings>

 

 

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

 

 

<ClientSettings>

 

 

 

 

 

 

 

<ClientEvents OnRowDblClick="RowDblClick" />

 

 

 

 

 

 

 

</ClientSettings>

 

 

 

 

 

<

 

 

HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>

 

 

 

 

 

 

 

</telerik:RadGrid><br />

 

 

 

 

 

 

 

<telerik:RadWindowManager ID="rwmSuccessPM" runat="server" CssClass="rtlstyle"

 

 

 

 

 

 

 

Visible="False" VisibleStatusbar="False" Height="185px" InitialBehaviors="Move"

 

 

 

 

 

 

 

Skin="Vista" Width="250px" Behavior="Default" InitialBehavior="Move">

 

 

 

 

 

 

 

<Windows>

 

 

 

 

 

 

 

<telerik:RadWindow ID="RadWindow2" runat="server" VisibleOnPageLoad="True" Behavior="Close,Move"

 

 

 

 

 

 

 

Behaviors="Move" InitialBehavior="Close" InitialBehaviors="Close" KeepInScreenBounds="True"

 

 

 

 

 

 

 

Modal="True" Left="" NavigateUrl="/Message/NotDelete.aspx" Style="display: none;"

 

 

 

 

 

 

 

Top="">

 

 

 

 

 

 

 

</telerik:RadWindow>

 

 

 

 

 

 

 

</Windows>

 

 

 

 

 

 

 

 

</telerik:RadWindowManager>

 

 

 

 

 

</

 

 

asp:Content>

 

 

 

 

the ascx code is:

<%

 

@ Control Language="C#" AutoEventWireup="true" CodeBehind="Permission.ascx.cs" Inherits="CDS.Savin.WebUI.UserControl.Permission" %>

 

<%

 

@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

 

<

 

 

style type="text/css">

 

 

 

.style1

 

{

 

 

width: 48%;

 

}

 

 

.style3

 

{

 

 

width: 21px;

 

}

 

 

.style4

 

{

 

 

width: 180px;

 

}

 

 

.style5

 

{

 

 

width: 129px;

 

}

 

 

.style6

 

{

 

 

width: 159px;

 

}

 

 

.style7

 

{

 

 

width: 87px;

 

}

</

 

 

style>

 

<

 

 

table class="style1" dir="rtl" style="font-family: tahoma; font-size: small;">

 

 

 

<tr>

 

 

 

<td class="style7">

 

 

 

<asp:Label ID="Label1" runat="server" Text="??? ????:"></asp:Label>

 

 

 

</td>

 

 

 

<td class="style5">

 

 

 

<asp:TextBox ID="txtGroupName" runat="server"></asp:TextBox>

 

 

 

</td>

 

 

 

<td class="style4">

 

 

 

<asp:RequiredFieldValidator ID="rfvGroupName" runat="server"

 

 

 

ErrorMessage="RequiredFieldValidator" ControlToValidate="txtGroupName"

 

 

 

ForeColor="Red">*</asp:RequiredFieldValidator>

 

 

 

<asp:ImageButton ID="ImageButton1" runat="server" Height="16px"

 

 

 

ImageUrl="~/Template/Images/icon-plus.png" onclick="ImageButton1_Click"

 

 

 

Width="16px" />

 

 

 

</td>

 

 

 

<td class="style3">

 

 

 

&nbsp;</td>

 

 

 

<td>

 

 

 

&nbsp;</td>

 

 

 

</tr>

 

 

 

 

<tr>

 

 

 

<td class="style7">

 

 

 

&nbsp;</td>

 

 

 

<td class="style5">

 

 

 

&nbsp;</td>

 

 

 

<td class="style4">

 

 

 

<table>

 

 

 

 

<tr><td colspan="40"></td><td>

 

 

 

<asp:CheckBox ID="chkWrite" runat="server" Text="???"

 

 

 

AutoPostBack="True"

 

 

 

Font-Size="Small" TextAlign="Left"

 

 

 

oncheckedchanged="chkWrite_CheckedChanged" /></td><td>

 

 

 

<asp:CheckBox ID="chkModify" runat="server" Text="?????"

 

 

 

AutoPostBack="True" Font-Size="Small"

 

 

 

TextAlign="Left" oncheckedchanged="chkModify_CheckedChanged" /></td><td>

 

 

 

<asp:CheckBox ID="chkRead" runat="server" Text="??????"

 

 

 

AutoPostBack="True" Font-Size="Small"

 

 

 

TextAlign="Left" oncheckedchanged="chkRead_CheckedChanged" /></td><td>

 

 

 

<asp:CheckBox ID="chkDelete" runat="server" Text="???"

 

 

 

AutoPostBack="True" Font-Size="Small"

 

 

 

TextAlign="Left" oncheckedchanged="chkDelete_CheckedChanged" /></td>

 

 

 

</tr>

 

 

 

</table>&nbsp;</td>

 

 

 

<td class="style3">

 

 

 

&nbsp;</td>

 

 

 

<td>

 

 

 

&nbsp;</td>

 

 

 

</tr>

 

 

 

 

<tr>

 

 

 

<td class="style7">

 

 

 

<asp:Label ID="lblAccess" runat="server" Text="?????? ??:"></asp:Label>

 

 

 

</td>

 

 

 

 

 

<td colspan="4">

 

 

 

<telerik:RadGrid ID="PermissionGrid" runat="server" Skin="Windows7" GridLines="None"

 

 

 

AutoGenerateColumns="False"

 

 

 

onitemcommand="PermissionGrid_ItemCommand" Width="50%"

 

 

 

>

 

 

 

<MasterTableView EditMode="InPlace" DataKeyNames="ID,Action_ID" ShowFooter="true">

 

 

 

<RowIndicatorColumn>

 

 

 

<HeaderStyle Width="20px" />

 

 

 

</RowIndicatorColumn>

 

 

 

<ExpandCollapseColumn>

 

 

 

<HeaderStyle Width="20px" />

 

 

 

</ExpandCollapseColumn>

 

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn DataField="ID" HeaderText="??" UniqueName="column" Visible="false">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="Title" HeaderText="?????" ReadOnly="true" UniqueName="column1">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="Action_ID" HeaderText="?? ????" Visible="false"

 

 

 

UniqueName="column2">

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridTemplateColumn HeaderText="?????">

 

 

 

<ItemTemplate>

 

 

 

<asp:CheckBox runat="server" ID="Write" Checked='<%# Eval("Write") %>' />

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridTemplateColumn HeaderText="?????">

 

 

 

<ItemTemplate>

 

 

 

<asp:CheckBox runat="server" ID="Modify" Checked='<%# Eval("Modify") %>' />

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridTemplateColumn HeaderText="??????">

 

 

 

<ItemTemplate>

 

 

 

<asp:CheckBox runat="server" ID="Read" Checked='<%# Eval("Read") %>' />

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<telerik:GridTemplateColumn HeaderText="???">

 

 

 

<ItemTemplate>

 

 

 

<asp:CheckBox runat="server" ID="Delete" Checked='<%# Eval("Delete") %>' />

 

 

 

</ItemTemplate>

 

 

 

 

</telerik:GridTemplateColumn>

 

<%

 

--<telerik:GridCheckBoxColumn DataField="Write" HeaderText="?????">

 

</telerik:GridCheckBoxColumn>

<telerik:GridCheckBoxColumn DataField="Modify" HeaderText="?????">

</telerik:GridCheckBoxColumn>

<telerik:GridCheckBoxColumn DataField="Read" HeaderText="??????">

</telerik:GridCheckBoxColumn>

<telerik:GridCheckBoxColumn DataField="Delete" HeaderText="???">

</telerik:GridCheckBoxColumn>--

 

 

%>

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

<HeaderStyle Font-Size="X-Small" />

 

 

 

<ItemStyle Font-Size="X-Small" />

 

 

 

<HeaderContextMenu EnableAutoScroll="True">

 

 

 

</HeaderContextMenu>

 

 

 

</telerik:RadGrid>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td align="right" colspan="5">

 

<%

 

-- <asp:Button ID="btnUpdate" Text="??????" runat="server" CommandName="Update" onclick="btnUpdate_Click"

 

>

</asp:Button>

<asp:Button ID="btnInsert" Text="???" runat="server" CommandName="PerformInsert" onclick="btnInsert_Click"

></asp:Button>--

 

 

%>

 

<

 

 

asp:Button ID="Button1"

 

 

 

Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'

 

 

 

runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button>

 

 

 

&nbsp;

 

<

 

 

asp:Button ID="btnCancel" Text="??????" runat="server" CausesValidation="False"

 

CommandName

 

 

="Cancel"></asp:Button>

 

 

 

</td>

 

 

 

</tr>

 

</

 

 

table>

 

 

hoda
Top achievements
Rank 1
 answered on 11 Jan 2011
2 answers
152 views
Hi all,

I have a RadGrid setup for in place editing.  On clicking a link on the page (but outside the grid) I want to programmatically add a row to the grid and insert some values into the controls.  So far I am able to put the grid into insert mode with the following code:

            rgrdTimesheet.MasterTableView.IsItemInserted = True
            rgrdTimesheet.Rebind()

How do I then get a reference to the insert row on the RadGrid?  And then get a reference to drop down lists within template columns on the RadGrid?

Thanks in advance.

Mike
Mike Sorel
Top achievements
Rank 1
 answered on 11 Jan 2011
3 answers
223 views
Hi,
    I am creating recurring appointment.I try to delete an appointment delete confirmation dialog popped up with two option
1.Delete this occurence
2.Delete series.

Now i want only to display (Delete series) option i am using following code,beacause of this delete Confirmation  dialog not shown.
function OnClientRecurrenceActionDialogShowing(sender, eventArgs)

    eventArgs.set_cancel(true);  
    eventArgs.set_editSeries(true);
}

Is there any way to show only one option i,e (Delete series) ? Can anyone Help ?


Thanks,
Ruchir
Ruchir
Top achievements
Rank 1
 answered on 11 Jan 2011
6 answers
106 views
Hi,

I'm evaluating these control for the last few weeks. So far looking good, but I've stumbled over the major issue.

- I'm using masterpages
- I have a single aspx page, which contains dynamically loaded usercontrol (let's call it UC1) using my factory. This user control contains another usercontrol (UC2), also loaded dynamically using factory.
- The RadGrid is defined in the UC1 container. I've set a rowSelected and rowSelecting event handler for this grid. Every time user selects a row, I want to update the panel in the UC2 user control. This works great.
- If the user is quick and changes row "during the running postback", I receive the "Property or method is not supported by this object". The source of this error is located somewhere in the telerik's JS source.
- rowSelecting and rowSelected handlers are not being called during the postback, the error happens prior to calling them.
- It looks like my handlers are not accessible. But I don't really understand how is this possible as the handler is defined in the UC1 and I'm updating small part of UC2 only. It is really annoying as I've quite a lot of these errors when controlling the grid using the keyboard.

Any ideas? Thanks.
Pavel
Top achievements
Rank 1
 answered on 11 Jan 2011
1 answer
42 views
Hello,

I have RadControls for ASP.NET AJAX 2009 Q1 v2009.1.527.35.

On my login page, I am using the ASP.NET LoginControl.  I also have the RadControls FormDecorator on this page with DecoratedControls="All".  However, the LoginControl is not being skinned.  I even tried converting the LoginControl to a Template but it still does not skin.

I noticed in a newer version of RadControls for ASP.NET AJAX that the LoginControl (and its relatives) are now skinned with the FormDecorator.  Updating to the newer version is not possible at this time.

Is there a way to skin the LoginControl with the version I currently have?

Thanks,

Randall Price
Virginia Tech
Georgi Tunev
Telerik team
 answered on 11 Jan 2011
8 answers
153 views

Hi all,

I am evaluating if the RadScheduler is fit for (our) use.

I have a very simple test project: a radscheduler with minimum plumbing (trivial datasource etc.)

If I set the DayEndTime to "23:40:00" and the MinutesPerRow to "26" I get the error:

"Microsoft JScript runtime error: 'this.cells.0.offsetHeight' is null or not an object"

in the line:

d.each(l.rows,function(){Array.add(n,this.cells[0].offsetHeight);

If I set the value of MinutesPerRow to "25" it does not crash, but 26 or higher and bam...

There are also other settings that crash but I report one here. It is reproducable on my system so it

never does not crash with the 23:40:00, 26 values.

Am I doing something wrong here?

regards,

Johan

Veronica
Telerik team
 answered on 11 Jan 2011
2 answers
60 views
Hi,

I have a question about the calendar control. I am having a multi-month view which displays 3 adjacent months. If , for example, I am currently viewing January, February and March, and I press the button for the next months, I get the next three months (April, May, June), which is probably the calendar's default behavior. Is there a way to make the calendar display for example (February, March, April) while performing the same action. Also if there is a way to control the number of months being preserved while switching to the next set it will be useful. This is needed to keep track of the previous month set's special dates while adding some new special dates to the current month set. Any clues will be well appreciated.

Thanks in advance.
Ivaylo
Top achievements
Rank 1
 answered on 11 Jan 2011
Narrow your results
Selected tags
Tags
+124 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?