Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
78 views
I'm getting an error: get_postBackElement().id' is null or not an object. This only occurs when I add in the RadAjaxManager, so I'm fairly sure it has something to do with that. This doesn't seem all that complicated. Am I missing something?

ASPX 

    <telerik:RadAjaxManager ID="RadAjaxManager222" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="Timer1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="improvementRadGrid" LoadingPanelID="improvementLoading" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
 
 
 
<h1> Improvement Day Inventory </h1>
<br />
 
<telerik:RadAjaxLoadingPanel ID="improvementLoading" runat="server" />
<telerik:RadGrid ID="improvementRadGrid" runat="server" AutoGenerateColumns="false" DataSourceID="inventoryDataSource">
    <MasterTableView>
        <Columns>
            <telerik:GridBoundColumn DataField="Description" HeaderText="Description" />
            <telerik:GridBoundColumn DataField="Count" HeaderText="Quanitity" HeaderStyle-Font-Bold="true" ItemStyle-Font-Bold="true" />
            <telerik:GridBoundColumn DataField="MinimumQuantity" HeaderText="Min" />
            <telerik:GridBoundColumn DataField="MaximumQuantity" HeaderText="Max" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
 
<asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick" />
 
<asp:SqlDataSource ID="inventoryDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:AssetWhereConnectionString %>"
SelectCommand="ImprovementDay" SelectCommandType="StoredProcedure"></asp:SqlDataSource>


C#

public void Timer1_Tick(object sender, EventArgs e)
{
    improvementRadGrid.Rebind();
}
Iana Tsolova
Telerik team
 answered on 24 Oct 2011
1 answer
322 views
Hi telerik team,

This is my code here Delete command is not working. any body please help me,

aspx page:

<%@ Page Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"  CodeBehind="WebLunchMenu.aspx.cs"   Inherits="FSSAdminUI.WebLunchMenu" Title="Untitled Page" EnableEventValidation="false" %> this is page directive i have used

