Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
1.1K+ 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
66 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
213 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
165 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
56 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
103 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
135 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
76 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
2 answers
102 views
Hi All,

Is it possible to add spell checking capabilities to GridHTMLEditorColumn or any details as to how to customise the editor in a GridHTMLEditorColumn?

Thanks

Guido
Martijn
Top achievements
Rank 1
 answered on 02 Oct 2012
1 answer
31 views
Hi ,

Please help me to get out from the below mentioned situtaion.

Requirement :
we have radgrid and on click of add new record a pop up is opened where we have few customized fields.
We have a radtext box which is attched with a radbutton , once the user enter any details in the text box and click on the button the same needs to be populated in Checkbox list provided just below . and finally when user is done filling up all the details and then clicks on enter button the record needs to be saved to database.

What we following we did .
first we made AllowOnSubmit = true ( We have to use this as when we are editiing the record its inline and when we inserting its pop up , so when user updates in inline mode and hits enter button this property will helpt to update the same.)

Problem :
1) Due to the above property on pop up the  when ever user tries to enter value in the textbox and hits enter, the radbutton assosiated with text box is not being click ( where as its was taking if we do not use the above property), the following event is fired and its forced to insert the record. "PerformInsert" its the command name for the save button of pop up.
Even though we have validation applied on the pop up it still goes to cs page.

We tried to handle the same using Javascripts but it fails as it forced to over write that property.

we did tried to over write the below thigns

args._eventTarget

args._postbackControlClientID

args.EventTarget

to acheive the target event of ADD button rather its taking Save button even and performs the action.

2) Also we are getting e.CommandName but we are not able to use e.CommandSource.

Please suggest us on the above .

Thanks in advance.
Eyup
Telerik team
 answered on 02 Oct 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?