Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
526 views
Hi,

I encounter the following strange behaviour when using the Telerik RadGrid.

I have a 3-tiered hierarchical RadGrid. Simplified:
<RadGrid>
<NestedViewTemplate>
<RadGrid>
<NestedViewTemplate>
<RadGrid>
</RadGrid>
</NestedViewTemplate>
</RadGrid>
</NestedViewTemplate>
<RadGrid>

The HierarchyLoadMode is set to "ServerOnDemand" (default?), and all data is wired using the NeedDataSource event. The EditForm is set to a WebUserControl.

This construction however poses two significant problems:

  1. When a parent grid item is expanding, the parent's NeedDataSource event is called, while it isn't specifically needed for the parent to rebind. In fact, if I check the GridRebindReason property and make it so it doesn't set the DataSource property when the reason is GridRebindReason.DetailTableBinding, it works perfectly. So if the parent isnt required to rebind, why does it call the eventhandler? It reduces the amount of database querying by a lot if I filter for the DetailTableBinding flag.
  2. Even more "disturbing": When I try to edit or add any item, in the parent grid or either of the childgrids, the NeedDataSource event is called for every RadGrid in the hierarchy. Which results in a lot of queries for radgrids that aren't even visible on the page.

Is this a known problem? And more importantly, is there any way around this? I'd attach the code but sadly I don't have a clean version of the page.

Above problems are encountered using ASP.NET 3.5, C#, and the ASP.NET AJAX toolkit Q1 2010

Greetings
Iana Tsolova
Telerik team
 answered on 19 Apr 2010
1 answer
94 views
Hi there.

I have the need to be able to only allow a single selection of a node at a given level. For example, let's say my first level of nodes are states and under each state are cities within that state.

Alabama
    Mobile
    Tuscaloosa
Alaska
    Anchorage
    Fairbanks
    Juneau

If I have the Mobile node checked, then I select Archorage, Mobile would be deselected. I could however select multiple cities within a state. Is the best way to handle this to just run through the proper de-selection when the new node is clicked?

Mike
Nikolay Tsenkov
Telerik team
 answered on 19 Apr 2010
7 answers
150 views

Dynamically created columns causes problem when column Display = False

We are Telerik v2010 Q1.  When add a column with Dispay = false it hides the column, but there is the a large gap to the right of the grid e.g.

Before

ID

Col 2

Col 3

 

 

 

After

Col 2

Col 3

<< GAP?! >>

 

 

 

 

Extract

            //id column

            col = new GridBoundColumn();

            //TODO: Setting col.Display = false causes a problem

            this.uxResults.Columns.Add(col);

            //now ammend properties

            col.UniqueName = “ID"

            col.Visible = true; //NB Note that Display is set to false!!

            col.DataField = “ID”

            col.HeaderText = "";

            col.FilterListOptions = GridFilterListOptions.VaryByDataType;

            //col.AllowFiltering = true;

            //col.AllowSorting = true;

            //col.ReadOnly = true;

            col.Display = false;

Iana Tsolova
Telerik team
 answered on 19 Apr 2010
1 answer
86 views
I have a main page called Main.aspx which is based on a masterpage (called Main.Master).  The master page has a RadWindowManager on it. 

I have a pop-up page called Popup.aspx which is based on masterpage (called Popup.Master).  That master page also has a RadWindowManager on it for any popup pages.

Both of the master pages have a definition for opening a Help file.  When I click help from the main page, the help window is displayed in the center of the screen. 

The problem is that when I click help from the pop-up page, the help window is limited to the boundaries of the pop-up page that called it.

How can I call for the Help file but have it be independant of the pop-up page?

Thanks!
Princy
Top achievements
Rank 2
 answered on 19 Apr 2010
3 answers
507 views
If you look in the attached image, I am inserting a row into a radgrid with the Editmode="Popup".  The insert is failing because there is already a row with the user/password combination.

I am using the following code to display the error.
        protected void RadGrid1_ItemInserted(object source, GridInsertedEventArgs e) 
        { 
            if (e.Exception != null) 
            { 
                Exception eex = e.Exception; 
 
                string msg; 
                if (ex.InnerException != null) msg = ex.InnerException.Message; 
                else msg = ex.Message; 
 
                RadGrid1.Controls.Add(new LiteralControl(string.Format("<span style='color:red'>{0}</span>", msg))); 
                e.ExceptionHandled = true
            } 
 
             
        } 

I would like to change the code above to display the error in the popup edit window instead of at the bottom of the grid itself.  Anyone know how to do this?

I've tried to put a label in the edit window but whenever I assign a value to the label in the RadGrid1_ItemInserted function, the new value is never rendered on the popup window.

Thanks.


Veli
Telerik team
 answered on 19 Apr 2010
2 answers
147 views
hi ,
i am using RadCalendar ,how to avoid multiple date selection at one time.
i.e when i selct i date ,and try to select other date .the previous selection also exits .
which gives me a error as we are performing some actions based on the selected date.

so how to avoid it .
sriharsha an
Top achievements
Rank 1
 answered on 19 Apr 2010
