Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
381 views
Hello All,
 
I am creating RadGrid Runtime it works fine.but when i am click on Refresh Button  doesn't Works(Not Rebinding Grid) please provide me solution asap with example.

Thanks In Advance.....
vinod
Top achievements
Rank 1
 answered on 13 Oct 2008
4 answers
260 views
Hi,

we have developed an ASP.NET application which uses Telerik Rad Controls. The app works pervectly with the VS2008 development server. When I try to deploy it on IIS7
I get the error "sys is undefined".
A code-snippet from the debugger is attached below. 
<script src="/MyApp-dev/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ScriptManager1_HiddenField&amp;compress=1&amp;_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3ade-DE%3a3bbfe379-348b-450d-86a7-bb22e53c1978%3a52817a7d%3a67c678a8%3bTelerik.Web.UI%2c+Version%3d2008.2.826.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3ade-DE%3a2b1b618c-2ad2-4d4e-8b5a-afa3e17baf61%3a393f5085%3bTelerik.Web.UI%2c+Version%3d2008.2.826.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3ade-DE%3a2b1b618c-2ad2-4d4e-8b5a-afa3e17baf61%3a34f9d57d%3bTelerik.Web.UI%2c+Version%3d2008.2.826.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3ade-DE%3a2b1b618c-2ad2-4d4e-8b5a-afa3e17baf61%3a526d426%3bTelerik.Web.UI%2c+Version%3d2008.2.826.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3ade-DE%3a2b1b618c-2ad2-4d4e-8b5a-afa3e17baf61%3a4b40c3e6%3bTelerik.Web.UI%2c+Version%3d2008.2.826.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3ade-DE%3a2b1b618c-2ad2-4d4e-8b5a-afa3e17baf61%3a9703c1f0%3bTelerik.Web.UI%2c+Version%3d2008.2.826.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3ade-DE%3a2b1b618c-2ad2-4d4e-8b5a-afa3e17baf61%3a80c4ad6d%3bTelerik.Web.UI%2c+Version%3d2008.2.826.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3ade-DE%3a2b1b618c-2ad2-4d4e-8b5a-afa3e17baf61%3a527acb41%3bTelerik.Web.UI%2c+Version%3d2008.2.826.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3ade-DE%3a2b1b618c-2ad2-4d4e-8b5a-afa3e17baf61%3aa9723048%3bTelerik.Web.UI%2c+Version%3d2008.2.826.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3ade-DE%3a2b1b618c-2ad2-4d4e-8b5a-afa3e17baf61%3aa3f85c94%3bTelerik.Web.UI%2c+Version%3d2008.2.826.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3ade-DE%3a2b1b618c-2ad2-4d4e-8b5a-afa3e17baf61%3a819163f9" type="text/javascript"></script> 
<script type="text/javascript"> 
//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('Fehler beim Laden des clientseitigen ASP.NET Ajax-Frameworks.');
//]]> 
< 

The Telerik.Web.UI.WebResource.axd is not available (404) when I call it directly from the browser.
Does anyone have an idea what's wrong here?
Best regards,
Robert

Erjan Gavalji
Telerik team
 answered on 13 Oct 2008
1 answer
333 views

Is the RadScriptManager supposed to combine javascript files that are referenced in ordinary ScriptReference blocks?

E.g.

<telerik:RadScriptManager EnableScriptCombine="true"...>
  <Scripts>
    <asp:ScriptReference Path="~/include/About.js" />

    ...

Script combining is working for user controls etc. but I am not seeing anything happen with the above scenario.

Erjan Gavalji
Telerik team
 answered on 13 Oct 2008
1 answer
157 views
Hello,

Some menu item click events I handle on the client and some on the server:

 

<telerik:RadTreeView ID="fileTree"
runat="server"
OnContextMenuItemClick="fileTree_ContextMenuItemClick"
OnClientContextMenuItemClicking="clientContextMenuItemClicking">

