Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
184 views
Hi,
I want to show/hide ExpandCollapseColumn based on some Boolean  condition from C# Code behind.

here is my code..
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {
             if(! bShowExpandColumn)
              (e.Item as GridDataItem)["ExpandColumn"].Visible = false;
    }
}

it's hiding "ExpandCollapseColumn" But the problem is the next column moved to the left.

How can i do this?
Venkata
Top achievements
Rank 1
 answered on 18 Aug 2011
8 answers
564 views
I have one checkbox and two textboxes inside a FormTemplate. I need to disable the textboxes whenever the checkbox is set to true onclick. I would prefer this to happen on the client side, yet I keep getting the "control not registered" javascript error for the checkbox and textboxes whenever my javascript function runs.

Please advise.
Darin
Top achievements
Rank 1
 answered on 18 Aug 2011
2 answers
137 views
Not causing a problem; just annoying.  All the RadPanelItem tags that got created when I used the GUI to drop and build a RadPanelBar have elements called "Owner" that show the ID from the PanelBar they're in.  But I get a Message in the Error List for every one saying that it's not a valid attribute.

It kind of clutters up the Error List :(

What's up?

Tim
Tim
Top achievements
Rank 1
 answered on 18 Aug 2011
2 answers
53 views
My problem is, I believe simple. I want to be able to acces some texboxes that are included in a nestedviewtemplate of a grid hierarchy.
The template includes a formview, which includes a tabstrip whose pages will have the textboxes. These textboxes will be in read only mode until an "edit" button - also part of the pageview - is clicked. At that time, I want to turn all textboxes to be editable (readOnly=false) and be able to access the their values. After clicking on a save button, which will be made visible at that time, then the values will be saved to the database via web services.

Anyway, the main grid I have is the following, simplified for clarity:

<telerik:RadGrid ID="OrbitRadGrid" runat="server" >
    <MasterTableView
        <NestedViewTemplate>
            <asp:FormView ID="FormView" runat="server" ViewStateMode="Enabled" DataSourceID="ObjectDataSource1">
                <ItemTemplate>
                    <asp:Panel ID="NestedViewPanel" runat="server" CssClass="viewWrap" Width="1000px">
                        <telerik:RadTabStrip runat="server" ID="TabStip" MultiPageID="Multipage" SelectedIndex="0">
                            <Tabs>
                                <telerik:RadTab runat="server" Text="General" PageViewID="General"/>
                                <telerik:RadTab runat="server" Text="Status" PageViewID="Status"/>
                              </Tabs>
                        </telerik:RadTabStrip>
                        <telerik:RadMultiPage runat="server" ID="Multipage" SelectedIndex="0">
                            <telerik:RadPageView runat="server" ID="Genearal">
                                <ul style="padding-left: 30px; padding-top: 3px; padding-bottom: 3px">
                                    <li>
                                        <telerik:RadTextBox ID="NameTextBox" Text='<%# Eval("ItemName") %>' 
                                            Label="Name:" LabelCssClass="InfoLabelsClass"  
                                            ReadOnly="true" runat="server">
                                        </telerik:RadTextBox>
                                    </li>
                                    <li>
                                        <telerik:RadTextBox ID="SourceTextBox" Text='<%# Eval("ItemSource") %>' 
                                            Label="Source:" LabelCssClass="InfoLabelsClass"
                                            ReadOnly="true" runat="server">
                                        </telerik:RadTextBox>
                                    </li>
                                           .......
                                           .......
                              </Telerik:RadMultiPage>
                               <asp:Button runat="server" ID="EditBtn" Text="Edit" ></asp:Button>
                       </asp:Panel>
                </ItemTemplate>
            </asp:FormView>                  
        </NestedViewTemplate>
        ........
        ........

So how can I access the textboxes as well as any other controls I may embed inside the TabStrip's PageViews from my template once I click on the edit button?

Thanks

Sal
Sal
Top achievements
Rank 1
 answered on 18 Aug 2011
2 answers
57 views
Hi Telerik,

This is a pretty weird problem. I have done a bit of debugging into it, which hasn't proved fruitful, but did allow me to rule out a few things.

So, starting it off... I see this when I drill on a Microsoft Chart Control hosted as content in a RadDock, BUT I only see it on IE (Tested IE 9.0.8112).

http://i.stack.imgur.com/O5KxS.png

The ImageMap for the chart renders to the screen for a second upon clicking of the chart. 
Here's a pastebin for the imagemap mark-up. Sorry it's not well-spaced..IE slaughtered it. http://pastebin.com/3bdxbcC4

Once again, I don't see this issue in any other modern browser. In addition, I moved my chart control to a separate solution, mocked up a couple of data points, and did not see the image map rendered. This is NOT to say that there is conclusive evidence that the issue is on Telerik's side, clearly I could have introduced/removed the issue in another part of my solution, but I am not sure and do not have much debugging information to go on.

As such, has Telerik experienced this sort of issue in the past? I didn't see any users mention it, but I suspect everyone's using the Telerik Chart Control.

Sean
Sean
Top achievements
Rank 2
 answered on 18 Aug 2011
3 answers
149 views
Hi Telerik Team,

I am developing a webpart using RadTabStrip structure associated to a RadMultipage that can contain three RadPageViews.
Every single RadPageView has
a set of controls grouped in a single custom class.
This
structure is displayed properly on the page, but when I save data to use them in the next page, I try to access the controls in each of these pageviews but I don't find them.
In fact,
the call PageView.Controls [index] gives the following error: 'SystemArgumentException index was out of range'.
Also when I perform a FindControl ("MyCustomControl") on every single multipage or on PageView for direct research of my custom control I receive as output 'null'. Now  I attach my code.

ASPX
 <div class="el-tabview-strip">
       <rad:RadTabStrip ID="RadTabStrip1" runat="server" Orientation="VerticalLeft" SelectedIndex="0" MultiPageID="RadMultiPage1"></rad:RadTabStrip>
 </div>
 <div class="el-tabview-content">
        <div>
            <rad:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" Height="416px" ></rad:RadMultiPage>
        </div>
 </div>


ASPX.CS

 
protected void Page_Load(object sender, EventArgs e)
{
   if (!IsPostBack)
      {
       List<String> aac = GetState();
       foreach (String cc in aac)
              {
               //Adding View to MultiPage
               Telerik.Web.UI.RadPageView view = new Telerik.Web.UI.RadPageView();
                    view.ID = ClientID + "radPageView" + cc.NumeroCC;
                    CustomControls MyCustomControl = new CustomControls();
                    MyCustomControl.ID = ClientID + "customContol" + cc.NumeroCC;
                    view.Controls.Add(MyCustomControl);
                    RadMultiPage1.PageViews.Add(view);
                    //Adding Tab to RAdstrip
                    Telerik.Web.UI.RadTab tab = new Telerik.Web.UI.RadTab();
                    tab.Text = "C/C " + cc.NumeroCC.Replace("/", " / ");
                    tab.CssClass = "tabsTab paddingTop17";
                    tab.SelectedCssClass = "tabsTab tabsTabSelected paddingTop17";
                    tab.PageViewID = ClientID + "radPageView" + cc.NumeroCC;
                    RadTabStrip1.Tabs.Add(tab);
                }
            }
        }
 public override void SaveNavigationState(Core.NavigationEventArgs e)
        {
            List<String> list = new List<String>();
            String aac = new String();
            for (int i = 0; i < RadMultiPage1.Controls.Count; i++)
            {
                Telerik.Web.UI.RadPageView pageView = RadMultiPage1.Controls[i] as Telerik.Web.UI.RadPageView;
                CustomControls current = pageView.Controls[i] as CustomControls;
                if (current == null)
                    return;
                aac = current.GetControl(); //This Method Return the value of all control grouped in the CustomControl
                list.Add(aac);
            }
    }

I hope you can help me.
Best regards,
Gromiko Francese
Kalina
Telerik team
 answered on 18 Aug 2011
4 answers
85 views
I have a very strange problem when i hide columns before exporting grid to excel using " rgReports.MasterTableView.GetColumn("Column5").Visible = false; "

I have grid with 10 columns , when exporting i want to show only 4 columns.assume columns to be shown are column1,column4,column8,column9.
When i hide columns the first columns is shown in n columns where n == hidden columns as shown in the image.

How to really hide columns in an efficient way ??!!!

Here is my code :
rgReports.MasterTableView.GetColumn("Column1").Visible = false;
rgReports.MasterTableView.GetColumn("Column2").Visible = false;
rgReports.MasterTableView.GetColumn("Column3").Visible = false;
rgReports.MasterTableView.GetColumn("Column4").Visible = false;
rgReports.MasterTableView.GetColumn("Column5").Visible = false;
rgReports.MasterTableView.GetColumn("Column6").Visible = false;
 
rgReports.ExportSettings.FileName ="Report1";
 
rgReports.ExportSettings.OpenInNewWindow = true;
            rgReports.MasterTableView.AllowPaging = false;
            rgReports.MasterTableView.Rebind();
            rgReports.MasterTableView.ExportToExcel();

Thanks in advance for ur help.
nader
Top achievements
Rank 1
 answered on 18 Aug 2011
1 answer
250 views
Hi!

I have a Grid with an alternating item style, so every alternating row has an alternating color. The grid gets updated when a button is clicked on the page.

I need all rows with errors to have its back color to be set to red after the button click. I tried to accomplish this in Item Data Bound where I switch the back color to red for an item that is a griddataitem and is an error.

But, if there are 3 rows errored out one after the other, the color applies to only the first and third rows and leaves the middle row as it was. Any suggestions on how I could work through this to achieve what I am working towards?

-rD
Galin
Telerik team
 answered on 18 Aug 2011
2 answers
108 views
Hello,

Really like the RadControls for ASP.NET AJAX Demos and the styling you guys used there.  I'd like to adapt some of the demos for prototypes for demonstrations. 

Would it be too much to ask for the source .psd (Adobe Photoshop) files for the Demos (e.g. in the demos folder, RadControlsExamples, styles11, layout11.png, etc.)

Please let me know.

Kind Regards,
John M.
Monty
Top achievements
Rank 1
 answered on 18 Aug 2011
2 answers
163 views
Hello,

I am trying to create a way to display some pdf document that are location on a remote drive connected to our server. This seems like a difficult problem (and Im pretty new). What I have done so far is 1- Read files from specified folder, 2- Create Tab & Pageview for each pdf file. 3 - Read/Write the file to aspx page adding query sting to request specified pdf, 4- Create RadWindow for each pdf add to pageview. It seems like things are starting to work except that in every tab it displays every pdf instead of just displaying a single pdf per tab.

Ive posted my code here [removed by Admin for containing dev version of the Telerik controls].

Any help would be great, I really only know enough to really break things

~Curt
Curt
Top achievements
Rank 1
 answered on 18 Aug 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?