Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
84 views
Hello

I have a radajaxmanager that I set a button to do an ajax update on a panel.  The button is located in the panel (it needs to be since the enabled property changes during a certain state.  The ajax is working for the button I specified, but is also working for all the controls in the panel.  Here is an example:

<rad:RadAjaxManager ID="RadAjaxManager1" runat="server"
        <AjaxSettings> 
            <rad:AjaxSetting AjaxControlID="btnRefreshGenerationStatus"
                <UpdatedControls> 
                    <rad:AjaxUpdatedControl ControlID="pnlGeneratePackage" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </rad:AjaxSetting> 
        </AjaxSettings> 
    </rad:RadAjaxManager> 
     
    <rad:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" style="margin-top: 57px;" Transparency="30"
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;" /> 
    </rad:RadAjaxLoadingPanel> 

and the panels code is:
<asp:Panel ID="pnlGeneratePackage" runat="server"
            <asp:Button ID="btnGeneratePackage" runat="server" Text="Generate Package" SkinID="ButtonLarge" /> 
            <asp:CheckBox ID="chkGenerateIndex" runat="server" Text="Generate Index" /> 
            <br /> 
            <asp:Literal ID="litGeneratePackageStatus" runat="server" Text="Status: " /> 
            <asp:Label ID="lblGeneratePackageStatus" runat="server" /> 
             
             
            <asp:Button ID="btnRefreshGenerationStatus" runat="server" Text="Refresh Package Generation" SkinID="ButtonLarge" /> 
             
            
            <br /> 
            <br /> 
            <asp:Button ID="lnkDownloadPackage" runat="server" Text="Download Package" Visible="false" /> 
        </asp:Panel> 

When I click the btnRefreshGenerationStatus button, it will do a ajax update on all the controls.  When I click the lnkDownloadPackage button, it also does an ajax update which I don't want.  I don't want the other buttons in that panel to do a ajax update. 

Where am I doing wrong here?

Thanks
Kevin
Daniel
Telerik team
 answered on 19 Dec 2008
4 answers
155 views
I want to change the back color of the row if the column1's value is equal to "X". How can I do this in server side code? Thanks.
Steve Y
Top achievements
Rank 2
 answered on 19 Dec 2008
1 answer
114 views
hello...
i want to populate dinamically a gridtableview in the detailtables of my radgrid.
the datasource for this gridtableview must come from a List<myobject>


this is radgrid and c#:

// datasource for radgrid

protected void gridBooth_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
List<Business.SE2_CatalogueSubscription> _stands = new List<Business.SE2_CatalogueSubscription>();
_stands = _dataContext.SE2_CatalogueSubscriptions
                .Where(e => e.idExhibition == _exhibitionId)
                .ToList();

            gridBooth.DataSource = _stands ;
            gridBooth.VirtualItemCount = _stands.Count;;    
        }

the source for my detailtable is :
 public List<Business.SE2_CatalogueSubscriptionsMerceologiche> GetMerceologiche(int idSubscription)
        {
            return
                (_dataContext.SE2_CatalogueSubscriptionsMerceologiches
                    .Where(a => a.idSubscription == idSubscription)
                    .OrderBy(b => b.idSubscriptionMerceologico)
                ).ToList();
        }
// i want to Bind the GridTableView with this List<> and the parameter is idSubscription (idSubscription is the GridRelationFields and also DataKeyfor RadGrid)

