Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
59 views
Hi 
I created a thread some days ago but it was never answered, it seems I might have marked it as "Answered" by mistake.

Here's the thread:
http://www.telerik.com/community/forums/aspnet-ajax/panelbar/adding-button-control-to-dynamically-created-radpanelbar.aspx#2305626
Eric
Top achievements
Rank 1
 asked on 02 Oct 2012
1 answer
163 views
I have a grid which is set to 100% height. The grid displays search results. When a user clicks on the "find" button, the results are loaded in the grid. In IE (9), the grid appears correctly. In Firefox (15), there is a vertical space of about 125px below the grid pager and the grid doesn't extend all the way down to the bottom of its container. If the user clicks on "search" a second time, the grid extends properly. I have attached two screen captures demonstrating what it looks like in ie (correct) and firefox (incorrect). I have added a panel with colored background as a container for the grid so you can see it appears to be the grid which is not extending and not the container. This effect occurs even if I do not include this panel. My markup is below.
<asp:Panel id="pnlSR" runat="Server" Height="100%" style="padding:5px; background-color:Red;">
                    <telerik:RadGrid id="rgSearchResults"
                            runat="server"
                            AutoGenerateColumns="False"
                            Skin="Simple"
                            Height="100%"
                            AllowPaging="True"
                            AllowSorting="True"
                            AllowCustomSorting="True"
                            AllowMultiRowSelection="True"
                            EnableLinqExpressions="false"
                            ShowStatusBar="True"
                            ShowGroupPanel="False"
                            PageSize="30"
                             
                    >
                        <MasterTableView 
                                    DataKeyNames="CVID"
                                    ClientDataKeyNames="CVID"
                                    Width="100%"
                                    TableLayout="Fixed"
                                    GroupLoadMode="Client"
                                    >
                             
                            <Columns>  
                                <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" Resizable="False" Visible="False">
                                    <HeaderStyle width="30px" HorizontalAlign="Center" CssClass="GridSelectColumnItem"></HeaderStyle>
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" CssClass="GridSelectColumnItem" ></ItemStyle>
                                </telerik:GridClientSelectColumn>
                                <telerik:GridImageColumn UniqueName="detailIcon" ImageWidth="16px" ImageUrl="~/global/images/icons/search.png" ImageAlign="Middle" AlternateText="View Visit Detail"  AllowSorting="False" AllowFiltering="false" Visible="False">
                                    <HeaderStyle width="30px" HorizontalAlign="Center"></HeaderStyle>
                                    <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" CssClass="HoverCursor"></ItemStyle>
                                </telerik:GridImageColumn>
                                <telerik:GridBoundColumn HeaderText="CVID" DataField="CVID" SortExpression="CVID">
                                    <HeaderStyle width="125px" HorizontalAlign="Left"></HeaderStyle>
                                    <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn UniqueName="SpacerColumn" AllowFiltering="false" SortExpression="" ></telerik:GridTemplateColumn>
                            </Columns>
                             
                            <CommandItemTemplate>
                                 
                            </CommandItemTemplate>
 
                            <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="True"/>
                             
                        </MasterTableView>
                         
                        <ClientSettings AllowExpandCollapse="True" >
                            <Selecting AllowRowSelect="True" EnableDragToSelectRows="False"  />
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="100%" />
                            <Resizing AllowColumnResize="False" EnableRealTimeResize="True" ResizeGridOnColumnResize="True"/>
                            <ClientEvents OnGridCreated="GridCreatedHandler_VFC" OnRowSelecting="CancelNonInputSelect" OnRowSelected="GridRowSelectedHandler_VFC" OnRowDeselected="GridRowDeselectedHandler_VFC"   />
                        </ClientSettings>
                         
                    </telerik:RadGrid>
 
                   
                     
                </asp:Panel>

Galin
Telerik team
 answered on 02 Oct 2012
1 answer
1.3K+ views
How do I work with the RadGrid GridButtonColumn if in case I want to use the button to edit a record?  I have not seen any documentation as far as this control is concerned, can somebody point me in the right direction as far as programming a datasource with this control? 
Thank you!
Jayesh Goyani
Top achievements
Rank 2
 answered on 02 Oct 2012
3 answers
105 views
I have a strange problem. I am using a UserControl (say UserControlA) that has a RadGrid on it which is inside another UserControl (say UserControlB) that is Ajax enabled with RadAjax. So it looks like this:


Page > UserControlB (Ajax Enabled) > UserControlA > RadGrid


