Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
276 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
296 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
132 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
151 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
234 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
65 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
169 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
156 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
129 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
1 answer
181 views
I am writing to learn if it is possible to specify a physical path on a web server, rather than a virtual path in the web application, for the destination of an uploaded file;

Does this type of functionality need to be specified with C#, rather than in the configuration section of the RadFileExplorer?

Thanks in advance for any insight;  Best regards - Rob   

<telerik:RadFileExplorer ID="RadFileExplorer1" Runat="server">
              <Configuration ViewPaths="~/Customers" UploadPaths="~/Customers"
                       DeletePaths="~/Customers" />
       </telerik:RadFileExplorer>
Dobromir
Telerik team
 answered on 01 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?