Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
182 views

Hi

I design radgrid with advanced databinding.I want to show label message when radgrid is empty and is working perfectly fine but problem is that its also showing in the page load .radgrid bind with button click event if no data found then message will be display. ..by default radgrid shows message but its "No records to display "but its also visible on page load and radgrid dispersal on each post back ...i am working in user control in DNN here..Please suggest anyone how hide my label text in page load ...Thanx in advanced here my code

 protected void Page_Load(object sender, EventArgs e)
        {
           
            if (!Page.IsPostBack)
            {

                billingRadGrid.Visible = true;
            }
             
                BindComboBox();
                //lblMessage.Text = string.Empty;
                lblMessage.Visible = true;
            }

protected void billingRadGrid_OnNeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            billingRadGrid.DataSource = GetGridTable();
        }
        public DataTable GetGridTable()
        {
            Decimal amount_from;
            if (!Decimal.TryParse(amountFromTb.Text, out amount_from))
            {
                amount_from = 0;
            }
            Decimal amount_to;
            if (!Decimal.TryParse(amountToTb.Text, out amount_to))
            {
                amount_to = 0;
            }
            Decimal duration_from;
            if (!Decimal.TryParse(durationFromTb.Text, out duration_from))
            {
                duration_from = 0;
            }
            Decimal duration_to;
            if (!Decimal.TryParse(durationToTb.Text, out duration_to))
            {
                duration_to = 0;
            }
            string dateFrom = DateFromTb.Text;
            DateTime dateF = DateTime.ParseExact(dateFrom, "yyyy-MM-dd", null);
            string dateTo = DateToTb.Text;
            DateTime dateT = DateTime.ParseExact(dateTo, "yyyy-MM-dd", null);
            DataController dc = new DataController();
            BillingDetail bill = new BillingDetail();
            bill.accountNumber = "12004572";
            bill.fromDate = dateF;
            bill.toDate = dateT;
            bill.amountFrom = Convert.ToDecimal(amount_from);
            bill.amountTo = Convert.ToDecimal(amount_to);
            bill.durationFrom = Convert.ToDecimal(duration_from);
            bill.durationTo = Convert.ToDecimal(duration_to);
            bill.traficType = trafictypeCombo.SelectedItem.Text;
            bill.terminateState = stateNameTb.Text;
            bill.number = bTNComboBox.SelectedValue;
            bill.lineType = lineTypeComboBox.SelectedItem.Text;
            bill.dialedNum = Convert.ToString(dialedNumber.Text);
            DataTable dtBill = dc.GetUsageDetail_bill(bill);
            if (dtBill.Rows.Count > 0)
            {

                billingRadGrid.Visible = true;
                lblMessage.Text = string.Empty;
                lblMessage.Visible = false;
            }
            else
            {

                lblMessage.Visible = true;
                billingRadGrid.Visible = false;
                lblMessage.Text = "No Records To Display";
                lblMessage.ForeColor = Color.Red;
            }
            return dtBill;
        }

Mukul
Top achievements
Rank 1
 answered on 06 Jul 2015
2 answers
225 views

How to turn off 'Enable Track Changes Override' by default? I want want it to be ON only whne it is clicked.

I am using Telerik version  v2014.3.1209.35

kartik
Top achievements
Rank 1
 answered on 06 Jul 2015
10 answers
137 views

Hi,

I have below two questions:

1. Can we increase the chart area as the number of SeriesItem increases the chart messes up. PFA image.

2. Can I have any example or demo of RadpivotGrid inegration with PieChart, currently I am having integration with BarSeries and ColumnSeries(which are working fine) but pie chart is not working.

Danail Vasilev
Telerik team
 answered on 06 Jul 2015
4 answers
58 views

Dear Telerik Forum:

I began testing your product for possible purchase yesterday.   I hope to use Css with your controls.   As of yet, I have not been able to get any of these three RadButton properties working:   CssClass, HoveredCssClasss, and PressCssClass.    

I reviewed all 21 RadButton demos you include within Telerik’s Live Demo’s.   I looked at the Properties of every single RadButton on all 21 of those pages;  hundreds of examples.   Surprisingly I found that there is not a single example on any of these pages where Telerik used any of these three properties -  CssClass, HoveredCssClasss, and PressCssClass - for anything.   Not even once were any of them used.

