Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
91 views
Hi,
      Can you please provide me a method to make the alternating row color of a particular column to blue color. Im using skin. How can I accomplish it in code behind.
Savyo
Jayesh Goyani
Top achievements
Rank 2
 answered on 23 May 2012
1 answer
181 views
I followed your great documentation on Export RadGrid content to Excel/Word/CSV/PDF with Ajax enabled . It works flawlessly - the export itself.

My javascript code is very close to the example code provided:
function requestStart(sender, args) {
    if (args.get_eventTarget().indexOf("lnkExportExcel") >= 0)
        args.set_enableAjax(false);
}


But after exporting the AJAX remains disabled. How do I re-enable AJAX after the RadGrid has been exported? Do i need to refresh the whole page or is there something like "radGrid.Re-EnableAJAX()" via Javascript?

When I load my UserControl in a regular web application AJAX works after clicking the Excel Button, however when using the userControl in SharePoint (on an Application page) Ajax doesn't work anymore, though it looks like a Postback.

So basically I have an application page, loading a user control which contains a RadGrid with Excel Export. When clicking the Excel button, AJAX is disabled just fine, but afterwards all other AJAX features (e.g. Grid filtering) don't work anymore.

PS: (I also posted this here)
Dennis
Top achievements
Rank 1
 answered on 23 May 2012
1 answer
203 views
Hello,

I am using RadTreeView in my ASP.Net WebPart however while access the same control from client side I am getting null for $find().

I am loading the RadTreeView from class which inherits the ASP.Net WebPart class as follows:
protected override void CreateChildControls()
        {
RadTreeView treeview = new RadTreeView() { ID = "RadTreeView", Width = new System.Web.UI.WebControls.Unit(285),
           Height = new System.Web.UI.WebControls.Unit(290),
           CheckBoxes = true
                                                                        };
                    treeview.Nodes.Add(new RadTreeNode("Test"));
                    Controls.Add(treeview);
base.CreateChildControls();           
        }

I am trying to use get the same control from client side from javascript file as follows:
function pageLoad() {
checkMain();
}
function checkMain() {
var tree = $find("<%= RadTreeView1.ClientID %>");
alert(tree);
}


I am getting tree as null, I have went throught all the documentation provided however not sure what missing.

The control render in page as below:
<div style="overflow:auto;height:290px;width:285px;" class="RadTreeView RadTreeView_Default" id="ctl00_m_g_105ccf0c_7bb3_4553_b184_03f24f749c13_RadTreeView">
                        <ul class="rtUL rtLines">
                            <li class="rtLI rtFirst rtLast"><div class="rtTop">
                                <span class="rtSp"></span><input type="checkbox" class="rtChk"><span class="rtIn">Test</span>
                            </div></li>
                        </ul><input type="hidden" name="ctl00_m_g_105ccf0c_7bb3_4553_b184_03f24f749c13_RadTreeView_ClientState" id="ctl00_m_g_105ccf0c_7bb3_4553_b184_03f24f749c13_RadTreeView_ClientState" autocomplete="off" value="{"expandedNodes":[],"collapsedNodes":[],"logEntries":[],"selectedNodes":[],"checkedNodes":[],"scrollPosition":0}">
                    </div>

Please let me know your thoughts.

Shinu
Top achievements
Rank 2
 answered on 23 May 2012
4 answers
475 views
I have three rad radio button in a group, i need to be able to validate that one of the group has been selected before i allow the user to move on. Trying to use the requiredfieldvalidator or comparevalidator, but they throw an error saying that the rad button isn't valid control to validate. Does anyone have a work around for this?
Princy
Top achievements
Rank 2
 answered on 23 May 2012
3 answers
254 views
Here is my resulting chart:
http://s15.postimage.org/7y165x8xn/mychart.jpg

The issue that I have is I need the legend to reflect the same color that is in the pie chart, or it will be really hard to know what number goes with each piece of the pie.  I also would love to remove Quantity from the list. 