1 answer
196 views
protected void grdContactList_PreRender(object sender, EventArgs e)  
        {  
            foreach (GridGroupHeaderItem groupHeader in grdContactList.MasterTableView.GetItems(GridItemType.GroupHeader))  
            {  
                string strtxt = groupHeader.DataCell.Text; // accessing the groupheader text     
                HyperLink link = new HyperLink();  
                LinkButton hyperlnk = new LinkButton(); // creting new link     
                hyperlnk.Text = "mailto:" + strtxt;  
                groupHeader.DataCell.Controls.Clear();  
                groupHeader.DataCell.Controls.Add(hyperlnk);  
            }  
        } 

Dear telerik,

Can you please help me in how to add mailto syntax in the groupheaderitem.
I need them to be able to click them and open the user mail default with the groupheaderitem emailaddress in mail to.

Thank you

Regards
Maria Ilieva
Telerik team
 answered on 19 Apr 2010
1 answer
118 views
Using Rad Controls for ASP.NET AJAX Q3 2009 SP2

All the skins I have seen have one image for the Track Bar.
Is it possible to use different images for the track bar ends? I need to create a slider bar that has rounded ends.
Bozhidar
Telerik team
 answered on 19 Apr 2010
1 answer
130 views
Hello,

here is my problem: I've got two radbinaryimages and each one is in a wizardstep inside an asp.net wizard. In step one, the first binaryimage is displayed, but when I switch to page 2, the second one is empty and I get an "Object reference not set" in the processrequestinternalmethod of the radbinaryimagehandler.
If I look inside the cache, I can see the data from the visible image but not from the second one.

The sample belows reproduce the problem. Though it's not a wizard, it's the same problem.

Did I miss something?

Best regards

Laurent

ASPX:
<telerik:RadBinaryImage runat="server" Visible="true" ID="binaryImage1" /> 
<telerik:RadBinaryImage runat="server" Visible="false" ID="binaryImage2" /> 
<asp:Button runat="server" ID="btn" OnClick="btn_Click" /> 

CS:
 protected void Page_Load(object sender, EventArgs e) 
        { 
            if (!Page.IsPostBack) 
            { 
                byte[] img = File.ReadAllBytes(@"d:\mydocuments\My Pictures\IMG_2787.JPG"); 
                binaryImage1.DataValue = img; 
                binaryImage2.DataValue = img; 
            } 
        } 
protected void btn_Click(object sender, EventArgs e) 
        { 
            binaryImage1.Visible = !binaryImage1.Visible; 
            binaryImage2.Visible = !binaryImage2.Visible; 
        } 

Rosen
Telerik team
 answered on 19 Apr 2010
1 answer
86 views
Hi all,

RadTabStrip does not work and does not show any control like RadGrid, Calender, RadUpload etc. in RadMultiPage, RadPageView in IE8 but its working on Firefox, Chorme.
bellow my sample code:
<telerik:RadTabStrip runat="server" ID="tabStrip" Skin="Vista" MultiPageID="radMultiPage">
        <Tabs>
            <telerik:RadTab Text="Consumption Chart">
            </telerik:RadTab>
            <telerik:RadTab Text="Audit">
            </telerik:RadTab>
            <telerik:RadTab Text="Real Time Weather">
            </telerik:RadTab>
            <telerik:RadTab Text="Consumption Import">
            </telerik:RadTab>
            <telerik:RadTab Text="Profile">
            </telerik:RadTab>
            <telerik:RadTab Text="Utility">
            </telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage runat="server" ID="radMultiPage">
        <telerik:RadPageView runat="server" Selected="true">
            <iframe frameborder="0" width='850' height='1000' scrolling="yes" src="ConsumptionChart.aspx?Id=<%=accountId %>">
            </iframe>
        </telerik:RadPageView>
        <telerik:RadPageView runat="server">
            <iframe frameborder="0" width='850' height='1000' scrolling="no" src="Audit.aspx?Id=<%=Request.QueryString["Id"]%>">
            </iframe>
        </telerik:RadPageView>
        <telerik:RadPageView runat="server">
            <iframe frameborder="0" width='850' height='1000' scrolling="no" src="weather.aspx?city=<%=city %>">
            </iframe>
        </telerik:RadPageView>
        <telerik:RadPageView runat="server">
            <iframe frameborder="0" width='850' height='1000' scrolling="no" src="consumptionImport.aspx?Id=<%=Request.QueryString["Id"]%>">
            </iframe>
        </telerik:RadPageView>
        <telerik:RadPageView runat="server">
            <iframe frameborder="0" width='850' height='1000' scrolling="no" src="Profile.aspx?Id=<%=accountId %>">
            </iframe>
        </telerik:RadPageView>
        <telerik:RadPageView runat="server">
            <iframe frameborder="0" width='850' height='1000' scrolling="yes" src="UtilityData.aspx?Id=<%=accountId %>">
            </iframe>
        </telerik:RadPageView>
    </telerik:RadMultiPage>

attach Firefox working sample.

Thanks
Yana
Telerik team
 answered on 19 Apr 2010
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?