Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
279 views
Hi Telerik,

I have RadGrid inside FormTemplate of RadTreeList. I have called an "ItemCommand" event on RadGrid that bascially deleted the uploaded files when user clicks the delete button within ItemTemplate of RadGrid. All its happening is good. But as soon as deletion gets done I'm trying to rebind the RadGrid , but its giving me EXCEPTION.

RadGrid element is null.

Can you help me ?

Below is my code:-
protected void FilesRadGrid_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
    {
        foreach (TreeListDataItem item in KnowledgeBaseRadTreeList.Items)
        {
            RadGrid FilesRadGrid = item.FindControl("FilesRadGrid") as RadGrid;
 
            if (e.CommandName == "Del")
            {
                string[] values = e.CommandArgument.ToString().Split(':'); // ID:FilePath
                if (System.IO.File.Exists(Server.MapPath(values[1])))
                {
                    try
                    {
                        System.IO.File.Delete(Server.MapPath(values[1]));
                    }
                    catch { }
                }
                Glb_Entities.ExecuteSP(new object[] { "Usp_KnowledgeBase_Uploads_Delete"
                                            , "@KnowledgeBase_Uploads_ID", values[0]
                                        });
                FilesRadGrid.DataBind();
            }
        }
 
 
    }

While my RadGrid lies in Form Template of RadTreeList as :-
 
<EditFormSettings EditFormType="Template" PopUpSettings-Width="100%">
                               <FormTemplate>
                                   <asp:Panel ID="DetailsPanel" runat="server" DefaultButton="SaveRadButton">
                                       <table border="0" cellpadding="0" cellspacing="5" class="innertable">
                                              <tr>
                                               <td>
                                                     
                                               </td>
                                               <td class="td82">
                                                   <telerik:RadGrid ID="FilesRadGrid" runat="server" AllowFilteringByColumn="True" AllowPaging="True"
                                                       AllowSorting="True" AutoGenerateColumns="False" CellSpacing="0" DataSourceID="FilesSqlDataSource"
                                                       GridLines="None" Width="530px" Visible="false" OnItemCommand="FilesRadGrid_ItemCommand">
                                                       <MasterTableView DataKeyNames="KnowledgeBase_Uploads_ID" DataSourceID="FilesSqlDataSource">
                                                           <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                                                               <HeaderStyle Width="20px" />
                                                           </RowIndicatorColumn>
                                                           <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                                                               <HeaderStyle Width="20px" />
                                                           </ExpandCollapseColumn>
                                                           <Columns>
                                                               <telerik:GridBoundColumn DataField="FileName" FilterControlAltText="Filter FileName column"
                                                                   HeaderText="File Name" SortExpression="FileName" UniqueName="FileName" FilterControlWidth="80%">
                                                                   <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                                                   <ItemStyle HorizontalAlign="Left" Font-Size="11px" Font-Names="Arial" VerticalAlign="Middle" />
                                                               </telerik:GridBoundColumn>
                                                               <telerik:GridTemplateColumn HeaderText="Action" AllowFiltering="false">
                                                                   <ItemTemplate>
                                                                       <asp:ImageButton ID="DeleteImageButton" runat="server" ToolTip="Delete" CommandName="Del"
                                                                           ImageUrl="~/App_Themes/ELPISCMS/images/delete.png" OnClientClick="if (!confirm('Are you sure, you want to delete this record?')) {return false;}"
                                                                           CommandArgument='<%# Eval("KnowledgeBase_Uploads_ID") +":"+ Eval("KnowledgeBase_Uploads_ID") %>' />
                                                                   </ItemTemplate>
                                                                   <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="50px" />
                                                                   <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="50px" />
                                                               </telerik:GridTemplateColumn>
                                                           </Columns>
                                                           <EditFormSettings>
                                                               <EditColumn FilterControlAltText="Filter EditCommandColumn column" />
                                                           </EditFormSettings>
                                                       </MasterTableView>
                                                       <FilterMenu EnableImageSprites="False" />
                                                       <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default" />
                                                   </telerik:RadGrid>
                                                   <asp:SqlDataSource ID="FilesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:elpis_cmsConnectionString %>"
                                                       SelectCommand="Usp_KnowledgeBase_Uploads_Select" SelectCommandType="StoredProcedure">
                                                       <SelectParameters>
                                                           <asp:ControlParameter ConvertEmptyStringToNull="true" ControlID="KnowledgeBaseIDHiddenField"
                                                               DbType="Int32" Name="KnowledgeBase_ID" PropertyName="Value" />
                                                       </SelectParameters>
                                                   </asp:SqlDataSource>
                                               </td>
                                           </tr>
                                           <tr>
                                               <td class="td18">
                                                   Status :
                                               </td>
                                               <td class="td82">
                                                   <asp:RadioButton ID="ActiveRadioButton" runat="server" CssClass="radiobutton" Checked="true"
                                                       GroupName="ActiveInactive" />Active
                                                   <asp:RadioButton ID="InactiveRadioButton" runat="server" CssClass="radiobutton" GroupName="ActiveInactive" />Inactive
                                               </td>
                                           </tr>
                                           <tr>
                                               <td>
                                                     
                                               </td>
                                               <td class="td82">
                                                   <telerik:RadButton ID="SaveRadButton" runat="server" Text='<%# (Container is TreeListEditFormInsertItem) ? "Save" : "Update" %>'
                                                       CausesValidation="true" CommandName='<%# (Container is TreeListEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                                       ValidationGroup="KnowledgeBaseValidationGroup" Width="80px">
                                                       <Icon PrimaryIconUrl="~/App_Themes/ELPISCMS/images/save2.png" PrimaryIconLeft="5"
                                                           PrimaryIconTop="3" />
                                                   </telerik:RadButton>
                                                   <telerik:RadButton ID="CancelRadButton" runat="server" Text="Cancel" CommandName="Cancel"
                                                       CausesValidation="false" Width="80px">
                                                       <Icon PrimaryIconUrl="~/App_Themes/ELPISCMS/images/cancel2.png" PrimaryIconLeft="5"
                                                           PrimaryIconTop="3" />
                                                   </telerik:RadButton>
                                               </td>
                                           </tr>
                                       </table>
                                   </asp:Panel>
                               </FormTemplate>
                           </EditFormSettings>