<telerik:RadGrid ID="gridBooth" runat="server" AllowPaging="True" AllowCustomPaging="True"
                AllowSorting="True" AutoGenerateColumns="False" GridLines="None"  EnableAJAX="true"
                OnNeedDataSource="gridBooth_NeedDataSource"  OnSortCommand="RadGrid1_SortCommand"
                OnPageIndexChanged="gridBooth_PageIndexChanged" Height="500px"
                                onitemcreated="gridBooth_ItemCreated" Skin="Vista">
                <PagerStyle Mode="NextPrevAndNumeric" />
                
                   <MasterTableView CommandItemDisplay="Top" Name="Subscriptions" HierarchyLoadMode="Client">
                   <DetailTables>
                        <telerik:GridTableView DataKeyNames="idSubscriptionMerceologico"   DataMember="Categories"
                        ShowHeader="true"                      
                        AllowPaging="False" Width="70%" runat="server" AllowCustomPaging="False"
                            NoDetailRecordsText="Nessuna categoria selezionata." NoMasterRecordsText="">
                                <ParentTableRelation>
                                    <telerik:GridRelationFields DetailKeyField="idSubscription" MasterKeyField="idSubscription" />
                                </ParentTableRelation>                                  
                                <Columns>
                                    <telerik:GridBoundColumn SortExpression="idSubscriptionMerceologico" HeaderText="ID" DataField="idSubscriptionMerceologico" UniqueName="idSubscriptionMerceologico">
                                    </telerik:GridBoundColumn>
                                
                                    <telerik:GridBoundColumn SortExpression="merceologico" HeaderText="merceologico" DataField="merceologico" UniqueName="merceologico">
                                    </telerik:GridBoundColumn>
                                </Columns>                                
                            </telerik:GridTableView>                    
                    </DetailTables>  
                   
                   
                   <CommandItemTemplate>
                        <table width="100%" cellpadding=2 cellspacing=2 border=0>
                       <tr>
                           <td class="normal" width="25%" align=left><asp:LinkButton ID="btnExportXLS" runat=server CausesValidation=false OnClick="btnExportXLS_Click"><img src="/images/xls.jpg" border=0 />&nbsp;Totale</asp:LinkButton></td>                           
                           <td class="normal" width="25%" align=left><asp:LinkButton ID="btnExportCSV" runat=server CausesValidation=false OnClick="btnExportCSV_Click">CSV Totale</asp:LinkButton></td>
                           <td class="normal" width="50%" align=center>&nbsp;</td>                       
                       </tr>
                       </table>
                    </CommandItemTemplate>

                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    
                                   
                    
                    <Columns>                                            
                        <telerik:GridTemplateColumn DataField="idSubscription" HeaderText="ID" UniqueName="idSubscription" SortExpression="idSubscription">
                        <ItemTemplate>
                            <%# GetIDLink(DataBinder.Eval(Container.DataItem, "idSubscription"), "y")%>
                        </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn DataField="idSubscription" HeaderText="ID" visible=false UniqueName="idSubscriptionData" SortExpression="idSubscription">
                        <ItemTemplate>
                            <%# GetIDLink(DataBinder.Eval(Container.DataItem, "idSubscription"), "n")%>
                        </ItemTemplate>
                        </telerik:GridTemplateColumn>
                                        
                        <telerik:GridTemplateColumn DataField="UserId" HeaderText="Espositore"  UniqueName="EspositoreData" SortExpression="UserId">
                        <ItemTemplate>
                            <%# GetEspositore(DataBinder.Eval(Container.DataItem, "UserId"), "n")%>
                        </ItemTemplate>
                        </telerik:GridTemplateColumn>
                   
                        <telerik:GridBoundColumn AllowFiltering="False" DataField="CompanyName" EmptyDataText=""
                            HeaderText="Azienda" UniqueName="CompanyName">
                        </telerik:GridBoundColumn>
                        
                        <telerik:GridBoundColumn AllowFiltering="False" DataField="Address" EmptyDataText=""
                            HeaderText="Indirizzo" UniqueName="Address">
                        </telerik:GridBoundColumn>
 </Columns>
                     
                    
                     
                </MasterTableView>
                <ClientSettings AllowColumnsReorder="True">
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                </ClientSettings>
                <FilterMenu EnableTheming="True">
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                </FilterMenu>
                <sortingsettings sorttooltip="Clicca per ordinare" />
            </telerik:RadGrid>
Rudy
Top achievements
Rank 1
 answered on 19 Dec 2008
1 answer
137 views
Hi,

I need to create translations into different languages for the rad grid. In particular, strings like "No records to display" or the content of the filter menu need to be translated. I couldn't find any hints on i18n in the documentation.
What do I have to do to enable i18n of the rad grid?

Robert
Vlad
Telerik team
 answered on 19 Dec 2008
1 answer
119 views

Hi,
I found this bit of code else where to tell a RadAjaxPanel to do a full postback. 

First in the code behind put:

 

cmdExport.Attributes.Add(

"onclick", String.Format("realPostBack('{0}', ''); return false;", cmdExport.UniqueID))

 

 

Then in the aspx put:

<telerik:RadCodeBlock id="codeblock1" runat="server">  
   <script type="text/javascript">  
       function realPostBack(eventTarget, eventArgument)  
       {  
           $find("< % = RadAjaxPanel1.ClientID % >").__doPostBack(eventTarget, eventArgument);  
       }  
    </script> 
</telerik:RadCodeBlock> 
 

The only problem is that I am not using a RadAjaxPanel, I'm just using a RadAjaxManager.
How can I do the same thing with a RadAjaxManaged control?
Thanks ... Ed

Vlad
Telerik team
 answered on 19 Dec 2008
1 answer
703 views
Hello!

