Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
52 views
I have a page with tabs using RadMultiPage and ascx controls for each tab. One of the tabs contains a form. My code behind for that page has logic like this to load the form with the previously submitted data only when it is not a post back because the submit button preforms a post back.

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


If the tabbed page is brought up with the form tab as the initial tab, the form data loads on the page and works fine.

The problem is that if the page is brought up with another tab selected as the initial tab, when the user clicks on the tab with the form, the form data is not loaded because apparently clicking on the tab preforms a post back?? How do I get around this issue?

Thanks
Kate
Telerik team
 answered on 12 Jul 2012
1 answer
108 views
I need to use Cascading combo boxes for that to avoid post backs i selected Load on demand Ajax Combo....
for first time selected values its working fine..when i will change item in the first combo-box the second combo box items are not get updated.my code is below

<telerik:RadComboBox ID="RadComboState" runat="server" Width="250px" Height="150px"
                                                EmptyMessage="Select a state" EnableLoadOnDemand="True" ShowMoreResultsBox="true"
                                                EnableVirtualScrolling="true" OnItemsRequested="RadComboState_ItemsRequested">
                                            </telerik:RadComboBox>
  <telerik:RadComboBox ID="RadComboInstitution" runat="server" Width="250px" Height="150px"
                                                EmptyMessage="Select an institution" EnableLoadOnDemand="True" ShowMoreResultsBox="true"
                                                EnableVirtualScrolling="true" OnItemsRequested="RadComboInstitution_ItemsRequested"
                                                OnClientItemsRequesting="GetSelectedState">
                                            </telerik:RadComboBox>
function GetSelectedState(sender, eventArgs) {
            var SelectedState;
            var combo = Telerik.Web.UI.RadComboBox.ComboBoxes[0];
            SelectedState = combo.get_value();
            var context = eventArgs.get_context();
            context["StateId"] = SelectedState;
             
        }      

protected void RadComboState_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
    {
        RadComboState.Items.Clear();
        DataSet data = PoulateStates();
        if (data.Tables.Count > 0 && data.Tables[0].Rows[0][0].ToString() == "0")
        {
            int itemOffset = e.NumberOfItems;
            int endOffset = Math.Min(itemOffset + ItemsPerRequest, data.Tables[0].Rows.Count);
            e.EndOfItems = endOffset == data.Tables[0].Rows.Count;
            for (int i = itemOffset; i < endOffset; i++)
            {
                RadComboState.Items.Add(new RadComboBoxItem(data.Tables[0].Rows[i]["State_Name"].ToString(),
                                                            data.Tables[0].Rows[i]["intPkVal"].ToString()));
            }
            e.Message = GetStatusMessage(endOffset, data.Tables[0].Rows.Count);
        }
        else
        {
            RadComboBoxItem item = new RadComboBoxItem();
            item.Value = "-1";
            if (Session["COUNTRY"] != null && Session["COUNTRY"].ToString().ToUpper() == "MARSHALL ISLANDS")
                item.Text = "No Island Exists";
            else
                item.Text = "No State Exists";
            RadComboState.Items.Add(item);
        }
    }
     
    protected void RadComboInstitution_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
    {
        RadComboInstitution.Items.Clear();
        DataSet Institution = new DataSet();
        
        try
        {
            string StateId = e.Context["StateId"].ToString();
            Institution = populateInstitution(StateId);
 
            if (Institution.Tables[0].Rows[0][0].ToString() == "0")
            {
                int itemOffset = e.NumberOfItems;
                int endOffset = Math.Min(itemOffset + ItemsPerRequest, Institution.Tables[0].Rows.Count);
                e.EndOfItems = endOffset == Institution.Tables[0].Rows.Count;
 
                for (int i = itemOffset; i < endOffset; i++)
                {
                    RadComboInstitution.Items.Add(
                        new RadComboBoxItem(Institution.Tables[0].Rows[i]["Institution_Name"].ToString(),
                                            Institution.Tables[0].Rows[i]["InstitutionId"].ToString()));
                }
 
                e.Message = GetStatusMessage(endOffset, Institution.Tables[0].Rows.Count);             
            }
            else
            {
                RadComboBoxItem item = new RadComboBoxItem();
                item.Value = "-1";
                item.Text = "No Institution Exists";
                RadComboInstitution.Items.Add(item);
            }
 
        }
        catch (Exception ex)
        {
        }
    }

Princy
Top achievements
Rank 2
 answered on 12 Jul 2012
1 answer
228 views
Hi,
 I am trying to export the grid by using the default telerik functionality which has the inline filters,
whenever i am trying to export to excel or word , the filters are shown up in the exported file even if the filtering has not been done ,

if (e.CommandName == RadGrid.ExportToExcelCommandName)
        {
            foreach (GridFilteringItem filter in radGrid.MasterTableView.GetItems(GridItemType.FilteringItem))
            {
                filter.Visible = false;
            }
            radGrid.MasterTableView.ExportToExcel();
        }