Shinu
Top achievements
Rank 2
 answered on 26 Jun 2012
1 answer
146 views

We have a RadGrid with some telerik:GridTemplateColumns. We get a datasource and bind the grid. For first page grid behavour is consistent. But after page change, other columns in grid gets new values but itemtemplate columns persist the values from first page.

Grid Design Code :

   

 

<

 

 

telerik:RadGrid ID="rgvTest" runat="server" AllowFilteringByColumn="false"

 

 

 

 

 

 

 

 

AllowPaging="True" AllowSorting="True" MasterTableView-ShowHeadersWhenNoRecords="false"

 

 

 

 

 

 

 

 

AllowCustomPaging="false" AutoGenerateDeleteColumn="false" AllowMultiRowSelection="true"

 

 

 

 

 

 

 

 

AutoGenerateEditColumn="false" GridLines="None" ShowGroupPanel="True" OnItemDataBound="rgvTest_ItemDataBound"

 

 

 

 

 

 

 

 

OnPageIndexChanged="rgvTest_PageIndexChanged" OnSortCommand="rgvTest_SortCommand"

 

 

 

 

 

 

 

 

ClientSettings-ClientEvents-OnRowDblClick="GridRowDoubleclick" >

 

 

 

 

<

 

 

Columns>

 

 

 

<telerik:GridTemplateColumn HeaderImageUrl="../Images/priority_icon.png" UniqueName="Priority1"

 

 

 

 

 

 

 

 

HeaderTooltip="Priority">

 

 

 

 

 

 

 

 

<ItemStyle Width="20px" Wrap="false" />

 

 

 

 

 

 

 

 

<HeaderStyle Width="20px" Wrap="false" />

 

 

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

 

 

<asp:Image ID="PriorityImage" runat="server" />

 

 

 

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

 

 

</telerik:GridTemplateColumn>
</Column>

 

 

 

 

Considering page size is set to 10.
After debugging , i got that OnItemdataBound event is called for first 10 records on load.
And after page change, it is called for 20 times but insted for 20 record of first page and second page, it is called twice for first 10 records... Strange but true.
If anyone has any idea abot this please help me out.

Chaitanya
Top achievements
Rank 1
 answered on 26 Jun 2012
1 answer
289 views
Hi,

I am getting
403 - Forbidden: Access is denied.

You do not have permission to view this directory or page using the credentials that you supplied.

when clicking on one Rad Menu sub item then immediately click (means with in loading that tab details) on another Menu header tab item.
For Header items i declare NavigateURL="#".
in IE only  i got this error
please give quick solution for this.
attachment contains issue with screenshot
Andy Green
Top achievements
Rank 2
 answered on 26 Jun 2012
9 answers
102 views
Hi,

There is a problem with the editor and using MS Internet Explorer (any Version) by converting selected text into a bullet list.

What i'm doing:

Write three lines:

first line
second line
third line.