I decided to write you at the Forum, because I would think that other “Newbies” would benefit seeing the experience of one like themselves without any experience with your product upon which to draw from.  Obviously, I am doing something wrong, and amhoping you can correct my code:

I began with RadButton because I think this would likely be your simplest control.   Here are the steps I took to add it to my test page, “TelerikButtonTest.aspx”.  First, within my test ASP.Net website that does have MasterPages, I created a new page, “TelerikButtonTest.aspx”.  I attempted to then drag and drop a Telerik RadButton to this otherwise blank page.  Your Telerik system then complained that I should first drag and drop a RadScriptManager onto the page first.  I complied.   However, I wonder why there should have to be a RadScriptManager on this page, when I had already added a RadScriptManager to the sites MasterPage.  Since the MasterPage is treated by VS as part of webpages include it, why couldn’t Telerik system use the RadScriptManager already available for its use.   Does this mean that a RadScriptManager has to be copied to every single webpage and component in the website that uses Telerik controls?  Why?

I then create a new “.Css” page, “TestSyleSheet.css”, and added three classes to it as follows:

.RadButtonDefault
{
    background-color: Yellow;
}

.RadButtonHover:hover
{
    background-color: Orange;
}

.PressCssClick
{
    background-color: Red;
}

Returning to the “TelerikButtonTest.aspx” page, I then added these three classes – “RadButtonDefault”, “RadButtonHover”, and “PressCssClick” – to their waiting properties as follows:

<telerik:RadButton ID="RadButton1" runat="server" CssClass="RadButtonDefault" ResolvedRenderMode="Classic" Text="RadButton"
HoveredCssClass="RadButtonHover"  onclick="RadButton1_Click" PressedCssClass="PressCssClick"></telerik:RadButton>

I then right clicked on the Designer for this TelerikButtonTest.aspx page and selected “View in Browser”.   I had hoped that when the page displayed in the browser, that I would see “Yellow” as the  background for the RadButton. I did not see that, but instead only the gray of a the RadControl bear.   I ran my mouse over the top of the running RadButton control, expecting then to see the control in Orange.   No Orange was seen, but the RadControl remained gray. Lastly, I clicked the running RadButton control expecting to see Red now covering the button.   Again I was disappointed because for the third time the control remained gray.  As trivial as this test was, I must be doing something wrong.  Please advise what is wrong with this code.

I am attaching the source as I described here.  Please advise what is wrong, and how then to get these three properties working.  I've tried to phrase my question as simply as possible.  Please advise what is wrong within my code.

Your attention to this matter is appreciated.

Sincerely,

Pastor Burt

Danail Vasilev
Telerik team
 answered on 06 Jul 2015
1 answer
79 views

I am Exporting RadGrid with aprox 40000 records to excel. But only 100 records are showing in Excel file. which is record of first 10 Pages in RadGrid. Here's my code.

 

protected void ImageButton_Click(object sender, ImageClickEventArgs e)
    {
        RadGrid1.ExportSettings.Excel.Format = GridExcelExportFormat.Html;
        RadGrid1.ExportSettings.IgnorePaging = true;
        RadGrid1.DataBind();
        
        RadGrid1.ExportSettings.ExportOnlyData = true;
        //RadGrid1.ExportSettings.OpenInNewWindow = true;
        RadGrid1.MasterTableView.ExportToExcel();
    }

 

 

RadGrid :

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="true" PageSize="10" GridLines="None"   >
            
            <ClientSettings>
                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                <Virtualization EnableVirtualization="true"  />
            </ClientSettings>
        </telerik:RadGrid>

Viktor Tachev
Telerik team
 answered on 06 Jul 2015
1 answer
290 views

The demo page for the ASP.NET control - it has a navigation bar and the hamburger icon on the left side.  If you click on that icon it will display a menu that occupy the left hand side.

Can this be replicated using Telerik control? A simple sample would be nice.

 Thanks.

Vessy
Telerik team
 answered on 06 Jul 2015
1 answer
106 views

I'd like to display all the active PivotGrid filters. I know that there is a PivotGrid.Filters collection, but it contains only the field name and not the real filter.