here is my C#
string[] ParamArgs = { "IdParam|" + HttpContext.Current.Session["Id"], "INParam|" + HttpContext.Current.Session["Current"] };
        ColorPieChart = StoreProcedureDTTable("ColorPieChart_By_Specific", ParamArgs, "ColorPieChart_By_Specific");
        ColorPieChart.ChartTitle.TextBlock.Text = "Quantity by Color";
        ColorPieChart.Legend.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.TopRight;
        ColorPieChart.DataSource = ColorPieChart;
        ColorPieChart.PlotArea.XAxis.AxisLabel.Visible = true;
        ColorPieChart.PlotArea.YAxis.AxisLabel.Visible = true;
        
        foreach (DataRow dtRow in ColorPieChart.Rows)
        {
            LabelItem item = new LabelItem();
            item.Name = dtRow["Color"].ToString();
            item.TextBlock.Text = dtRow["Color"].ToString();
            ColorPieChart.Legend.Items.Add(item);

        }
        ColorPieChart.AutoLayout = true;
        ColorPieChart.DataBind();

Here is my aspx:
<telerik:RadChart ID="ColorPieChart" runat="server"
                            ChartImageFormat="Jpeg" DefaultType="Pie" Height="400px" Skin="WebBlue"
                            Width="465px" Appearance-LegendDisplayMode="ItemLabels">
                            <Appearance>
                                <FillStyle MainColor="249, 250, 251">
                                </FillStyle>
                                <Border Color="160, 170, 182" />
                            </Appearance>
                            <Legend>
                                <Appearance Dimensions-Margins="17.6%, 3%, 1px, 1px"
                                    Dimensions-Paddings="2px, 8px, 6px, 3px"
                                    Position-AlignedPosition="BottomRight">
                                    <ItemTextAppearance TextProperties-Color="102, 102, 102">
                                    </ItemTextAppearance>
                                    <ItemMarkerAppearance Figure="Triangle">
                                    </ItemMarkerAppearance>
                                    <FillStyle MainColor="216, 222, 227">
                                    </FillStyle>
                                    <Border Color="160, 170, 182" />
                                </Appearance>
                            </Legend>
                            <PlotArea>
                                <EmptySeriesMessage Visible="True">
                                    <Appearance Visible="True">
                                    </Appearance>
                                </EmptySeriesMessage>
                                <XAxis>
                                    <Appearance Color="160, 160, 160">
                                        <MajorGridLines Color="227, 227, 227" Width="0" />
                                        <TextAppearance TextProperties-Color="140, 140, 140">
                                        </TextAppearance>
                                    </Appearance>
                                    <AxisLabel>
                                        <TextBlock>
                                            <Appearance TextProperties-Color="140, 140, 140">
                                            </Appearance>
                                        </TextBlock>
                                    </AxisLabel>
                                </XAxis>
                                <YAxis>
                                    <Appearance Color="160, 160, 160">
                                        <MajorGridLines Color="227, 227, 227" />
                                        <MinorGridLines Color="227, 227, 227" />
                                    </Appearance>
                                    <AxisLabel>
                                        <TextBlock>
                                            <Appearance TextProperties-Color="140, 140, 140">
                                            </Appearance>
                                        </TextBlock>
                                    </AxisLabel>
                                </YAxis>
                                <Appearance>
                                    <FillStyle FillType="Solid" MainColor="">
                                    </FillStyle>
                                </Appearance>
                            </PlotArea>
                            <ChartTitle>
                                <Appearance>
                                    <FillStyle MainColor="">
                                    </FillStyle>
                                </Appearance>
                                <TextBlock Text="Chart by Color Quantity">
                                    <Appearance TextProperties-Color="102, 102, 102"
                                        TextProperties-Font="Arial, 14pt">
                                    </Appearance>
                                </TextBlock>
                            </ChartTitle>
                    </telerik:RadChart>


Any help is appreciated!
Petar Marchev
Telerik team
 answered on 23 May 2012