Even after using this part of code in the ItemCommand its not working, as the Needdatasource event is triggered after the ItemCommand the grid is rebinded  to loose all its settings.
Could you provide me help regarding this issue asap.

-Karthik
Princy
Top achievements
Rank 2
 answered on 12 Jul 2012
2 answers
97 views
Hi,

I tried your sample in Knowledge Base Scheduler How to implement Resource paging and got following error message:

Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode.


Please let me know how to fix this issue.

Thanks!

Alan
Plamen
Telerik team
 answered on 12 Jul 2012
2 answers
100 views
The Setup:
1. I have a page with a radgrid that is visible for the user to filter sort and etc.
2. I have another that is not visible (thus no data binding has occurred yet)  that has very specific fields that are for exporting to excel.
3. The user filters the top grid.  Then select a report to be generated in excel from this selection.  This report has extra data we don't want in the primary grid.
4. The user hits a action button (GO) and the invisible grid's rebind() event is called.
4.  I am currently using the grid_ExcelExportCellFormatting to make the grid look nice (works great) 
5.  I would like to use the ExcelML events instead so I can gain access to worksheet formatting like freeze panes and etc...

But then I change the grids export type to excelML and excel opens.. The workbook is empty.  I do no want to load the grid on the primary page load or during the page_init.. Only when the user selects GO (generate the selected report).

Any ideas on how I can get the grid to export data besides loading it with data when the page loads for the first time?
Daniel
Telerik team
 answered on 12 Jul 2012
1 answer
81 views
Is there  a way to prevent the RadSpell modal window from firing if there are no spelling mistakes.
If that is not possible is there a way to tell if something is misspelled without having the dialogue box come up.

Note: This is all being done client-side.

Jack
Rumen
Telerik team
 answered on 12 Jul 2012
1 answer
123 views
I have developed a custom skin following all the instructions on the documentation and am trying to register my custom skin using RadStyleSheetManager as per this instruction.

I am using this in SharePoint application page and have put in all necessary entries into the web.config file according to this article.

My page is really simple, and in fact, I took the example from this thread and simply add in one more combo box into my application page with nothing in it.

So, all I have in my page are simply:
<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
</telerik:RadStyleSheetManager>
<telerik:RadComboBox ID="RadComboBox1" Skin="SilverSkin" EnableEmbeddedSkins="False"
    runat="server">
    <Items>
        <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" />
        <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" />
        <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem3" />
    </Items>
    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</telerik:RadComboBox>
<telerik:RadComboBox ID="RadComboBox2" Skin="Metro" EnableEmbeddedSkins="True"
    runat="server">
    <Items>
        <telerik:RadComboBoxItem runat="server" Text="RadComboBox2 Item1" />
        <telerik:RadComboBoxItem runat="server" Text="RadComboBox2 Item2" />
        <telerik:RadComboBoxItem runat="server" Text="RadComboBox2 Item3" />
    </Items>
    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</telerik:RadComboBox>


Note that I didn't even register my custom skin in RadStyleSheetManager. When I load this page, no style is loaded for both Metro and SilverSkin (custom).
However, when I removed the RadStyleSheetManager control from the page, the Metro style comes back.
This problem only happens in SharePoint (2010) for some reason. What have I done wrong?
Adi
Top achievements
Rank 1
 answered on 12 Jul 2012
1 answer
507 views
hi ,

as per my requirement i need to hide price column based on some some condition how can we achieve this funcationality through vb.net can u please give any reference or suggestion it will be help full for me

Thanks & Regards,
M.Kotewswara Rao.
Shinu
Top achievements
Rank 2
 answered on 12 Jul 2012
3 answers
101 views
Hi,
I'm trying to implement drag & drop from ListView to TreeView. I need to assign a custom value on the "id" attribute so it can be used in ListView's DestinationHtmlElement in RadListViewItemDragDropEvent. If I bind the tree nodes on the Server-Side with RadTreeNode type, everything works fine. But if I use Web Service with RadTreeNodeData type, the DestinationHtmlElement is empty. Do I need to do something different with the web service?

// Server Side with RadTreeNode type works fine 
var node = new RadTreeNode();  
node.Attributes.Add("id", "folder_" + dtrReader["folderID"]);  
  
// Web Service with RadTreeNodeData type and the DestinationHtmlElement is empty
var node = new RadTreeNodeData();  
node.Attributes.Add("id", "folder_" + dtrReader["folderID"]);
Tony
Top achievements
Rank 1
 answered on 12 Jul 2012
1 answer
62 views
Hi Telerik,
I'm using control RadCaptcha in assembly Telerik.Web.UI version 2011.1.519.40.
After I set Maximum Worker Processes value in IIS Pool = 2, RadCaptchar show grayBox when I click refresh button to refresh validation image.
Then how can I fix this error if I still want use Web Garden for my App?
Dobromir
Telerik team
 answered on 12 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?