Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
215 views
Hello,

I'm using a radgrid in my solution. I use this radgrid for draging and dropping of data, but nothing needs to be selected. So when a user clicks a row, the row shouldn't change his lay-out to a selected row. But when i disable selecting, drag and drop won't work anymore. It's not that kind of a problem that the user can select a row, but it must be at least invisible for the user because some users can get confused.

Is there a way to ether disable selection but keep drag and dropping or overridage/delete the css of a selected row?
I hope anyone can help me!

Thank you in advance!

Kind regards,
Wesley

p.s. excuse me for my bad English
Andrey
Telerik team
 answered on 23 Apr 2012
2 answers
142 views
When setting PageSize in code behind, pager will not navigate past page 1.


Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim dataPager As RadDataPager = DirectCast(lstProduct.FindControl("RadPager1"), RadDataPager)
    dataPager.PageSize = 36

<telerik:RadDataPager ID="RadPager1" AllowSEOPaging="true" SEOPagingQueryPageKey="page"  skin="Office2010Silver"
                                                            runat="server" PagedControlID="lstProduct" >
                                                            <Fields>
                                                                <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                                                                <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="7"/>
                                                                <telerik:RadDataPagerButtonField FieldType="NextLast" />
                                                                <telerik:RadDataPagerTemplatePageField>
                                                                    <PagerTemplate>
                                                                        <div style="float: right">
                                                                            <b>Items
                                                                                <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" />
                                                                                to
                                                                                <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# IIF(Container.Owner.TotalRowCount > (Container.Owner.StartRowIndex+Container.Owner.PageSize), Container.Owner.StartRowIndex+Container.Owner.PageSize, Container.Owner.TotalRowCount) %>" />
                                                                                of
                                                                                <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                                                                                <br />
                                                                            </b>
                                                                        </div>
                                                                    </PagerTemplate>
                                                                </telerik:RadDataPagerTemplatePageField>
                                                            </Fields>
                                                        </telerik:RadDataPager>

Maria Ilieva
Telerik team
 answered on 23 Apr 2012
1 answer
81 views
This is my source code. I need to put a legend and Month/Year on XAxis. How do I do? Below my code.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using Telerik.Charting;
using System.Data.OracleClient;
using System.Data.SqlClient;
using System.IO;
using System.Data;
using System.Configuration;
using System.Text.RegularExpressions;
using System.Text;


namespace GetNet.Monitoracao.UI.Web.Graficos
{
    public partial class DesempenhoMensal : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //Cria o objeto Chart, base de todos os gráficos
            RadChart radChart1 = new RadChart();
            radChart1.ChartTitle.TextBlock.Text = "EVOLUÇÃO MENSAL APROVADAS DÉBITO";            


            //Muda a cor de fundo do gráfico para transparente
            radChart1.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid;
            radChart1.Appearance.FillStyle.MainColor = System.Drawing.Color.Transparent;
            radChart1.PlotArea.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid;
            radChart1.PlotArea.Appearance.FillStyle.MainColor = System.Drawing.Color.Transparent;
            this.Controls.Add(radChart1);


            RadChart radChart2 = new RadChart();
            radChart2.ChartTitle.TextBlock.Text = "EVOLUÇÃO MENSAL APROVADAS CRÉDITO";


            //Muda a cor de fundo do gráfico para transparente
            radChart2.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid;
            radChart2.Appearance.FillStyle.MainColor = System.Drawing.Color.Transparent;
            radChart2.PlotArea.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid;
            radChart2.PlotArea.Appearance.FillStyle.MainColor = System.Drawing.Color.Transparent;
            this.Controls.Add(radChart2);
                                    
            ChartSeries chartSeries1 = radChart1.CreateSeries("DEBITO", System.Drawing.Color.LightBlue, System.Drawing.Color.LightBlue, ChartSeriesType.Bar);
            ChartSeries chartSeries2 = radChart2.CreateSeries("CRÉDITO", System.Drawing.Color.LightCyan, System.Drawing.Color.LightCyan, ChartSeriesType.Bar);
            ChartSeries chartSeries3 = radChart1.CreateSeries("DEBITO", System.Drawing.Color.LightGreen, System.Drawing.Color.LightGreen, ChartSeriesType.Bar);
            ChartSeries chartSeries4 = radChart2.CreateSeries("CREDITO", System.Drawing.Color.Silver, System.Drawing.Color.Silver, ChartSeriesType.Bar);


            chartSeries1.Type = ChartSeriesType.Bar;
            chartSeries2.Type = ChartSeriesType.Bar;
            chartSeries3.Type = ChartSeriesType.Bar;
            chartSeries4.Type = ChartSeriesType.Bar;


            chartSeries1.;


            //A orientação do gráfico
            radChart1.SeriesOrientation = ChartSeriesOrientation.Vertical;
            radChart2.SeriesOrientation = ChartSeriesOrientation.Vertical;
            
            //Tamanho da área do gráfico em pixels
            radChart1.Height = 300;
            radChart1.Width  = 800;


            radChart2.Height = 300;
            radChart2.Width = 800;


            int[] dataArray1 = new int[] { 12, 56, 23, 89, 12, 56, 34, 78, 32, 56 };
            int[] dataArray3 = new int[] { 2, 6, 53, 19,22, 36, 34, 18, 42, 26 };