Ho can I do that?

Thanks

Alessandro

 

 

Pavlina
Telerik team
 answered on 06 Jul 2015
1 answer
479 views

How i can get file size on client for all files added in AsyncUpload before upload?

And how i can  view the upload progress of ALL files together as a progress bar in the upload control?

Hristo Valyavicharski
Telerik team
 answered on 06 Jul 2015
1 answer
295 views

I have a RadGrid. Trying to change the font colors when an specific value is present. As an example...If Status Code != 0 then change color to red. Now I have that working fine, however when I click on any of the nested grids I get an error stating that "Status Code" isn't in the grid. I know that because It is a different grid (under the parent) for some reason it is still validating against the parent when it shouldn't. Any ideas? It works at the parent level. I don't want the sub grids to change at all, just the parent.

 

Here is the ASP code:

<telerik:RadGrid
    runat="server"
    ID="RadGrid1"
    AllowPaging="true" 
    AllowFilteringByColumn="true" 
    AllowSorting="true"    
    PageSize="40" 
    AutoGenerateColumns="True" 
    CellSpacing="-1" 
    GridLines="Both" 
    GroupPanelPosition="Top" 
    DataSourceID="SqlDataSource1" OnItemDataBound="grd_RowDataBound">
    <MasterTableView 
        EnableHeaderContextMenu="true" 
        OnPreRender="Grid1_PreRender"
        DataKeyNames="trxids,TransactionType" 
        Name="Master" AutoGenerateColumns="true" runat="server">
                <DetailTables>
                    <telerik:GridTableView HeaderStyle-Font-Bold="true" AlternatingItemStyle-BackColor="LightBlue"
                        DataSourceID="SqlDataSource2"
                        AllowFilteringByColumn="false" 
                        AllowSorting="false"
                        DataKeyNames="trxid,TransactionType" >
                          <ParentTableRelation>
                              <telerik:GridRelationFields DetailKeyField="trxids" MasterKeyField="trxids"></telerik:GridRelationFields>  
                              <telerik:GridRelationFields DetailKeyField="TransactionType" MasterKeyField="TransactionType"></telerik:GridRelationFields>
                          </ParentTableRelation>

                             <DetailTables>
                                 <telerik:GridTableView HeaderStyle-Font-Bold="true" ItemStyle-ForeColor="DarkRed"
                                    DataSourceID="SqlDataSource3" 
                                    AllowFilteringByColumn="false"
                                    AllowSorting="false"  >
                                      <ParentTableRelation>
                                          <telerik:GridRelationFields DetailKeyField="trxid" MasterKeyField="trxid"></telerik:GridRelationFields>  
                                          <telerik:GridRelationFields DetailKeyField="TransactionType" MasterKeyField="TransactionType"></telerik:GridRelationFields>
                                      </ParentTableRelation>
                                 </telerik:GridTableView>
                             </DetailTables>
                    </telerik:GridTableView>
                </DetailTables>
            </MasterTableView>
</telerik:RadGrid>

 

 

Code behind is as follows:

    protected void grd_RowDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {

            GridDataItem item = (GridDataItem)e.Item;

            TableCell cell = (TableCell)item["Status Code"];
            if (cell.Text != "0")
            {
                cell.ForeColor = System.Drawing.Color.Red;
                cell.Font.Bold = true;
                cell.Font.Size = 8;
                cell.BackColor = System.Drawing.Color.LightGray;


                GridDataItem item1 = (GridDataItem)e.Item;
                TableCell cell1 = (TableCell)item["count"];
                cell1.ForeColor = System.Drawing.Color.Red;
                cell1.Font.Bold = true;
                cell1.Font.Size = 8;
                cell1.BackColor = System.Drawing.Color.LightGray;


            }
}
     } 

 

Eyup
Telerik team
 answered on 06 Jul 2015
1 answer
111 views

I tried to implement Dynamic PageView Creation via AJAX functionality. In the implementation  i did, if i click the second page and then click the first page first page content doesn't appear in first page, although in initial load content renders properly in first page. Please find the the sample project i created attached here. Please let me know whats wrong with my implementation.

 

Aneliya Petkova
Telerik team
 answered on 06 Jul 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?