Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
64 views
I have run into an interesting problem.  I have a RadGrid that uses a user control for the edit mode. In the RadGrid some of the information I want to display would be best displayed in a RadGrid.  I want to give the user the ability to do CRUD on this grid while in the CRUD of the parent.  When I get the display going though (Retrieve) and I try to bind the data from code behind I get the created columns PLUS every column from my data source.  Is this a known issue?  To put it simply:

Create a RadGrid (RadGrid1) in an .aspx page.
Set the RadGrid1.MasterTableView.EditFormSettings.UserControlName to a user control
In the user control create a RadGrid (RadGrid2)
Set the bindings for the data source for RadGrid2 and what I am seeing is the full data source plus

When you click on edit and RadGrid2 has data then it looks like to me that there is no way to filter the data other than to filter the data source.

Also when I click on Add New Item for the RadGrid2 it affects the buttons being displayed in the RadGrid1.  So if I am in update mode in RadGrid1 and I click on Add New for RadGrid2 then the Insert button appears for RadGrid1.

It also looks like the dataItem get's reset in RadGrid2 as well which means I loose my data source object when I click on Add New for RadGrid2.

I know I'm not showing code and that's mainly because there are two radgrids with CRUD operations and the amount of code is some 500 lines per radgrid so I thought it would be a bit excessive.  If you need code just let me know and I will mock something up for you.
Marin
Telerik team
 answered on 12 Jul 2012
1 answer
121 views
I recently updated my controls from a 2011 release to the very latest 2012 release.  After doing this, the ribbonbars on a lot of my pages have a problem regarding the buttongroup text, as illustrated by the attached screenshot.

You can see that the "View Status" and "Reference" groups text is fine - it's center-aligned and doesn't cut off.  However, the "Account Details" and what should be "View Ownership" group text is clipped and left-aligned.

As an experiment I removed the "Closed" button from the "View Status" group, and that group then had the same problems as the "Account Details" group - the text is cut off.

Here is the code in case you need to recreate what i've done:

<telerik:RadRibbonBar ID="rrbAdmin" runat="server" CssClass="ribbonBar"
    OnClientSelectedTabChanged="showHeaderRibbonBarResizeOverride">
      
    <telerik:RibbonBarTab Text="Browse" ID="rbtBrowse" />
    <telerik:RibbonBarTab Text="Forms" ID="rbtUsers">
        <telerik:RibbonBarGroup Text="Account Details">
            <Items>
                <telerik:RibbonBarButton Text="Create New<br/>Account" Value="CreateAccountForm" Size="Large" 
                    ImageUrlLarge="../../Images/Icons_32/add_application.png" Visible="false" />                                      
                <telerik:RibbonBarButton Text="View/Edit<br/>Account Form" Value="EditAccountForm" Size="Large" Enabled="false"
                    ImageUrlLarge="../../Images/Icons_32/edit.png" />
            </Items>
        </telerik:RibbonBarGroup>           
        <telerik:RibbonBarGroup Text="View Status" Value="ViewStatus">
            <Items>
                <telerik:RibbonBarToggleList ID="ViewList">
                    <ToggleButtons>
                        <telerik:RibbonBarToggleButton Size="Large" Text="Open" Value="btnOpen" Toggled="true" 
                            ImageUrlLarge="../../Images/Icons_32/open.png" />
                        <telerik:RibbonBarToggleButton Size="Large" Text="Closed" Value="btnClosed" 
                            ImageUrlLarge="../../Images/Icons_32/closed.png" />
                    </ToggleButtons>
                </telerik:RibbonBarToggleList>
            </Items>
        </telerik:RibbonBarGroup>
        <telerik:RibbonBarGroup Text="View Ownership" Value="ViewOwnership">
            <Items>
                <telerik:RibbonBarToggleList ID="RibbonBarToggleList1">
                    <ToggleButtons>
                        <telerik:RibbonBarToggleButton Size="Large" Text="My Accounts" Value="btnMyAccounts" Toggled="true" 
                            ImageUrlLarge="../../Images/Icons_32/user.png"  />
                        <telerik:RibbonBarToggleButton Size="Large" Text="All Accounts" Value="btnAllAccounts"
                            ImageUrlLarge="../../Images/Icons_32/all.png" />
                    </ToggleButtons>
                </telerik:RibbonBarToggleList>
            </Items>
        </telerik:RibbonBarGroup>
        <telerik:RibbonBarGroup Text="Reference">
            <Items>
                <telerik:RibbonBarButton Size="Large" Text="Group Authority<br />Matrix" 
                    ImageUrlLarge="../../Images/Icons_32/attachment.png" />
            </Items>
        </telerik:RibbonBarGroup>
    </telerik:RibbonBarTab>
    <telerik:RibbonBarTab Text="Reporting" ID="RibbonBarTab1" Value="Reporting">
        <telerik:RibbonBarGroup Text="Report Type">
            <Items>
                <telerik:RibbonBarToggleList ID="RibbonBarToggleList2">
                    <ToggleButtons>
                        <telerik:RibbonBarToggleButton Size="Large" Text="By Period" Value="byPeriod" Toggled="true" 
                            ImageUrlLarge="../../Images/Icons_32/calendar.png" />
                        <telerik:RibbonBarToggleButton Size="Large" Text="By Customer" Value="byCustomer"
                            ImageUrlLarge="../../Images/Icons_32/user.png" />                            
                    </ToggleButtons>
                </telerik:RibbonBarToggleList>                                     
            </Items>
        </telerik:RibbonBarGroup>     
    </telerik:RibbonBarTab>
     
</telerik:RadRibbonBar>
Helen
Telerik team
 answered on 12 Jul 2012
1 answer
58 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
112 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
231 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
112 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
105 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
88 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
133 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
514 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?