            foreach (int i in dataArray1) {
                chartSeries1.AddItem(i, "");
            }
            foreach (int i in dataArray3)
            {
                chartSeries3.AddItem(i, "");
            }
            
            int[] dataArray2 = new int[] { 42, 16, 13, 9, 12, 86, 30, 38, 62, 26 };
            int[] dataArray4 = new int[] { 32, 36, 10, 39, 72, 16, 20, 58, 82, 36 }; 
                        
            foreach (int I in dataArray2)
            {
                chartSeries2.AddItem(I, "");
            }
            foreach (int I in dataArray4)
            {
                chartSeries4.AddItem(I, "");
            }
        }
    }
}
Petar Marchev
Telerik team
 answered on 23 Apr 2012
1 answer
128 views
Is it possible for the text for resources to word-wrap.  Please see attached.
Plamen
Telerik team
 answered on 23 Apr 2012
1 answer
51 views
Hi,

I use RadPanelBar inside a Div, and I have RadComboBox under the RadPanelBar.
When I expand the RadPanelBar, it push the RadComboBox down.
Is there a way to expand the RadPanelBar in a way that it will be opened and "hide" the RadComboBox (like when you open the RadComboBox and it "hides" everything under).

Attached print screen named "Opened", to see the result.I expect that the RadPanelBar will hide the combo box.
Kate
Telerik team
 answered on 23 Apr 2012
4 answers
156 views
Hi everyone,
i want to add an ImageColumn at the end of a RadGrid which is using a DataTable as DataSource.
DataTable dtTable = objTest.ReturnsDataTable();
RadGrid2.DataSource = dtTable;
RadGrid2.DataBind();
GridImageColumn gridImageCol = new GridImageColumn();
gridImageCol.ImageUrl = "/images/stift_icon.gif";
GridImageButton gridButton = new GridImageButton(gridImageCol);
gridButton.OnClientClick = "testAlert";
 
 
RadGrid2.DataBind();
RadGrid2.Columns.Add(gridImageCol);
//RadGrid2.Rebind();
RadGrid2.DataBind();
Because of the Source (i guess) i need to call the Binding-Metod, so that the row can be added (at the end).
If i just now add the Column without calling DataBind() or Rebind() again, the ImageColumn will not be shown. And by using those methods, the ImageColumn is the first Column.

Is there a way to solve this?
Is it maybe possible to switch the position of the columns? (I could use this in another case).

Thanks in advance,
Marcel
Maria Ilieva
Telerik team
 answered on 23 Apr 2012
1 answer
111 views
Hi there,I have a radgrid in my page ,each row except some columns has agree and disagree image.
                    <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="../Img/Moderator/agt_stop-32.png" ItemStyle-Width="100px"
                    ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"  
                    CommandName="Select" HeaderText="Dissagree" />
                    <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="../Img/Moderator/Tick_32.png"  ItemStyle-Width="100px"
                    ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"   
                    CommandName="Select" HeaderText=" Agree" />

I want to check whether agree has been clicked or disagree.
something like this:
if(disagree)//clicked
{
        //if user is disagree insert 0 to table(in my db)
}
if(agree)//clicked
{
        //if user is agree insert 1 to table(in my db)
}

how can I do that?
tnx
Jayesh Goyani
Top achievements
Rank 2
 answered on 23 Apr 2012
3 answers
103 views
Hi Support

In Radgrid for asp.net , I have large number of records in Grid and there is radio button along side with every row , I also use paging and page size = 20, now how can I know which row number will be if radio button number choose by user  or suppose selected RadioButton is 80 then how can i show the radgrid paging in that page where the radiobutton is existed . By default paging starts from 1 but I need to show that page where user choose may be the page is in 8th number paging ,

See the code:
Private void Method(int number)
{
RadGrid1.Allowpaging = false;
 RadGrid1.ReBind();
 foreach (GridDataItem item in grid1.Items)
 {
  RadioButton btn = (RadioButton)item.FindControl("radiobutton1");
  string value = item.GetDataKeyValue("Questionnumber").ToString(); 
    if( value == Questionnumber)
          {
                 btn.checked = true;
RadGrid1.CurrentpageIndex = questionnumber;
}
RadGrid1.Allowpaging = true;
RadGrid1.PageSize = 20;
 RadGrid1.ReBind(); // if I write this then my Radio Button selected is not show and if I not write then paging is not show

Any suggestion will be helpful or any demo project
Jayesh Goyani
Top achievements
Rank 2
 answered on 23 Apr 2012
1 answer
82 views

In telerik gridview,  i am having checkbox, preview button, description button in each row of telerik grid once i select some checkboxes and hits download button i want to uncheck all the checkboxes that were checked earlier in the grid. is there any way in javascript  or telerik functionality to uncheck all the checkboxes after hitting download button

Princy
Top achievements
Rank 2
 answered on 23 Apr 2012
1 answer
72 views
hi all
I have 2 templateColumn in my RadGrid
first column has RadNumericTextBox and second column,contains Checkbox

I want in clientSide, when user enter a number in textbox, the checkbox of that row,be CHECKED.

how can I do that?
Shinu
Top achievements
Rank 2
 answered on 23 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?