When I call eventArgs.set_cancel(true); on a client side event handler that I do not want to be processed on the server,  the context menu does not disappear.  Is there a way to hide the menu or should I be doing something different?

 

 

 

   function clientContextMenuItemClicking(sender, eventArgs)
   {
    var node = eventArgs.get_node();
    var item = eventArgs.get_menuItem();
    var tree = node.get_treeView();

    if (item.get_value() == "DeleteFile")
     if (!confirm("Are you sure you want to delete this file?\n\n This cannot be undone."))
      eventArgs.set_cancel(true);
   } 

Many thanks! Ryan

 

Erjan Gavalji
Telerik team
 answered on 13 Oct 2008
2 answers
142 views

I set Axis' title of my chart in this way,

 

<AxisLabel> 
   <Appearance Dimensions-Paddings="1px, 1px, 10%, 1px"   
              Position-AlignedPosition="Right">  
   </Appearance> 
   <TextBlock Text="MyTytle" Visible="true" > 
       <Appearance TextProperties-Color="254, 178, 112">  
       </Appearance> 
   </TextBlock> 
</AxisLabel> 

but it doesn't works!

Alessandro
Top achievements
Rank 1
 answered on 13 Oct 2008
1 answer
80 views
I copied a grid with a nested grid to another aspx page.  The columns don't show in the property builder.  Is there anyway to force this to refresh so that the columns will show? 
Vlad
Telerik team
 answered on 13 Oct 2008
1 answer
116 views
Hello,

I have a grid with for each item a detail table. The data for this grid are filled out using NeedDataSource and DetailTableDataBind events.
I also have a time which is in charge of rebinding the grid every 5 seconds.

My problem comes when I have expanded an item of the grid, in order to see its detail table, and the timer ticks. Then the item is automatically collapsed...

How can I avoid this automatic collapsing.
My Telerik version is v2008.1.619.35.

Here are sample codes :

 
<telerik:RadStyleSheetManager runat="server"> 
</telerik:RadStyleSheetManager> 
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
</telerik:RadScriptManager> 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> 
    <ajaxsettings> 
        <telerik:AjaxSetting AjaxControlID="Timer1"> 
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
        <telerik:AjaxSetting AjaxControlID="RadGrid1"> 
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </ajaxsettings> 
</telerik:RadAjaxManager> 
 
<asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick"></asp:Timer> 
 
<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" OnNeedDataSource="RadGrid1_NeedDataSource" 
    OnDetailTableDataBind="RadGrid1_DetailTableDataBind" Skin="Inox" AutoGenerateColumns="False"> 
    <mastertableview datakeynames="moduleId"> 
        <DetailTables> 
            <telerik:GridTableView DataKeyNames="childModuleId" Name="Dependencies" Width="80%" runat="server">                     
                <Columns> 
                    <telerik:GridBoundColumn  HeaderText="id" DataField="childModuleId" UniqueName="childModuleId" Visible="false"> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridTemplateColumn HeaderText="Dependencies" UniqueName="childModuleSelected" 
                            ItemStyle-Width="10"> 
                            <ItemTemplate> 
                                <asp:CheckBox ID="childActivatedCheckBox" Checked='<%# Convert.ToBoolean(Eval("childModuleSelected")) %>' 
                                    runat="server" AutoPostBack="True" /> 
                            </ItemTemplate> 
                            <ItemStyle Width="10px"></ItemStyle> 
                        </telerik:GridTemplateColumn> 
                    <telerik:GridBoundColumn DataField="childModuleName" ItemStyle-Width="150" UniqueName="childModuleName"> 
                            <ItemStyle Width="150px"></ItemStyle> 
                        </telerik:GridBoundColumn> 
                </Columns> 
            </telerik:GridTableView> 
        </DetailTables>             
        <Columns> 
            <telerik:GridBoundColumn HeaderText="Id" DataField="moduleId" UniqueName="moduleId"> 
            </telerik:GridBoundColumn> 
            <telerik:GridTemplateColumn HeaderText="Selected" UniqueName="moduleSelected" ItemStyle-Width="10"> 
                    <ItemTemplate> 
                        <asp:CheckBox ID="activatedCheckBox" Checked='<%# Convert.ToBoolean(Eval("moduleSelected")) %>' 
                            runat="server" AutoPostBack="True" /> 
                    </ItemTemplate> 
                    <ItemStyle Width="10px"></ItemStyle> 
                </telerik:GridTemplateColumn> 
            <telerik:GridBoundColumn HeaderText="Module Name" ItemStyle-Width="250" DataField="moduleName"> 
              <ItemStyle Width="250px"></ItemStyle> 
            </telerik:GridBoundColumn> 
        </Columns> 
    </mastertableview> 