On a test page this works fine with the ItemCommand of RadGrid firing properly.


Now when I put the UserControlB in my final page (that has many other controls), the ItemCommand of the RadGrid does not fire at all! The funny thing is that this page has many other usercontrols that has its own grid which fires just fine!


So, the only thing I can think of is the Ajax Enabled UserControlB.


The ItemCommand is used in the straignt forward way:


...
        <telerik:GridTemplateColumn HeaderText="Actions">
            <ItemTemplate>
                <asp:Panel id="iconsPanel" runat="server" Visible="<%# IsActionVisible() %>">
                <asp:ImageButton ID="btnDelete" runat="server"ImageUrl="~/images/icons/Small/delete.gif"
                    ToolTip="Delete Document" CommandName="Delete" />
                    </asp:Panel>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
...


Then I am using normal DataSource() and DataBind()


finally the ItemCommand is created as:


private void InitializeComponent()
   {
       this.Init += new System.EventHandler(this.Page_Init);
       this.Load += new System.EventHandler(this.Page_Load);
       grdDocuments.ItemCreated += newTelerik.Web.UI.GridItemEventHandler(grdDocuments_ItemCreated);
       grdDocuments.ItemDataBound += newGridItemEventHandler(grdDocuments_ItemDataBound);
       grdDocuments.ItemCommand += newGridCommandEventHandler(grdDocuments_ItemCommand);
   }


Any ideas on how to proceed? I am running out of options, tried many things but nothing worked! 
Jayesh Goyani
Top achievements
Rank 2
 answered on 02 Oct 2012
3 answers
254 views
Hey there,

Anyone know how to get a custom attribute from a RadNumericTextBox?  I've tried:

<telerik:RadNumericTextBox ID="RadNumericTextBox0" testAtrb="Hello world" ... 


function ValueChanged(sender, eventArgs) 
{ 
     alert(sender.testAtrb); 
     alert(sender.get_element().testAtrb); 
     alert(sender.get_element().getAttribute("testAtrb")); 
} 
         