4 answers
258 views
The date entered into the RadDatePicker in format of 04/14/2012 and when you click on the go button the displayed date changes to 2012-04-14- it then goes back to 04/14/2012.  This causes a flicker issue in the field on the go click.  Is there a setting to stop this from happening?
<CommandItemTemplate>
    <table cellspacing="5px" cellpadding="0" style="width: 100%;height: 25px;margin: 0px;padding: 0px;border-bottom: 1px solid #cccccc;background-color: #ffffff;">
    <tr><td style="width:250px;text-align: left; padding-left: 1px;" nowrap="nowrap">
            <table cellspacing="0" cellpadding="0" border="0" style="width: 250px;height: 25px;margin: 0px;padding: 0px;border-bottom: 1px solid #cccccc;background-color: #ffffff;">
                <tr>
                    <td style="width:100px;text-align: right; padding-left: 1px;" nowrap>
                        <telerik:RadDatePicker ID="RadDatePicker1" Runat="server" Skin="Outlook" AutoPostBack="False" Width="100">
                            <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" Skin="Outlook"></Calendar>
                            <DateInput DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy" AutoPostBack="False"></DateInput>
                            <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
                        </telerik:RadDatePicker>
                    </td><td style="width:20px;text-align:left;vertical-align:middle;padding-left:1px;" nowrap="nowrap">
                        <asp:Image ID="Image1" runat="server" Height="1" Width="1" ImageUrl="images/shim.gif" />
                        <asp:Label ID="Label1" runat="server" Text="to" CssClass="LabelStyle"></asp:Label>
                        <asp:Image ID="Image4" runat="server" Height="1" Width="5" ImageUrl="images/shim.gif" />
                    </td><td style="width:100px;text-align:left;vertical-align:middle;padding-left:1px;" nowrap="nowrap">
                        <telerik:RadDatePicker ID="RadDatePicker2" Runat="server" Skin="Outlook" AutoPostBack="False" Width="100">
                              <Calendar ID="Calendar1" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" Skin="Outlook" runat="Server"></Calendar>
                              <DateInput ID="DateInput1" DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy" AutoPostBack="False"  runat="Server"></DateInput>
                              <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
                        </telerik:RadDatePicker>  
                   </td><td style="width:30px;text-align:left;vertical-align:middle;padding-left:1px;" nowrap="nowrap">                                                                                              
                        <asp:Button ID="cmdSearch" runat="server" Text="Go" CssClass="ButtonStyle" CommandName="Refresh" />         
                   </td>
                </tr>
            </table>
        </td><td style="width:50%;text-align: center">
            <asp:Label ID="LabelDate" runat="server" Text="" CssClass="LabelStyle"></asp:Label>
        </td><td style="width:20%;text-align: right">
            <asp:Image ID="Image2" runat="server" Height="1" Width="20" ImageUrl="images/shim.gif" />
        </td></tr>
    </table>
</CommandItemTemplate>

Eyup
Telerik team
 answered on 23 May 2012
1 answer
117 views
I have a rad treeview. i want an image to be shown with every node. How can I do that. please help me.
Princy
Top achievements
Rank 2
 answered on 23 May 2012
1 answer
97 views
Can i open a RadWindow at  different locations with adjusting its size??
Shinu
Top achievements
Rank 2
 answered on 23 May 2012
4 answers
337 views
I followed your great documentation on Export RadGrid content to Excel/Word/CSV/PDF with Ajax enabled . It works flawlessly - the export itself.

My javascript code is very close to the example code provided:
function requestStart(sender, args) {
    if (args.get_eventTarget().indexOf("lnkExportExcel") >= 0)
        args.set_enableAjax(false);
}


But after exporting the AJAX remains disabled. How do I re-enable AJAX after the RadGrid has been exported? Do i need to refresh the whole page or is there something like "radGrid.Re-EnableAJAX()" via Javascript?

Maybe you could update your documentation on re-enabling Ajax as well.
Jayesh Goyani
Top achievements
Rank 2
 answered on 23 May 2012
5 answers
367 views
I have a radgrid. In this RadGrid I have a DropDown list that contains value 0 to number of rows in grid-1. I want to move rows up and down on basis of dropdown selected index value for that grid. If in dropdown selected index is 2(Value is 1) then this rows should display at  osecond row in Rad grid.

Please suggest.

Thanks.
Shinu
Top achievements
Rank 2
 answered on 23 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?