Select the three lines and press the button "Bullet List".

Results:

FireFox does everything fine:

  • first line
  • second line
  • third line

Internet Explorer does something like this:
  • first line
      second line
      third line

You can try this with the demo examples on this hompage.

Hopefully anybody can help me to find a fix.

Thanks in advance
Rumen
Telerik team
 answered on 26 Jun 2012
2 answers
123 views
Hi,

I want to know whether the column frozen can be done in the treelist grid view. 

Thanks
Gerald
Top achievements
Rank 1
 answered on 26 Jun 2012
10 answers
183 views
After een upgrade from  RadEditor for MOSS 5.1.0.0 to RadEditor for MOSS 5.8.14. the Image manager is not working correctly anymore.
I can paste an image from the Sitecollectionimages folder, but when i try to open the Publishingimages folder i only see the loading symbol. It will never open this folder.


Rumen
Telerik team
 answered on 26 Jun 2012
1 answer
155 views
Hi,

I am trying to use Telerik Ajaxify Timer to refresh the view at intervals determined by a configuration item . for this i have referred http://demos.telerik.com/aspnet-ajax/ajax/examples/common/ajaxifytimer/defaultcs.aspx link and in my  view.aspx page I have added :

<telerik:RadAjaxManagerProxy ID="ramDiary" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="TimerRefresh">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="DiarySchedule12" LoadingPanelID="LoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
 
and
 
 <telerik:RadScheduler Width="100%" ID="DiarySchedule12" runat="server" DayView-UserSelectable="false"
                                DataKeyField="ID" DataSubjectField="Description" DataStartField="Start" DataEndField="End"
                                WeekView-UserSelectable="False" TimelineView-UserSelectable="False" MonthView-UserSelectable="False"
                                Height="550px" NumberOfHoveredRows="1" DayStartTime="08:00:00" HoursPanelTimeFormat="HH:mm"
                                RowHeight="35px" Skin="Outlook" TimeLabelRowSpan="1" WorkDayEndTime="18:00:00"
                                WorkDayStartTime="08:00:00" ShowAllDayRow="False" Culture="en-GB" ShowFooter="true"
                                AllowDelete="False" AllowEdit="False" AllowInsert="False" DayEndTime="18:00:00"
                                EnableExactTimeRendering="True" CustomAttributeNames="Status" ShowNavigationPane="True"
                                MinutesPerRow="15" StartEditingInAdvancedForm="true" OnClientAppointmentDoubleClick="OnClientAppointmentDoubleClick"
                                OnClientAppointmentContextMenuItemClicked="OnClientAppointmentContextMenuItemClicked">
                                <ResourceHeaderTemplate>
 </telerik:RadScheduler>
 
and
 
<asp:Panel ID="PanelTimer" runat="server">
       <%-- <asp:Timer ID="TimerRefresh" runat="server" Interval="900000" OnTick="TimerRefresh_Tick" />--%>
        <asp:Timer ID="TimerRefresh" runat="server" Interval="3000" OnTick="TimerRefresh_Tick" />
    </asp:Panel>
 And in my  view.aspx.cs page in Page_Load  I have added :

int btimerRefresh = AM.IntOption("timer_refresh");
 
 
   
           TimerRefresh.Interval = btimerRefresh * 1000;

Now the 

The view is  getting refreshed but, I am not getting the image while refreshing diary.

Please Suggest as it is urgent for me.

Regards,
ABC




Maria Ilieva
Telerik team
 answered on 26 Jun 2012
3 answers
359 views
 

I'm facing a problem with the use of the telerik's radgrid. So far i have been using simple grids with only column headers. I need know to get row headers.

I'm trying to work with this which is more or less what i am looking for : http://demos.telerik.com/aspnet-ajax/grid/examples/programming/pivot/defaultcs.aspx

the problem the Row/Column headers are not the column names from my table. I need to write them directly in the code.
Some help would be welcome! thanks in advance

Ronan BARRANGER
Top achievements
Rank 1
 answered on 26 Jun 2012
1 answer
65 views
I have an line series and this series I own figures in circles. This series is powered by an array of double. Two things I'm not getting done.

 1) I can not do it no plot, when the value of the array at that position is zero (0).

2) That it is series with the X axis, that is, zero. Within the circles I put a few labels. I wish to make circles stay in the middle of the line (series), as it is along the X axis, should come half circles at the top (positive) and half the bottom (negative). It has to do this?
Petar Marchev
Telerik team
 answered on 26 Jun 2012
1 answer
84 views
Is it possible to change the height of the first row?  Please refer to the attached file.
Plamen
Telerik team
 answered on 26 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?