But no worky :(
Kavitha
Top achievements
Rank 1
 answered on 02 Oct 2012
5 answers
223 views
Hi, I'm working on an app asp.net and using radchart control in it, I wrote the next test code:

HTML
<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
        <telerik:RadChart ID="chrChart" runat="server" >
            <PlotArea>
                <EmptySeriesMessage  Visible="True">
                    <Appearance Visible="True">
                    </Appearance>
                </EmptySeriesMessage>
            </PlotArea>
        </telerik:RadChart>
    </div>
</form>

vb.net code

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    chrChart.Clear()
    chrChart.AutoLayout = True
    chrChart.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Font = New Font("Arial", 10)
    chrChart.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = Color.Black
    chrChart.PlotArea.XAxis.AutoScale = False
    Dim loDataSeries As New ChartSeries("Chart test", ChartSeriesType.Bar)
    loDataSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels
    Dim myItem1 As New ChartSeriesItem(10, "myitem1")
    myItem1.Name = "myitem1"
    Dim myItem2 As New ChartSeriesItem(20, "myitem2")
    myItem2.Name = "myitem2"
    loDataSeries.AddItem(myItem1)
    loDataSeries.AddItem(myItem2)
    chrChart.AddChartSeries(loDataSeries)
End Sub

this code showed the bar chart correctly, but When I changed the ChartSeriesType to Pie, the graphics is not shown, (see image attached).
Dim loDataSeries As New ChartSeries("Chart test", ChartSeriesType.PIE)

When I comment the next code:

'chrChart.PlotArea.XAxis.AutoScale = False

I get the next exception

    Unable to cast object of type 'Telerik.Charting.ChartXAxis' to type 'Telerik.Charting.ChartYAxis'.

regardless if the  ChartSeriesType is Bar or Pie, I get the error.

What am I doing wrong?

This is my web.config file:

<?xml version="1.0"?>
<configuration>
  <appSettings>
    <add key="Telerik.Skin" value="Metro"/>
    <add key="Telerik.ScriptManager.TelerikCdn" value="Disabled"/>
    <add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled"/>
  </appSettings>
  <system.web>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      </assemblies>
    </compilation>
    <pages>
      <controls>
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>
      </controls>
    </pages>
    <httpHandlers>
      <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false"/>
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/>
      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/>
      <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false"/>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>
    </httpHandlers>
    <httpModules>
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
    </httpModules>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="RadCompression"/>
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode"/>
    </modules>
    <handlers>
      <remove name="ChartImage_axd"/>
      <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode"/>
      <remove name="Telerik_Web_UI_SpellCheckHandler_axd"/>
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode"/>
      <remove name="Telerik_Web_UI_DialogHandler_aspx"/>
      <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode"/>
      <remove name="Telerik_RadUploadProgressHandler_ashx"/>
      <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode"/>
      <remove name="Telerik.Web.UI.WebResource"/>
      <add name="Telerik.Web.UI.WebResource" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode"/>
    </handlers>
  </system.webServer>
 
  <location path="Telerik.Web.UI.WebResource.axd">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>
  <location path="ChartImage.axd">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location> 
</configuration>


This problem didn't happen when I used the build 2012_1_215, this problem ocurred to me with the build  2012_2_918

any help solving this topic is appreciate, I need purchase this controls immediately.

kind regards.

Carlos
Top achievements
Rank 1
 answered on 02 Oct 2012
1 answer
89 views
If any ideas please share with me,

I want to drag only row from rad grid view and drop it into rad tree view control

Thanks


Plamen
Telerik team
 answered on 02 Oct 2012
3 answers
137 views
http://www.telerik.com/community/forums/aspnet-ajax/grid/persist-radgrid-settings-in-profile.aspx

I tried this - there is a limit of 3 sorting columns saved.  If I select a sort on 4 columns only 3 are persisted. Is that the way it is supposed to work?

спасибо
Tsvetoslav
Telerik team
 answered on 02 Oct 2012
1 answer
182 views
Hi all I have designed my pivot grid as follows

<telerik:RadPivotGrid EnableViewState="true" AllowPaging="true" PageSize="10" Width="800px"
            ViewStateMode="Inherit" ID="RadPivotGrid1" runat="server" ColumnHeaderZoneText="ColumnHeaderZone"
            ShowColumnHeaderZone="true" ShowDataHeaderZone="False" OnNeedDataSource="RadPivotGrid1_NeedDataSource">
            <ClientSettings AllowFieldsReordering="True">
                <Scrolling AllowVerticalScroll="True" ScrollHeight="320px" />
            </ClientSettings>
            <Fields>
                <telerik:PivotGridRowField DataField="EmpID" ZoneIndex="0">
                </telerik:PivotGridRowField>
                <telerik:PivotGridRowField DataField="PayeeName" ZoneIndex="1">
                </telerik:PivotGridRowField>
                <telerik:PivotGridColumnField DataField="BankAccountType">
                </telerik:PivotGridColumnField>
                <telerik:PivotGridAggregateField DataField="BankRoutingNumber">
                </telerik:PivotGridAggregateField>
                <telerik:PivotGridAggregateField DataField="BankAccount">
                </telerik:PivotGridAggregateField>
            </Fields>
            <TotalsSettings GrandTotalsVisibility="None" />
            <ZoneContextMenu EnableTheming="True" ID="rpgzcMenu">
            </ZoneContextMenu>
        </telerik:RadPivotGrid>

And my code for binding is as follows

protected void RadPivotGrid1_NeedDataSource(object sender, Telerik.Web.UI.PivotGridNeedDataSourceEventArgs e)
    {
        MySqlConnection con = new MySqlConnection(ConfigurationManager.ConnectionStrings["sqlcon1"].ConnectionString);
        MySqlCommand cmd = new MySqlCommand("select EmpID,BankAccountType,PayeeName,BankRoutingNumber,BankAccount,Amount from tblemployeebankdata where EmpID=1021", con);
        con.Open();
        MySqlDataAdapter da = new MySqlDataAdapter();
        da.SelectCommand = cmd;
        DataSet ds = new DataSet();
        da.Fill(ds);
        RadPivotGrid1.DataSource = ds;
    }
  
My pivot grid looks as follows

http://imageshack.us/photo/my-images/109/pivoto.jpg/

Can some one help me. Also how can I use edit and delete options in pivot grid
Andrey
Telerik team
 answered on 02 Oct 2012
3 answers
127 views
Hi there, 

I am using the RadAutoCompleteBox  control and I have a question. 

I see you can bind it to a sql provider or even a webservice. In my case I do not want to put in the sql on the page. I have a remoting object and i wish to use its method. 

How would be the best way to implement in such an environment.

Thanks

K
Kalina
Telerik team
 answered on 02 Oct 2012
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?