Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
617 views

Hi,

I have a radgrid with a lazy load method to handle the binding. The binding is done via a button's CustomParameter that, when it's clicked, provides the parameters for the query that populates the grid. Problem is: the Grid's NeedDataSource is triggered before the rebind call on the button's click event and messes up the whole thing.

Here is the grid NeedDataSource, where the 'bind' variable is to prevent the call when first accessing the page

protected void Quotas_Table_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
                if (bind && Session["SessionId"] != null)
                {
                    Quotas_Table.DataSource = Empresas_DAL.GetQuotasList((string)Session["TP_QT_" + (string)Session["SessionId"]], int.Parse((string)Session["PRD_QT_" + (string)Session["SessionId"]]), DateTime.Now.Year);
                }
        }

 

and here is the button's event, where all variables here are strings:

protected void Compilar_Click(object sender, EventArgs e)
        {
            LinkButton lnk = sender as LinkButton;
            string param = lnk.Attributes["CustomParameter"];
 
            tipo = param.Substring(0, 1);
            periodo = param.Substring(1);
 
            Session["TP_QT_" + (string)Session["SessionId"]] = tipo;
            Session["PRD_QT_" + (string)Session["SessionId"]] = periodo;
 
            bind = true;
            Quotas_Table.Rebind();
        }
Konstantin Dikov
Telerik team
 answered on 23 Jan 2017
1 answer
127 views

Hi

Is it possible to change in the code behind the order for statically created panels?

The only way I can think of doing it is to create each panel as a user control, and dynamically add them.

 

Andy

 

 

Ivan Danchev
Telerik team
 answered on 23 Jan 2017
4 answers
193 views
Hello Telerik Team,

I am getting one error in javascript displaying as "OnClientClose " is undefined.

Below are the steps.
1) I am opening a popup through the below code:

 

 

 

 

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" VisibleStatusbar="false" >
<Windows >
<telerik:RadWindow ID="TaskList" runat="server" Title="TaskList" modal="true" 
OnClientClose="OnClientClose"></telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>


//Call a javacript code 
  
<script type="text/javascript">
function OnClientClose(oWnd, args)  
        oWnd.setUrl("XYZ.aspx"); 
}
</script>
Till here its no problem it works perfectly, but as soon as I put this line of of code in javascript shown below
< src="../../includes/validate.js">

It fires the above message saying OnClientClose is undefined on status bar of IE.
If removed the above line again it works perfectly.

Can anyone Please suggest any solution for this.

Regards
Sudhakar

 

 

 



 

Season
Top achievements
Rank 1
 answered on 20 Jan 2017
12 answers
1.4K+ views
Hi,
I have a column StartDate type Datetime. But when i click on column header for sorting it is not sorting properly in acs or desc. it is showing sorting only on month part of date
Like
08/21/2012
07/21/2014
06/26/2013
06/26/2013
It is in descending order but it is wrong.

<telerik:GridBoundColumn DataField="StartDate" HeaderText="Start Date" SortExpression="StartDate" DataType="System.DateTime"
UniqueName="StartDate"DataFormatString="{0:MM/dd/yyyy}" ReadOnly="true"
 ItemStyle-Width="80px" HeaderStyle-Width="80px">
</telerik:GridBoundColumn>
I have tried this http://www.telerik.com/community/forums/aspnet-ajax/grid/sort-the-date-column-in-radgrid-on-clicking-of-the-header.aspx but still no success. Please find screen shot of problem.
Viktor Tachev
Telerik team
 answered on 20 Jan 2017
4 answers
320 views

Hello,

I have a bar chart (attached) the labels need to be moved outside the chart on the left so they are not covering the bars.

I have seen this as an issue going back to 2012 in the forums.. Its 2017 so I cant imagine this is still an issue.

If it is still an issue what is the work around? Is there a hack? I looked to see if I could use CSS but it does not seem so.

I tried AxisCrossingValue... it moves the bars so they don't line up with the correct X-Axis Labels... so that does not work.

 

I really need this to work.

Thanks,

Charles

 