<telerik:RadGrid ID="gvWeblunchMenuItems" runat="server" Width="100%" CssClass="RadGrid"
                                GridLines="None" AllowPaging="True" PageSize="10" AllowSorting="True" AutoGenerateColumns="False"
                                ShowStatusBar="false" AllowAutomaticDeletes="false" AllowAutomaticInserts="false"
                                AllowAutomaticUpdates="false" HorizontalAlign="NotSet" OnItemDataBound="gvWeblunchMenuItems_ItemDataBound"
                                OnItemCreated="gvWeblunchMenuItems_ItemCreated" Style="margin-top: 0px" >
                                <PagerStyle HorizontalAlign="Center" Mode="NumericPages"></PagerStyle>
                                <MasterTableView CommandItemDisplay="Top" EditMode="PopUp">
                                    <HeaderStyle Font-Bold="true" Font-Names="Arial" />
                                    <Columns>
                                        <telerik:GridButtonColumn CommandName="Delete" Text="Delete" ConfirmDialogType="RadWindow"
                                            ConfirmText="Do you want to delete the Calander" UniqueName="DeleteColumn" ButtonType="ImageButton"
                                            ImageUrl="~/image/Delete_Grd.png">
                                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="25px"></ItemStyle>
                                        </telerik:GridButtonColumn>
                                        <telerik:GridBoundColumn UniqueName="WebCalID" HeaderText="Web CalID" DataField="WebCalID"
                                            Visible="false">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridTemplateColumn AllowFiltering="False" ShowFilterIcon="False" HeaderText=" Calendar Name"
                                            UniqueName="TemplateColumn" FilterControlWidth="30px">
                                            <ItemTemplate>
                                                <asp:HiddenField ID="hdWebCalID" runat="server" Value='<%#Eval("WebCalID") %>'></asp:HiddenField>
                                                <asp:LinkButton ID="lbCalendarname" CommandName="Details" runat="server" Text='<%#Eval("Calendarname")%>'></asp:LinkButton>
                                            </ItemTemplate>
                                            <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="150px"></ItemStyle>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn AllowFiltering="False" ShowFilterIcon="False" HeaderText=" Calendar Type"
                                            UniqueName="TemplateColumn" FilterControlWidth="30px">
                                            <ItemTemplate>
                                                <asp:Label ID="lblCalendarType" runat="server" Text='<%#Eval("calendarType")%>'></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="150px"></ItemStyle>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridBoundColumn DataField="SchoolNames" AllowSorting="False" ShowFilterIcon="False"
                                            HeaderText=" Assigned Schools" UniqueName="catagoryname" FilterControlWidth="50px">
                                            <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="300px"></ItemStyle>
                                        </telerik:GridBoundColumn>
                                        <telerik:GridTemplateColumn AllowFiltering="False" ShowFilterIcon="False" HeaderText="Edit Assigned Schools"
                                            UniqueName="TemplateColumn1" FilterControlWidth="30px">
                                            <ItemTemplate>
                                                <telerik:RadComboBox ID="rcschools" runat="server" Height="150px" Width="110px" DropDownWidth="200px"
                                                    Text="       -  Select  - " HighlightTemplatedItems="true" MarkFirstMatch="true"
                                                    EnableLoadOnDemand="true" Visible="true" OnClientFocus="OnFocus" EnableViewState="true"
                                                    ToolTip="Create" EmptyMessage="select" OnClientDropDownClosing="">
                                                    <ItemTemplate>
                                                        <table width="150px" border="0" cellspacing="1" cellpadding="0">
                                                            <tr>
                                                                <td align="left" width="50px">
                                                                    <asp:CheckBox runat="server" ID="chk1" Checked="false" />
                                                                </td>
                                                                <td align="left" width="150px">
                                                                    <asp:Label ID="lblSchoolname" runat="server" Text='<%#Eval("SchoolName")%>'></asp:Label>
                                                                    <asp:HiddenField ID="hdAvailableSchoolID" runat="server" Value='<%#Eval("Id") %>' />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </ItemTemplate>
                                                    <FooterTemplate>
                                                        <center>
                                                            <asp:ImageButton ID="imgbtnAssign" ImageUrl="~/image/save_btn.gif" OnClientClick="showdisplaylayer();"
                                                                runat="server" OnClick="imgbtnAssign_click" /></center>
                                                    </FooterTemplate>
                                                </telerik:RadComboBox>
                                                <center>
                                                    <asp:ImageButton ID="imgbtnAS" ToollTip="Click here to Assign schools" BorderWidth="50px"
                                                        ImageUrl="~/image/Picked-Up.gif" runat="server" Visible="false" /></center>
                                            </ItemTemplate>
                                            <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="150px"></ItemStyle>
                                        </telerik:GridTemplateColumn>
                                    </Columns>
                                    <CommandItemTemplate>
                                        <img src="~/image/AddRecordRad.gif" runat="server" style="cursor: hand;" id="imgShow"
                                            onclick="return ShowInsertForm();" alt="" />
                                        <a href="#" onclick="return ShowInsertForm();">Add new Calander</a>
                                    </CommandItemTemplate>
                                    <CommandItemStyle Height="30px" VerticalAlign="Middle" />
                                </MasterTableView>
                            </telerik:RadGrid>


cs page:


  protected void Page_Load(object sender, EventArgs e)
        {                     
         
            int pPageIndex = Convert.ToInt32(hdPageIndex.Value);
            int pPageSize = Convert.ToInt32(hdPageSize.Value);

            if (Request.QueryString["DistrictID"] != null)
            {
                Session["DistrictID"] = Request.QueryString["DistrictID"].ToString();// 33;
                hdDistrictID.Value = Request.QueryString["DistrictID"].ToString();
            }
            else
            {
                Response.Redirect("~/Login.aspx");
            }

           
                getWeblunchMenuItemsByKeyword(txtSearch.Text, pPageIndex, pPageSize);
                hdPopupResult.Value = "False";                      

           
            gvWeblunchMenuItems .DeleteCommand +=new GridCommandEventHandler(gvWeblunchMenuItems_DeleteCommand);
                       
        }

 void gvWeblunchMenuItems_DeleteCommand(object source, GridCommandEventArgs e)
        {
            int pPageIndex = Convert.ToInt32(hdPageIndex.Value);
            int pPageSize = Convert.ToInt32(hdPageSize.Value);
            string pKeyword = txtSearch.Text;

            int webcalID = Convert.ToInt32(((Telerik.Web.UI.GridTableRow)e.Item).Cells[3].Text);
            FSSAdmin.MenuLogic.WebLunchCalendar.DelWebLunchCalendarData(webcalID);
            FSSAdmin.MenuLogic.Cal.DelWebLunchSchedule(webcalID);
                
            getWeblunchMenuItemsByKeyword(txtSearch.Text, pPageIndex, pPageSize);
        }


