Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
265 views
I have a query that takes about 1.5 minutes in my datasource. It's not a large amount of data just an SSAS query that takes a while to process.

I am calling Rebind immediately after assigning datasource.

Rebind throws a timeout error at Rebind:
GridGSRComp_DataSource = new SqlDataSource(GetConnectionString()+";Connect Timeout=3000; pooling='true'; Max Pool Size=200", "GetGSRComparison " + Convert.ToInt32(ddlViewBy.SelectedValue) + ", " + Convert.ToInt32(calFrom.SelectedDate.Value.ToString("yyyyMMdd")) + ", " + Convert.ToInt32(calTo.SelectedDate.Value.ToString("yyyyMMdd")));
grdGSRComp.Rebind();

As you can see I'm setting it in the Connection string, but this does not help.

Can I set a timeout somewhere else in the radgrid or somewhere that rebind references?

Thanks!

Ken
Top achievements
Rank 1
 answered on 01 Nov 2011
3 answers
236 views
Hi there.

We have a Sharepoint application page and within the main content placeholder we want to host a RadWindow. Opening this window will show the user a search screen where they can enter a couple of parameters and when hitting "search" a Grid will be populated.
If we test the code in a separate page it all works fine, including paging and sorting the Grid's results (we want Ajax postbacks).

However when we have the same markup and same code included within the RadWindow, binding the Grid for the first time works, but then paging and sorting events never happen, the Grid just disappears. Here's the markup (simplified) in the page we're trying it to work:

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnSearchSIC">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdTelerik" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="grdTelerik">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdTelerik" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

...

    <telerik:RadWindow runat="server" ID="RadWindow_ContentTemplate" Skin="Vista" KeepInScreenBounds="true" VisibleOnPageLoad="false" Modal="true" Title="Search Client"
        Behaviors="Close,Maximize,Move" Width="500" Height="500">
        <ContentTemplate>
            <div>
                SIC Code: <telerik:RadTextBox ID="txtSICCode" runat="server" Text="" EmptyMessage="Enter SIC code" MaxLength="20" ShowButton="false" Skin="Vista"></telerik:RadTextBox><br />
                SIC Description: <telerik:RadTextBox ID="txtSICDescription" runat="server" Text="" EmptyMessage="Enter SIC description" MaxLength="20" ShowButton="false" Skin="Vista"></telerik:RadTextBox><br />
                <telerik:RadButton ID="btnSearchSIC" runat="server" Skin="Vista" Text="Search" ToolTip="Search SIC" AutoPostBack="true" OnClick="btnSearch_Click">
                </telerik:RadButton><br /><br />
                <telerik:RadGrid
                    ID="grdTelerik" runat="server"
                    Skin="Vista"
                    ShowStatusBar="true"
                    AllowSorting="true"
                    AllowPaging="true"
                    PageSize="10"
                    OnSortCommand="grdTelerik_SortCommand"
                    OnPageIndexChanged="grdTelerik_PageIndexChanged">
                        <PagerStyle Mode="NumericPages"></PagerStyle>
                        <MasterTableView ClientDataKeyNames="Amount,Name"></MasterTableView>
                        <ClientSettings EnableRowHoverStyle="true">
                            <Selecting AllowRowSelect="true" />
                            <ClientEvents OnRowDblClick="RowDblClick" />
                        </ClientSettings>
                </telerik:RadGrid>
            </div>
        </ContentTemplate>
    </telerik:RadWindow>

And pretty much the code behind is about binding data to the grid (currently testing with Northwind).
Separately, in a simple ASPX page it all works, but here it doesn't:

        private void LoadData()
        {
            ISampleProvider provider = UnityHelper.Resolve<ISampleProvider>();
            this.grdTelerik.DataSource = provider.GetCustomerOrderHistoryByName("ANTON");
            this.grdTelerik.DataBind();
        }
 
        protected void grdTelerik_PageIndexChanged(object source, Telerik.Web.UI.GridPageChangedEventArgs e)
        {
            LoadData();
        }
 
        protected void grdTelerik_SortCommand(object source, Telerik.Web.UI.GridSortCommandEventArgs e)
        {
            LoadData();
        }
 
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            LoadData();
        }

Any clues on what can be happening? Why are the events not triggering?

Thank you very much.
Sharepoint Developer
Top achievements
Rank 1
 answered on 01 Nov 2011