Stamo Gochev
Telerik team
 answered on 20 Jan 2017
2 answers
268 views

I have a RadAsyncUpload somewhere on a page and a RadGrid in the same page.The RadGrid has a column for every row that is a LinkButton which executes a grid ItemCommand. The ItemCommand fetches the ID associated to the row and stores it in a session variable. I want the item command to also then bring up the RadAsyncUpload window so the user could select files.

 

The way I tried to achieve this so far is by calling a javascript function which finds the RadAsyncUpload control and performs a button click. This does not happen after postback, however. 

 

It is crucial to me that each file I upload is associated with a row ID. Is there a way I can achieve this scenario or am I limited by the RadAsyncUpload controls functionality?

Ivan Danchev
Telerik team
 answered on 20 Jan 2017
0 answers
162 views

I am trying to change the background colors of individual bars to red and green

TryCast(RadHtmlChart1.PlotArea.Series(0), BarSeries).SeriesItems(0).BackgroundColor = System.Drawing.Color.Red.

Chart works great and I am binding to a datatable

RadHtmlChart1.DataSource = DifferenceDT
RadHtmlChart1.DataBind()

 

The error is on SeriesItems (Out of Range) and count is 0 when I inspect. 

Am I  doing something wrong?

Here is my .aspx code

<telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" Style="width: 100%; height: 98%;">
    <PlotArea>
        <Series>
            <telerik:BarSeries DataFieldY="Count" Name="Count" >
                <LabelsAppearance>
                    <TextStyle Color="White" />
                </LabelsAppearance>
            </telerik:BarSeries>
        </Series>
        <XAxis DataLabelsField="Name"  >
            <LabelsAppearance>
                <TextStyle Color="White" />
            </LabelsAppearance>
            <MinorGridLines Visible="false" />
        </XAxis>
        <YAxis AxisCrossingValue="0" Step="1"  >
            <MinorGridLines Visible="false" />
            <LabelsAppearance>
                <TextStyle Color="Blue" />
            </LabelsAppearance>
        </YAxis>
    </PlotArea>
</telerik:RadHtmlChart>
Charles
Top achievements
Rank 1
 asked on 19 Jan 2017
5 answers
581 views
SOS -----  SOS.

I have a RadGrid with FormTemplate having approx 30 controls including ASP.NET validation controls.
I have a ClientSide CustomValidator which needs to access other control on the form using Javascript/JQuery to read its value  and also enable or disable some of Other validation controls.

I tried to write following line on a clientside in a CustomValidation Control

ValidatorEnable($(

 

'RequiredFieldValidator4'), value);

 

But that does not work and returns error "Microsoft JScript runtime error: 'null' is null or not an object"
I also want to access other controls like textbox, RadmaskedTextbox etc inside CustomValidator control.

Please tell me how to I get a successfull access to these controls.

Regards
JD


<EditFormSettings EditFormType="Template" PopUpSettings-Width="900px" 
CaptionFormatString="Edit Property: {0}"
CaptionDataField="PropertyName"
InsertCaption="Add New Property"
PopUpSettings-Modal="true"
PopUpSettings-Height="500px"
PopUpSettings-ScrollBars="Vertical">
    <FormTemplate >
  
      ASP:RadTextBox  ......
       
   ASP:RadCombobox
  
  ASP:RequiredFieldValidator
  
 ASP:CustomValidator
  
   etc..... (approx 30 other controls)
    </FormTemplate >
MV
Top achievements
Rank 1
 answered on 19 Jan 2017
9 answers
151 views

W.r.t to Excel like filtering in radgrid. I am trying to call a webservice using -

ADMIN: Code removed upon OP request.

Requirement : To use Webservice , I have 40 columns so planning to send Column name as a context to WS method and reuse the select query for all..
eg)

 

ADMIN: Code removed upon OP request.

Marin Bratanov
Telerik team
 answered on 19 Jan 2017
3 answers
113 views

I have map with two layers (shapes and bubbles).

Seems i can use tooltips only on active layer

Any recommendations?

Thank you

David
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 19 Jan 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?