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

Hi,

This is my scenario

 

When user Click the button

            A javaScript Function is Called which is making a ajaxRequest.

 

This AjaxRequest from Code behind Registers a script (I m using RAdAjaxManger.ResponseScripts.Add(“radalert(‘HELP!!!’)”))

 

Along with this I have Added a setting in  RAdAjaxManger

So that it shows a loadingPanel during this ajax request…

 

Problem is radAlert(which is Called From CodeBehind using ResponseScripts) doesn’t fire !!

If  I remove the Ajax Settings(for RAdAjaxManager Itself) then it fires!!..please help

 

I need to show a loading panel when the Ajax Request Happens!!..

Iana Tsolova
Telerik team
 answered on 16 Jul 2009
1 answer
218 views
I have a radgrid where I generate a template column which has a checkbox as it's itemtemplate. The checkbox is checked in the codebehind if another field is prefixed with certain characters. I have included the code below. I want to know if there is a way to filter this column either saying is checked, or even is not empty?

Here is the aspx:
<telerik:GridTemplateColumn UniqueName="webLinkedContent" HeaderText="Web linked" 
            <ItemTemplate> 
                <asp:CheckBox ID="webLinkedContent" Enabled="false" runat="server" /> 
            </ItemTemplate> 
        </telerik:GridTemplateColumn> 
 and here is the c#:

  protected void sourcesGrid_itemDataBound(object sender, GridItemEventArgs e) 
        { 
            if ((e.Item is GridDataItem)) 
            { 
                GridDataItem dataItem = (GridDataItem)e.Item; 
                string psSourceCd = ((System.Data.DataRowView)(((Telerik.Web.UI.GridItem)(dataItem)).DataItem)).Row.ItemArray[9].ToString(); 
                if (psSourceCd.Length > 4) 
                { 
                    string beginning = psSourceCd.Substring(0, 4); 
                    if (beginning == "SPD_"
                    { 
                        CheckBox chkbx = dataItem["webLinkedContent"].FindControl("webLinkedContent"as CheckBox; 
                        chkbx.Checked = true
                    } 
                } 
 
            } 
        } 

Thanks



Veli
Telerik team
 answered on 16 Jul 2009
1 answer
83 views
Hi guys,
You should be able to help me out...

a. Data Bound to a grid and grid.showFooter = true is set.
b. During the grid pre-render event,
Following code is executed.

Dim gridRevisedCol As GridBoundColumn
        gridRevisedCol = grid.MasterTableView.GetColumn("Revised")
        gridRevisedCol.DataFormatString = "{0:#####}"
        gridRevisedCol.FooterText = "Total: "
        gridRevisedCol.FooterAggregateFormatString = "<strong>{0:###,###,##}</strong>"
        gridRevisedCol.Aggregate = GridAggregateFunction.Sum
        gridRevisedCol.Groupable = False
        gridRevisedCol.ItemStyle.HorizontalAlign = HorizontalAlign.Right
        gridRevisedCol.FooterStyle.HorizontalAlign = HorizontalAlign.Right


My question is what have I missed that I am not able to show the aggregate value in footer when the page loads.

It works though when it's grouped by dragging a column and ungrouped it. Amazing.


FYI..

  <telerik:RadGrid ID="grid" runat="server" Skin="Office2007" BorderWidth="0px"
    AutoGenerateColumns="true" PageSize="500" AllowPaging="True" AllowSorting="True">
        <AlternatingItemStyle BackColor="AliceBlue" Font-Names="Verdana" Font-Size="8pt" />
        <ItemStyle Font-Names="Verdana" Font-Size="8pt" />
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
       </ClientSettings>
        <MasterTableView>
            <RowIndicatorColumn Visible="True">
            </RowIndicatorColumn>
        </MasterTableView>
        <FilterMenu EnableTheming="True" Skin="Web20">
            <CollapseAnimation Duration="200" Type="OutQuint" />
        </FilterMenu>
        <PagerStyle Position="TopAndBottom" />
    </telerik:RadGrid>



Please help me.

Thanks a lot.

Milan G


Iana Tsolova
Telerik team
 answered on 16 Jul 2009
2 answers
332 views
Hi,

I would like to generate columns in my RadGrid as I have in my DataTable. I created my DataTable about XML file. The structure of XML file you can see below:

<?xml version="1.0" encoding="utf-8" ?>
<Tabela>
  <Colunas>
    <Coluna NomeColuna="nome_completo" NomeCabecalho="Nome"></Coluna>
    <Coluna NomeColuna="matricula" NomeCabecalho="Registro"></Coluna>
    <Coluna NomeColuna="tipo_deficiencia" NomeCabecalho="Deficiência"></Coluna>
  </Colunas>
  <Linhas>
    <Linha NomeColuna="nome_completo" Conteudo="João"></Linha>
    <Linha NomeColuna="matricula" Conteudo="123456"></Linha>
    <Linha NomeColuna="tipo_deficiencia" Conteudo="Física"></Linha>
    <Linha NomeColuna="nome_completo" Conteudo="Maria"></Linha>
    <Linha NomeColuna="matricula" Conteudo="654321"></Linha>
    <Linha NomeColuna="tipo_deficiencia" Conteudo="Auditiva"></Linha>
  </Linhas>
</Tabela>

In a code aspx, I have the code in a button, as you can see below:

       try
        {
            System.Data.DataSet _dsDadosXML = new System.Data.DataSet();

            System.Data.DataTable _dtTabela = new System.Data.DataTable("Dados");
            
            System.Data.DataRow _drLinhas;

            _dsDadosXML.ReadXml(Server.MapPath("~/Protegidos/Empresas/Relatorios/XMLFile.xml"));
            System.Data.DataTable _dtTabelaXML = _dsDadosXML.Tables["Coluna"];
            foreach (System.Data.DataRow linha in _dtTabelaXML.Rows)
            {
                System.Data.DataColumn _dcColunas = new System.Data.DataColumn();

                _dcColunas.ColumnName = linha[0].ToString();
                _dcColunas.Caption = linha[1].ToString();
                _dtTabela.Columns.Add(_dcColunas);
            }

            _dtTabelaXML = _dsDadosXML.Tables["Linha"];
            foreach (System.Data.DataRow linha in _dtTabelaXML.Rows)
            {
                _drLinhas = _dtTabela.NewRow();
                _drLinhas[linha[0].ToString()] = linha[1].ToString();
                _dtTabela.Rows.Add(_drLinhas);
            }

            RadGrid1.DataSource = _dtTabela;
            RadGrid1.DataBind();
        }
        catch (Exception ex)
        {
            lblResultado.Text = ex.Message;
        }

And my RadGrid in source aspx is:

                 <telerik:RadGrid ID="RadGrid1" runat="server" Skin="Telerik"
                            GridLines="None" AllowPaging="true" AllowSorting="true" Width="97%"
                            AutoGenerateColumns="false" ShowStatusBar="true"
                            PageSize="10">
                            <HeaderContextMenu Skin="WebBlue">
                                <CollapseAnimation Type="OutQuint" Duration="200" />
                            </HeaderContextMenu>
                            
                            <MasterTableView GridLines="None" Width="100%" CommandItemDisplay="None"
                                Font-Bold="false" Font-Italic="false" Font-Overline="false" Font-Strikeout="false"
                                Font-Underline="false" Name="TableViewTeste">
                                
                                <PagerStyle NextPageText="Próximo" PrevPageText="Anterior" />
                            </MasterTableView>
                            
                            <FilterMenu Skin="WebBlue">
                                <CollapseAnimation Type="InOutQuint" Duration="200" />
                            </FilterMenu>
                            <StatusBarSettings LoadingText="Aguarde..." ReadyText="Pronto" />
                        </telerik:RadGrid>

So, after to pass the DataBind method, I can't see anything in my RadGrid, that is, the data wasn't populated . Is there anything wrong with the code or other part?



Iana Tsolova
Telerik team
 answered on 16 Jul 2009
1 answer
88 views
hi,
I am using a RadPanelBar in my one of the aspx page. There I am Using Custom CSS class for it.
My issue is , in the RadPanelBar, all colapsed item's are displaying with a bottom blue border, and its onmouse over, this is getting disappeared. Please help me to remove this bottom border from the collapsed items.

Thanks & Regards,
Dony Jose Augustine
Paul
Telerik team
 answered on 16 Jul 2009
1 answer
102 views
Hi Telerik,
I want to load my rad grid when all items are in edit mode (in place edit). my page size is 25 records per page, and allowPaging is set to true.
in page pre_render, i do:
for (int i = 0; i < gridChannels.PageCount * gridChannels.PageSize; i++) 
                    { 
                        gridChannels.EditIndexes.Add(i); 
                    } 
When a specific button clicked, or when paging the grid, i want to save the state of the rows. so I want to run over all the edited rows (which are actually all the rows in the grid) and get the values:
foreach (GridEditableItem editedItem in gridChannels.EditItems) 
            { 
// get data.. 

I find 2 problems:

1. Untill i specifically page to the last page of the grid, the pageCount property is set to the page number! meaning it is =1 when i load the grid, even though there are 3 pages to the grid!

2. EditItems property always set to 25, even after i page to page 3, which means the pageCount * page size = 75 so there are 75 edit index in the grid - 75 items in edit mode.

could you please explain why does this behavior occur?

Thanks,
Hadar
Iana Tsolova
Telerik team
 answered on 16 Jul 2009
1 answer
70 views
I have a basic global NodeTemplate defined at Design time which I would like to apply to only top level nodes. I try to set the child nodes' NodeTemplate = null on code behind in Page_Load or Page_Init but it has no effect.

To work around this issue I've removed the global template and I'm loading the top level nodes' Controls collection dynamically at runtime.

Little help anyone?
Cliff
Paul
Telerik team
 answered on 16 Jul 2009
2 answers
170 views
Hi,
So I have 2 grids in my page. Selecting on a row in top grid, results in new data in the 2nd grid.
I have a NeedDataSourceHandler in the second grid, but I am not able to retrieve the primary key of the row in the 1st grid
that was cliecked on ....
Protected Sub ReptSummaryGrid_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles ReptSummaryGrid.NeedDataSource 
        If e.IsFromDetailTable Then 
            LoadReportsSummary(8) 
        End If 
    End Sub 

The SelectedValue property of the 'source' is always coming as Nothing....

Any help is appreciated...
Daniel
Telerik team
 answered on 16 Jul 2009
1 answer
64 views
when i insert a flash in firefox 3.0 , it generated the code like below

 <object height="150" width="150" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param name="Movie" value="/aspnet-ajax/Editor/Img/UserDir/Marketing/ASP_AJAX_banner.swf">
<param name="play" value="true">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<param name="loop" value="false">
<param name="menu" value="false"><embed src="/aspnet-ajax/Editor/Img/UserDir/Marketing/ASP_AJAX_banner.swf" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" wmode="transparent" loop="false" menu="false" width="150" height="150"></object>

it doesn't has "</embed" tag . so it can't be showed in firefox .

Anyone can help solve this problem ?  thank you very much.
Rumen
Telerik team
 answered on 16 Jul 2009
1 answer
114 views
I'm trying to populate the RadTreeViewContextMenu when it first displays via WCF. Is there any built in functionality to do this? We currently have to put one item in the menu and set the expand mode to WebService. I know I could make a web service call to get this data (by firing on the OnClientContextMenuShowing), but I just wanted to find out if the RadTreeViewContextMenu had this functionality built in, which I may be overlooking. 

Also,  since every node in the tree could have a different context menu due to user permissions, I have to build the context menu each time by programmatically populating the context menu. However, once I've gotten the context menu for a node, I would really like to be able to cache the context menu. Would your suggestion be to just to store the menu.get_items() in an array stored by some key and then repopulate from that or is this functionality which may be coming in a future release (that is, a per node context menu that makes a service call only once per node)?
T. Tsonev
Telerik team
 answered on 16 Jul 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?