gvWeblunchMenuItems_DeleteCommand event is not firing.
Shinu
Top achievements
Rank 2
 answered on 24 Oct 2011
1 answer
127 views
How can I make RadTextBox enter only numbers?
Shinu
Top achievements
Rank 2
 answered on 24 Oct 2011
1 answer
78 views
Hello,

I am using radupload.How can I check file size?
Shinu
Top achievements
Rank 2
 answered on 24 Oct 2011
1 answer
149 views
Hi there,

I am following the code from the link below. It is great. However, there are two questions that I would like to ask.
http://www.telerik.com/community/code-library/preview-thread/aspnet-ajax/grid/storing-multiple-grid-settings-in-database-via-profile.aspx

1. When I turn on AllowFilterByColumn, it works fine when I re-login. However, it does not display the value in the filter TextBox or CheckBox. For example, I put "Net 60 Days" in the filter TextBox and select "Contains". After I re-login, I see the same result, but I don't see the text "Net 60 Days" inside the filter TextBox.

2. The column reorder and sorting seem to work fine, but not for paging. How do I accomplish that?

Thank you,

Sompop

This is a profile section in my web.config.
    <profile enabled="true" defaultProvider="MyProfileProvider">
      <providers>
        <add name="MyProfileProvider" connectionStringName="myConnectionString" applicationName="/" type="System.Web.Profile.SqlProfileProvider"/>
      </providers>
      <properties>
        <add name="GridAssetSettings" allowAnonymous="false" type="GridAssetSettings" serializeAs="Binary"/>  
</properties>
    </profile>

In .cs of the page where there is a RadGrid

protected override void Render(HtmlTextWriter writer)
{
  base.Render(writer);

  GridAssetSettings gas = new GridAssetSettings();
  gas.SaveGridAssetSettingsNames(RadGridSaveGridSettingsUserBase, "RadGridSaveGridSettingsUserBase");
  Context.Profile.SetPropertyValue("GridAssetSettings", gas);
}

protected void Page_Init(object sender, EventArgs e)
{
  if (Context.Profile.GetPropertyValue("GridAssetSettings") != null)
  {
    GridAssetSettings gas = (GridAssetSettings)Context.Profile.GetPropertyValue("GridAssetSettings");

    if (gas.Names.ContainsKey("RadGridSaveGridSettingsUserBase"))
      {
         GridSettings settings = new GridSettings(RadGridSaveGridSettingsUserBase);
         settings.LoadSettings(gas.Names["RadGridSaveGridSettingsUserBase"].ToString());
      }
    }
  }
}
Pavlina
Telerik team
 answered on 24 Oct 2011
3 answers
113 views
Hi,

I am using radUpload to upload multiple files at a time. I need to check file's size each time user selects a file. For that using "onclientfileselected="selectedFile" in radUpload control.

Below is the code in "selectedFile" javascript function.

  var inputs = sender.getFileInputs();
  size = inputs[i].files[0].fileSize;

But it shows "size" undefined.
Before some days, I was getting correct size, but now it is not working. I've not updated Telerik's version or anything like that. What could cause this kind of issue?

Please reply at the earliest as it is live on the site.
Peter Filipov
Telerik team
 answered on 23 Oct 2011
0 answers
61 views
Please ignore/delete this thread.  I tried a different approach.  Unfortunately, that didn't work out for me.  it's here if anybody wants to follow up.
golddog
Top achievements
Rank 1
 asked on 23 Oct 2011
5 answers
137 views
Hi ,
     I am trying to bind the data to  telerick tree view dataSoure .But the data not getting into binded to the tree  view.Telerick tree view is not rendering to the page with data in ItemCommand event.


Please find the code below which I am using to bind the data tree view in ItemCommand event

 

protected void radGridHierarchies_ItemCommand(object source, GridCommandEventArgs e)

 