1 answer
224 views
Hi,
I am trying to create a RadTabstrip dynamically and add it to a placeholder.  Tab pages donot show  up , given below is my code .


        protected void Page_Init(object source, System.EventArgs e)
        {
 
            string tableName = "Ticket";
            Panel currentPanel = new Panel();
            currentPanel.ID = tableName + "Panel3";

            RadTabStrip currentTabStrip = new RadTabStrip();
            currentTabStrip.ID = "RadTabStrip1";

            RadMultiPage currentMultiPage = new RadMultiPage();
            currentMultiPage.ID = "MultiPage1";
          
            currentTabStrip.MultiPageID =MultiPage1;
            currentMultiPage.Width = Unit.Percentage(80);
            currentMultiPage.Height = Unit.Percentage(60.0);
            currentMultiPage.SelectedIndex = 0;
            currentTabStrip.SelectedIndex = 0;
          
          string sql = "Select * from Table1";
          DataTable dt = di.GetDataTable(sql);
            int count = 0;
            foreach (DataRow currentRow in dt.Rows)
            {
                string foreignTable = currentRow["foreigntab"].ToString();

                RadTab currentTab = new RadTab();
                currentTab.Text = foreignTable;
             
                RadPageView currentPageView = new RadPageView();
                currentPageView.ID = "pageView" + (count as string)  ;
               
                currentPageView.Width = Unit.Pixel(400);
                currentPageView.Height = Unit.Pixel(300);
                currentPageView.ContentUrl = "http://www.telerik.com/";
           
               currentTab.PageViewID = "pageView" + (count as string)  ;

                currentMultiPage.PageViews.Add(currentPageView);
                currentTabStrip.Tabs.Add(currentTab);
 
                count++;
            }

Any idea?
Prava
Prava kafle
Top achievements
Rank 1
 answered on 01 Nov 2011
1 answer
83 views
Hello,

I Have a Treeview, to which i add dynamically  items.
For some items, i need to juxtapose more then images (the images are choosen in function of  a given conditions).

Using the old telerik components, the code is like this:
...
tmpDoc.Text='';
if (Convert.ToBoolean(rowNode["dot_has_life_cycle"]))
{
  tmpDoc.Text += "<img src='../images/colorDot.gif' alt='" + Convert.ToString(rowNode["sta_text"]) + "' style='margin-left:-5px; margin-top:-9px; background-color:" + Convert.ToString(rowNode["sta_color"]) + "' />";
  if (sIcon != "")
       tmpDoc.Text += "<img src='" + sPathImg + "' style='margin-left:3px' /> " + rowNode["doc_name"].ToString();
}
This code doesn't work for the aspnet-Ajax telerik Components ( neither the text nor the images were displayed). So I try to use the "ImageURL" attribute, but the problem that i have more then one image, and also, i have constraints on the margins.

Thank You for helping,

Best Regards,

Hind
Cat Cheshire
Top achievements
Rank 1
 answered on 01 Nov 2011
2 answers
118 views
I'm using the radsplitter with two sliding panes.

I'd like to open and dock one of the panes automatically when the page loads so that it shows docked by default.

I cannot find any samples on how to do this. Please advise.

Thank you.
Dobromir
Telerik team
 answered on 01 Nov 2011
3 answers
175 views
How do I set the rotator to continuously and smoothly scroll text?

It's scrolling, but because the items are of different lengths this appears to cause it to constantly speed up and slow down to fit the item in within the ScrollDuration I'm assuming.  This gives it a very jerky appearance.

The items are coming off an RSS feed so I won't know ahead of time what the lengths are.
Slav
Telerik team
 answered on 01 Nov 2011
1 answer
42 views
I have a search button in a asp.net page that show a pop-up and by closing that some controls are be added to a panel in my form using AjaxManager of Telerik.
I've used the Telerik:AjaxUpdatedControl to say render the panel everytime a search is done.
But my proble is when search is done for second time the controls that had been adde for first time will be removed.
how can I overcome this problem?
Andrey
Telerik team
 answered on 01 Nov 2011
2 answers
123 views
HI,

I have a radgrid which shows numeric data.

I agregate this data with the sum function and it shows in the footer the total.

Now I need to validate the footer.
When it is negative it needs to be red, and when it is positive in need to be black.

I am doing this in VB.net.

Is there anyway to call the footer text for a specific column on the code behind?
or is there a special data format string that will change the color of the text when it is negative?
Alessandro
Top achievements
Rank 1
 answered on 01 Nov 2011
3 answers
101 views
I am displaying a RadGrid in a popup window and have Context Menus enabled but when I right click on the headers, the Context Menu does not display.  It works fine if I have it within the main document.
Maria Ilieva
Telerik team
 answered on 01 Nov 2011
1 answer
101 views
Hi,

Currently when expanding a node the control performs a Post Back to the "NeedsData" event.  Each response from the server contains all of the HTML needed to rebuild the whole grid - this is making our grid extremely slow when digging into the lower levels. 

Having read the other forum posts it appears its not currently possible to get the control to render and operate fully on the client side.  Can you add this functionality?  

The control is perfect for our needs but due to the performance issues its currently stopping us from using it.

Regards,
Rene 
Iana Tsolova
Telerik team
 answered on 01 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?