</telerik:RadGrid> 


Code behind :

protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) 
{ 
    if (!e.IsFromDetailTable) 
    { 
        DataTable modulesTable = new DataTable(); 
        modulesTable.Columns.Add("moduleSelected", typeof( bool )); 
        modulesTable.Columns.Add("moduleId", typeof( int )); 
        modulesTable.Columns.Add("moduleName", typeof( string )); 
 
        Random r = new Random(123456); 
        for( int i = 0; i < 10; i++ ) 
        { 
            int nId = r.Next(0, 10); 
 
            // USE IsPostBack properties to see if the grid is correctly rebinded 
            modulesTable.Rows.Add(IsPostBack, nId, "Module " + nId);                                 
        } 
 
        RadGrid1.DataSource = modulesTable; 
    } 
 
} 
 
protected void RadGrid1_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e) 
{ 
    GridDataItem parentDataItem = (GridDataItem)e.DetailTableView.ParentItem; 
    int nParentModuleId = (int)parentDataItem.GetDataKeyValue("moduleId"); 
 
    DataTable dependenciesTable = new DataTable(); 
    dependenciesTable.Columns.Add("childModuleSelected", typeof(bool)); 
    dependenciesTable.Columns.Add("childModuleId", typeof(int)); 
    dependenciesTable.Columns.Add("childModuleName", typeof(string)); 
 
    Random r = new Random(123456); 
    for (int i = 0; i < 3; i++) 
    { 
        int nId = r.Next(0, 10); 
        dependenciesTable.Rows.Add(false, nId, "Module " + nId); 
    } 
 
    e.DetailTableView.DataSource = dependenciesTable;        
} 
 
protected void Timer1_Tick(object sender, EventArgs e) 
{ 
    RadGrid1.Rebind(); 
} 
 

Thanks in advance.

Yavor
Telerik team
 answered on 13 Oct 2008
3 answers
118 views
I have a feeling this should be simple but I can't for the life of me get my head around it.

I want a clientside doubleclick event to do a simple javascript window.open() with the URL derived from data in the grid row clicked.

My first javascript function looked like this:
function RowDblClick(sender, eventArgs) {  
switch (eventArgs.get_itemIndexHierarchical()) {  
 case '0':  
    window.open('urlhere','','')  
 case '1':  
  ....etc  
 
}  
}  
 

Simple enough. The calculation of the URL is quite intensive so I don't want to do it more than I have to, so what I want to do is loop through the visible rows
and generate the code I need.

Any help would be appreciated
Vlad
Telerik team
 answered on 13 Oct 2008
1 answer
118 views
Hi,
I created the RadGrid with rtl direction and I added the frozen column , but it don't work correctly -  the horizontal scroll don't work.
If the RadGrid support this option?

Thanks
Princy
Top achievements
Rank 2
 answered on 13 Oct 2008
1 answer
345 views
Hi,

This might be a silly question to ask but being a newbie I shouldn't worry about being silly if I want to know for sure what is possible and what not.

Anyway, my question is:

I have a RadGrid on page and everytime I change cell in Grid, I do postback using AjaxManager, Grid seems to go through its whole process of Rebind() (I have this method defind ItemCreated, ItemDataBound, ColumnCreated, PreRender). It takes several seconds before I get response from AjaxManager. Once I get response, I am doing whole lot of other stuff from JavaScript using the response.

I was wondering if there is a way to execute Rebind() when I needed if not just execute the function defined for AjaxManager and return the response. I want to minimize the time it's taking to give me response from server side.

thank you very much, appreciate your help.
Madhu
Vlad
Telerik team
 answered on 13 Oct 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?