{

 

if (e.CommandName == "RowClick" && radGridHierarchies.SelectedItems.Count == 1)

 

{

 

int datascopeId = Convert.ToInt32(radGridHierarchies.SelectedValues["DatasourceId"]);

 

 

int dimensionId = Convert.ToInt32(radGridHierarchies.SelectedValues["DimensionId"]);

 

 

string hierName = radGridHierarchies.SelectedValues["HierarchyName"].ToString();

 

datascopeId = 11;

 

List<CharHierLevel> lstHierLevel = _presenter.GetCharHierLevelDetails(datascopeId, dimensionId, hierName);

 

radTreeCharHierLevel.DataTextField =

"HierarchyLevelName";

 

radTreeCharHierLevel.DataValueField =

"HierarchyLevelName";

 

radTreeCharHierLevel.DataFieldID =

"HierarchyLevelName";

 

radTreeCharHierLevel.DataFieldParentID =

"HierarchyLevelParent";

 

radTreeCharHierLevel.DataSource = lstHierLevel;

radTreeCharHierLevel.DataBind();

}

 

}

Note:The issue I could not find in design time .if any one got this king of issue the Immediate help will be highly appreciated

awni
Top achievements
Rank 1
 answered on 22 Oct 2011
1 answer
148 views
HI,

I am trying to bind image to radBinaryImage in serverside. but its not working.
Please refer my code.

string BefFileNAMe, AftFileName;
       if (e.Item.ItemType == RadListViewItemType.DataItem || e.Item.ItemType == RadListViewItemType.AlternatingItem)
       {
           RadBinaryImage imgBeforePhoto = (RadBinaryImage)e.Item.FindControl("imgBeforePhoto");
           imgBeforePhoto.ImageUrl = Server.MapPath("~/Image/5SLanding/Before/") + beforePhoto.FileName;
        }

It is giving following error in Chrome debugger.
Not allowed to load local resource: path/Image/5SLanding/Before/82before-5s.JPG
I cheked the path. The path is correct.
Please help me to solve this. 
Thanks
Andrew Galea
Top achievements
Rank 1
 answered on 22 Oct 2011
4 answers
181 views
Hello everybody

I'm new in Telerik controls and this is my first post here. I'm trying to create a nested Radgrids of two levels where each record of parent will be related to two child records. I'm trying to use RadMultiPage with RadTabStrip to display the two childs as a radgrid.

The skeleton of my code is like this
<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
    </telerik:RadScriptManager>
    <asp:SqlDataSource ID="SqlDataSource1" ></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" ></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource3" ></asp:SqlDataSource>
    <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" >
        <MasterTableView DataSourceID="SqlDataSource1">
            <NestedViewTemplate>
                <telerik:RadTabStrip ID="RadTabStrip1" MultiPageID="RadMultiPage1">
                    <Tabs>
                        <telerik:RadTab PageViewID="PageView1"></telerik:RadTab>
                        <telerik:RadTab PageViewID="PageView2"></telerik:RadTab>
                    </Tabs>
                </telerik:RadTabStrip>
                <telerik:RadMultiPage ID="RadMultiPage1">
                    <telerik:RadPageView ID="PageView1">
                        <telerik:RadGrid ID="RadGrid2" DataSourceID="SqlDataSource2" >
                            <MasterTableView DataSourceID="SqlDataSource2">
                                <Columns>
                                    <telerik:GridBoundColumn></telerik:GridBoundColumn>
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                    </telerik:RadPageView>
                    <telerik:RadPageView ID="PageView2">
                        <telerik:RadGrid ID="RadGrid3" DataSourceID="SqlDataSource3">
                            <MasterTableView DataSourceID="SqlDataSource3">
                                <Columns>
                                        <telerik:GridBoundColumn></telerik:GridBoundColumn>
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                    </telerik:RadPageView>
                </telerik:RadMultiPage>
            </NestedViewTemplate>
            <Columns>
                <telerik:GridBoundColumn></telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
</form>

I removed unnecessary code.

With this skeleton and when I click on the each records, it show the tabs but it did not list any records. I thought at the beginning that the problem of missing <ParentTableRelation> tag, but how to make the nested radgrid related to its parent. The problem that I could not use <GridTableView> because I could not integrate it with RadMultipage and RadTabStrip controls.

I want something like this example.

Any Idea plz?

Mohammed
Jayesh Goyani
Top achievements
Rank 2
 answered on 22 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?