Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
608 views
What I have is a radgrid, wonderfully populated with data. On each row of this grid, I have three buttons (inherited from RadButtons). One of these buttons does not need any confirmation. Two of them, however, need confirmation before firing ItemCommand.

Part of the issue is a certain convoluted way the button is implemented, it requires me to use fireCommand from JavaScript. However, I need to obtain the row index to pass as a parameter to the fireCommand function.

How do I obtain the row index of the row containing my button for use in JavaScript?

01.function OnClientClickingDelete(sender, args) {
02.    var r = confirm('This action will delete the selected employee. Are you sure?');
03. 
04.    if (r == true) {
05.        var masterTable = $find('<%= rgEnrolled.ClientID %>').get_masterTableView();
06.        masterTable.fireCommand('Delete', ****RowIndex****);
07.    }
08.}
09. 
10.function OnClientClickingRestore(sender, args) {
11.    var r = confirm('This action will restore the selected employee. Are you sure?');
12. 
13.    if (r == true) {
14.        var masterTable = $find('<%= rgEnrolled.ClientID %>').get_masterTableView();
15.        masterTable.fireCommand('Restore', ****RowIndex****);
16.    }
17.}
Eyup
Telerik team
 answered on 26 Jun 2014
12 answers
994 views
Hi ,

I want to export the data to a excel file from the rad grid which have a hirarchical data.
I tried exporting in normal grid. It works fine. But i dont know how to do the same for hirarchical data.
If anybody knows the answer please let me know.

Thanks & Regards,
Pradeep K S
Daniel
Telerik team
 answered on 26 Jun 2014
8 answers
167 views
 void rdsch_AppointmentDataBound(object sender, SchedulerEventArgs e) 
        { 
               e.Appointment.AllowDelete = false
                e.Appointment.AllowEdit = false
         } 
If I set atrributes "AllowDelte" and "AllowEdit" on false, I can delete and edit appointment - why????
Plamen
Telerik team
 answered on 26 Jun 2014
1 answer
66 views
Hello,

I am using editor.get_html(true) in order to copy editor's content to a div, but when I only change  the text color, the color style isn't copied to a div.

I think the problem is that the color style is added to the body where it should wrap the text by span with color style.

*screenshot of the editor html is attached.

Scenario to reproduce:

1. mark the text
2. change the text color to red
3. use  editor.get_html(true) to copy the html content to a div
4. It can be notice the color red doesn't appear

Telerik version: 2014.1.225.40

Thanks,

Ianko
Telerik team
 answered on 26 Jun 2014
1 answer
130 views
Hi all,

During testing of the imageGallery control we had experienced a weird behavior.

Details about the testing environment:
a) Telerik.Web.UI.dll version: 2014.2.618.35
b) Windows 8.1 pro 64 bit
c) VS 2010
d) IIS 8.5

Control settings:
a) DisplayAreaMode: image
b) ThumbnailsAreaMode: Thumbnails
c) bind the datasource to the NeedDataSource event

Testing the control in a new project  is working as expected.
Using the control in an existing project it's render fine but when clicking on a thumbnail it doesn't change the selected picture; instead the webpage url changes
e.g. from www.test.com/test to www.test.com/test#
Furthermore, if there is a lot of content above the control and the control is at the bottom of the webpage after clicking one of the thumbnails is will scroll to the top of the page.

Maybe the thumbnails click events aren't registered correctly?

As it seems maybe isn't a Telerik problem, but any help would be appreciated. 

Chris
Top achievements
Rank 1
 answered on 26 Jun 2014
3 answers
83 views
Hello,

I have this code and it does what i say in the title, but to a MasterTableView.

ASPX
<telerik:RadSplitter runat="server" ID="RSDocumentosDespesa" Width="100%" Height="100%" BorderSize="2">
      <telerik:RadPane runat="Server" ID="LeftPaneDocDespesa" Scrolling="None">
          <telerik:RadSplitter runat="server" ID="rsDocDespesaDetail" Width="100%" Height="100%" Orientation="Horizontal">
              <telerik:RadPane runat="Server" ID="TopPaneDocDespesaDetail" Scrolling="Both" Height="30%">
                  <telerik:RadGrid runat="server" ID="rgDocumentos" ShowStatusBar="false" ShowFooter="false" AutoGenerateColumns="false" OnSelectedIndexChanged="rgDocumentos_SelectedIndexChanged" OnItemCommand="rgDocumentos_ItemCommand" OnItemDataBound="rgDocumentos_ItemDataBound"
                      AllowSorting="false" AllowMultiRowSelection="false" AllowPaging="false" OnItemCreated="rgDocumentos_OnItemCreated" OnNeedDataSource="rgDocumentos_NeedDataSource" OnPreRender="rgDocumentos_PreRender" OnColumnCreated="rgDocumentos_ColumnCreated">
                      <MasterTableView DataKeyNames="DDR_Tipo_Doc, DDR_Cod, DDR_Intervencao_Cirurgica, EST_Designacao">
                          <Columns>
                              <telerik:GridBoundColumn HeaderText="Nr Ordem" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" DataField="DDD_Num_Ordem" />
                              <telerik:GridBoundColumn HeaderText="Nr Doc." ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" DataField="DDD_Num_Doc" />
                              <telerik:GridBoundColumn HeaderText="Data" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" DataField="DDD_Data" />
                              <telerik:GridButtonColumn HeaderText="" HeaderStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ButtonType="ImageButton" ImageUrl="Images/Botao/cancel.gif" UniqueName="Imagem"></telerik:GridButtonColumn>
                              <telerik:GridBoundColumn HeaderText="Estado" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" DataField="EST_Designacao" UniqueName="Estado" />
                              <telerik:GridBoundColumn HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" DataField="Tipo_Doc_Desc" />
                              <telerik:GridBoundColumn HeaderText="Valor" DataFormatString="{0:F2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" DataField="DDD_Valor" />
                              <telerik:GridBoundColumn HeaderText="Valor Reembolsar" DataFormatString="{0:F2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" DataField="DDR_Valor_Reeembolso" />
                              <telerik:GridBoundColumn HeaderText="Valor Subsistema" DataFormatString="{0:F2}" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" DataField="DDR_Valor_Ref_Subsistema" />