Sorry for long title :). I have a button placed instide MasterTableView \ ItemTemplate which has attached server-side OnClick event. Normally in RadGrid event OnItemDataBound I can access databinded item for this row by using this:

MyClass dataItem = (MyClass )e.Item.DataItem; 

but how can I access DataItem in OnClick event of Button which is inside ItemTemplate? If accessing is not possible then how can I pass this DataItem to this Button.

Thanks
Vlad
Telerik team
 answered on 19 Dec 2008
3 answers
159 views
Hello there,

I have a scenario in which i need to do some processing on client side whenever a tab is selected. I am using OnClientTabSelected event for this. The problem is that the JS function associated with this event is never called when I click an already selected tab. I need to redo my processing in this case. It seems that tabstrip control doesn't raise the event when you click an already selected tab. Please help.
Tahami
Top achievements
Rank 1
 answered on 19 Dec 2008
4 answers
380 views
Hello.
I use radwindow in my frame to open pages .I find it's very slow to load the pages and input data in the pages.But when i open the pages in browser , all work perfect.
I limited radwindow to 8. but the performance problem still appears.
Is there any performance impact while using Radwindow?
I want implment a UI frame like Ext does. 

How to get help from you.
Best Regards.

Wenchao
Top achievements
Rank 1
 answered on 18 Dec 2008
1 answer
121 views
I have the latest version of the ASP.NET Ajax controls installed. Drug a control onto a page and let it automatically add the reference. Then when I try to run the site I get this error:

Could not load file or assembly 'Telerik.Web.UI, Version=2008.3.1105.20, Culture=neutralPublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)   
 
 

Why is it trying to load the 20 version when all I have installed is the 35 version? There is no reference anywhere in my project to the 20 version number. What gives? Why can't I use the 35 version?? Is the version number somehow embedded in the actual controls meaning I have to delete and re-add all of the Telerik controls in my project (I did start with the 20 version)?

This is killing me!
jfkrueger
Top achievements
Rank 1
 answered on 18 Dec 2008
2 answers
165 views
Is there some basic tutorial on how to do Loading Panels?  I can't seem to figure them out.  This code below should populate a radgrid with many rows of data.  I want to see a loading message while it does.


HTML
<asp:ScriptManager ID="ScriptManager1" runat="server">  
      </asp:ScriptManager> 
  <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="dgTest">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                </AjaxSettings> 
            </telerik:RadAjaxManager> 
              
  <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
                Width="75px" IsSticky="True" MinDisplayTime="100">  
                <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
                    style="border: 0px;" /> 
            </telerik:RadAjaxLoadingPanel> 
    
<asp:Panel ID="Panel1" runat="server">  
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> 
</asp:Panel> 
   
  <asp:Button ID="Button1" runat="server" Text="Test Loading"   
    onclick="Button1_Click" /> 
      
      <telerik:RadGrid ID="rgTest" runat="server" AllowFilteringByColumn="True"   
        AllowSorting="True" GridLines="None" Skin="WebBlue" AllowPaging="True"   
        PageSize="30">  
        <MasterTableView> 
        <RowIndicatorColumn> 
        <HeaderStyle Width="20px"></HeaderStyle> 
        </RowIndicatorColumn> 
 
        <ExpandCollapseColumn> 
        <HeaderStyle Width="20px"></HeaderStyle> 
        </ExpandCollapseColumn> 
        </MasterTableView> 
 
        <FilterMenu EnableTheming="True" Skin="WebBlue">  
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
        </FilterMenu> 
      </telerik:RadGrid> 

C#
protected void Button1_Click(object sender, EventArgs e)  
    {  
      string conn = ConfigurationManager.AppSettings["ShareConnectionString"]; //Connection to SAS DB  
      System.Data.DataSet sasDs = new System.Data.DataSet();  
      OleDbConnection sas = new OleDbConnection(conn);  
      sas.Open();  
 
 
      OleDbCommand sassasCommand = sas.CreateCommand();  
      sasCommand.CommandType = CommandType.Text;  
      sasCommand.CommandText = "Select * from Test.Temp;";  
      OleDbDataAdapter da = new OleDbDataAdapter(sasCommand);  
      da.Fill(sasDs);  
      sas.Close();  
      DataTable dt = new DataTable();  
      dt = sasDs.Tables[0];  
 
      rgTest.DataSource = dt;  
      rgTest.DataBind();        
    } 
What am I missing?  Should I have all the skins in my project?  Where do I find them?

Thank You
Jerry
jerry
Top achievements
Rank 1
 answered on 18 Dec 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?