...

C#
protected void rgDocumentos_ItemDataBound(object sender, GridItemEventArgs e)
   {
       if (e.Item is GridDataItem)
       {
           GridDataItem item = (GridDataItem)e.Item;
           switch (item.GetDataKeyValue("EST_Designacao").ToString().ToLower())
           {
               case "para devolução":
                   item["Imagem"].Enabled = false;
                   item["Devolver"].Enabled = false;
                   (item["Imagem"].Controls[0] as ImageButton).ImageUrl = "Images/para_devolucao.gif";
                   break;
               case "análise concluída":
                   item["Imagem"].Enabled = false;
                   item["Processar"].Enabled = false;
                   (item["Imagem"].Controls[0] as ImageButton).ImageUrl = "Images/analise_concluida.gif";
                   break;
         ...


But now i want to do it in one DetailTable inside, and now in this ASPX:
                   <telerik:RadGrid ID="rgProcessos" runat="server" ShowStatusBar="true" ShowFooter="false" CssClass="RadGrid"
                        AutoGenerateColumns="false" AllowSorting="true" AllowMultiRowSelection="false"
                        AllowPaging="true" OnDetailTableDataBind="rgProcessos_DetailTableDataBind"
                        OnNeedDataSource="rgProcessos_NeedDataSource" OnItemCommand="rgProcessos_ItemCommand"
                        OnItemCreated="rgProcessos_ItemCreated" OnColumnCreated="rgProcessos_ColumnCreated"
                        AllowFilteringByColumn="true"
                        PageSize="100" OnPreRender="rgProcessos_PreRender">
                        <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" Position="Bottom" PagerTextFormat="páginas: {4} | página {0} de {1}, registo {2} a {3} de {5}" />
                        <MasterTableView DataKeyNames="PRC_Cod, Alerta" Name="Processos">
 
                            <DetailTables>
                                <telerik:GridTableView DataKeyNames="ADI_Cod" Name="Aditamentos" Width="100%" ShowFooter="false" AllowFilteringByColumn="false" AllowPaging="false">
                                    <DetailTables>
                                        <telerik:GridTableView DataKeyNames="EST_Designacao" Name="Documentos" Width="100%" AllowFilteringByColumn="false" AllowPaging="false">
                                            <Columns>
                                                <telerik:GridBoundColumn HeaderText="Nr Ordem" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" DataField="DDD_Num_Ordem" />
                                                <telerik:GridBoundColumn HeaderText="Nr Documento" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" DataField="DDD_Num_Doc" />
                                                <telerik:GridBoundColumn HeaderText="Data" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" DataField="DDD_Data" />
<%--                                                <telerik:GridButtonColumn HeaderText="" HeaderStyle-Font-Bold="true" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ButtonType="ImageButton" ImageUrl="Images/Botao/cancel.gif" UniqueName="Imagem"></telerik:GridButtonColumn>--%>
                                                <telerik:GridBoundColumn HeaderText="Estado" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" DataField="EST_Designacao" UniqueName="Estado" />

Can you please help me how to do it? It is doing the same thing but to the GridButtonColumn in the inner detail table instead of doing it to the GridButtonColumn in the MasterTableView.

Thanks,
Mário
Mário
Top achievements
Rank 1
 answered on 26 Jun 2014
1 answer
192 views
Could you double check rendering a checkbox list in lightweight mode in IE11 (silk skin) - I have no space between checkbox and text.

For some reason the css is different,

in Chrome
​.RadListBox .rlbCheckAllItemsCheckBox,.RadListBox .rlbCheck {
vertical-align: middle;
margin: 0 .25em .25em .33333em !important;
padding-top: 0;
font-size: inherit
}


in IE
@media screen \0 {
.RadListBox .rlbCheckAllItemsCheckBox,.RadListBox .rlbCheck {
margin:0
}
}
Magdalena
Telerik team
 answered on 26 Jun 2014
3 answers
139 views
Hi

Is it possible to format/group the radgrid to a style similar to the one shown in this article: http://techbrij.com/grouping-gridview-rows-asp-net?

I need to be able to display a recordset in that format in a radgrid.

Regards
Kostadin
Telerik team
 answered on 26 Jun 2014
15 answers
807 views
Hi,
i am facing on problem with RadGrid if i am using ClientEvents-OnCommand.
the problem is if i am adding ClientEvents-OnCommand in radgrid, it does not fire itemcomamnd event of grid for InitiInsert and cancel command.
if i remove it ClientEvents-OnCommand, it works fine.
Viktor Tachev
Telerik team
 answered on 26 Jun 2014
1 answer
189 views
Is there a way to vertically center text inside the RadEditor window? Setting "vertical-align:middle" in the editor's CSS file doesn't seem to work.
Ianko
Telerik team
 answered on 26 Jun 2014
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?