Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
443 views
I'm new to the grid so please bear with me. I've got a GridTemplateColumn which I'm using to display an image.
<telerik:GridTemplateColumn HeaderText="Address" UniqueName="Address" ItemStyle-Width="20">
    <ItemTemplate>
        <a href='<%# Eval("Address") %>' title='<%# Eval("Address") %>'><img src="images/go.gif" border="0" width="33"></a>
    </ItemTemplate>
</telerik:GridTemplateColumn >
This shouldn't be visible if the data is empty, so in the ItemDataBound method, I did
Dim item As GridDataItem = CType(e.Item, GridDataItem)
If condition Then
    item("Address").Controls(0).Visible = False
End If
And this worked just fine under FireFox. But with IE8, it doesn't. Instead, I had to move this to the PreRender method where I had to iterate through the items with the same logic to get it to work. And this approach also works fine under FireFox too, so that's good.

But since I'm new to the grid, I'm wondering, is there a "correct" or recommended place to do this kind of logic? I initially went with the ItemDataBound because that's where similar approaches that I'd found (e.g. here ) had done it. But that obviously didn't work for me with IE8.
Shinu
Top achievements
Rank 2
 answered on 21 Dec 2011
2 answers
347 views
Hi,

I created a RadGrid control on the page and it has one GridCheckBoxColumn bind to a boolean field value in the database. I found that it looks too grayed-out in regular mode (in which the checkbox is disabled). Is there anyway to make it look more readable like in Edit Mode (in which the checkbbox is enabled).

Thanks

Lamk.
LamKhoa
Top achievements
Rank 1
 answered on 21 Dec 2011
1 answer
170 views
How can I change the expand collapse image from the default plus/minus?
Princy
Top achievements
Rank 2
 answered on 21 Dec 2011
4 answers
192 views
Hi,

   I don't want to provide Hourly option in RadSchedulerRecurrenceEditor for user. So please let me know how can i remove that. For easy understand look into my attached file i mark with red round.

Thanks,
Maddela.
Maddela
Top achievements
Rank 1
 answered on 21 Dec 2011
0 answers
135 views
I have a problem when exporting RadGrid to excel.i'm using the following code

RadGrid1.ExportSettings.IgnorePaging = true; (or false)
RadGrid1.ExportSettings.OpenInNewWindow = false;
RadGrid1.ExportSettings.ExportOnlyData = true;
RadGrid1.MasterTableView.ExportToExcel();

strange thing is i have three computers my development machine, testing server and production server in all three machines
 i'm using the same code but it's works fine only in my testing server.In other two machines when i click on export button it hangs
out permanently and nothing happens and the most serious issue is it uses the machine CPU almost up to 40% .
when this happen i have faced many more difficulties with my production server.since the CPU usage is high applications crashes.
CPU usage doesn't get normal until i terminate the process manually.thought to ask this from u before i remove the rad controls
 from the application.please help me with this
in development machine i'm using telerik trial version downloaded several months ago.
in the testing and production my employer uses licence versions and i'm not pretty much sure about which versions are using but i'm
sure that they are also using a latest version  

another thing when i try google crome browser on my development machine ,nothing happens just a post back on button click,not hanging out, not using CPU 40% 

development machine
IE 8


test server
IE 8 

production
IE 9

Chamara
Top achievements
Rank 1
 asked on 21 Dec 2011
3 answers
143 views
hi,

I have a radmenu with sqldatasource.When the user log in the site,the menu will load according to the user rights.I check the user rights from the database.The code below doesn't work for me.How can I achieve this?

private void CreateMenuByUser()
       {
           RadMenu1.Visible = true;
           DataTable table = GetDataTable("SELECT * FROM UserRights INNER JOIN Users ON UserRights.UserID = Users.UserID WHERE Users.UserID = '" + Session["UserID"] + "'");
 
           //RadMenuItemCollection menuItems = RadMenu1.Items;
           RadMenuItem disabledItems = new RadMenuItem();
 
           foreach (DataRow item in table.Rows)
           {
               if (bool.Parse(item["rRead"].ToString()) == false)
               {
                   foreach (RadMenuItem menuItem in RadMenu1.Items)-->>>this line cause the error Index was out of the range error
                   {
                       if (menuItem.Value == item["MenuID"].ToString()) disabledItems = menuItem;
                       if (menuItem.Items.Count > 0) GetAllChildItems(menuItem, item["MenuID"].ToString());
 
                   }
 
                   RadMenu1.Items.Remove(disabledItems);
               }
           }
       }

     private void GetAllChildItems(RadMenuItem itemsList, string MenuId)
      {
           RadMenuItemCollection menuItems = itemsList.Items;
           RadMenuItem disabledItems = new RadMenuItem();
 
           foreach (RadMenuItem menuItem in itemsList.Items)
           {
               if (menuItem.Value == MenuId) disabledItems = menuItem;
           }
 
           menuItems.Remove(disabledItems);
       }
Emre
Top achievements
Rank 1
 answered on 20 Dec 2011
1 answer
144 views
I have several columns in my radGrid that are set to visible = false. Is there a way to export those columns also? Right now they don't show in the export. I'm trying to export to Excel.

Thanks!
Justin
Top achievements
Rank 1
 answered on 20 Dec 2011
5 answers
174 views
Adding the groupfooter and calculating a total for a column was pretty easy, but how can I format the output so that it shows something besides "Sum: 9999"?
Shawn Clabough
Top achievements
Rank 1
 answered on 20 Dec 2011
6 answers
275 views
I have a radmenu that I generate by examing sharepoint document library folders and building out a submenu structure based on the folder.
When I put many of the control on the page, the root menu from other controls shows up over the sub menu of the control.
Does anyone know how to prevent it, by altering programatically assigning the style for the z index to the sub menus?
See the attached file for a better understanding of the problem. The text was sanitized for public consumption.


Edit:
Additional Information: When rolling over the menu and the subitems menu shows it does properly cover the other menus and they do not show through. However when rolling over it a 2nd time it definitely shows through, as though its z index is larger.

These controls are each in their own webparts, does that matter? Maybe they're inheriting z-index?

Edit: more info: the effect only occurs in IE, didn't occur in chrome or mozilla firefox

My ascx: (customItem is the submenu), these classes are applied programmatically in code
<style type="text/css">
    .CustomItem
    {
         z-index:99999;
    }
     
    .rootItem
    {
        text-align:center !important;
        text-decoration:none !important;
        z-index:-1;
    }
    .CustomItem:hover
    {
     text-decoration:none !important;  
     
    }
</style>
<div id="section" runat="server" >
<telerik:RadMenu ID="FolderMenu" runat="server">
</telerik:RadMenu>

Ivan Zhekov
Telerik team
 answered on 20 Dec 2011
3 answers
177 views
  <MasterTableView DataKeyNames="ID" CommandItemDisplay="TopAndBottom"  EditMode="PopUp" DataSourceID="DS1">


Hi,

I was using the above code for editing data with a pop-up.
My edit is working fine...but the add button...which appears when I Give Commanditemdisplay is not l working..It says the specific cast is Invalid...once I remove the date fields then i get the add button working...


My data field:

   <telerik:GridBoundColumn UniqueName="TechnicalDateofEntry" HeaderText="TechnicalDateofEntry" DataField="TechnicalDateofEntry" DataFormatString="{0:d}">


Edit template:
                            <td>
                               DateofEntry  
                            </td>
                            <td>
                                <telerik:RadDatePicker ID="TextBox17" runat="server"  SelectedDate='<%# Bind( "TechnicalDateofEntry") %>'>
                                </telerik:RadDatePicker>
                            </td>
                 
 <InsertParameters>
                  
                    <asp:Parameter Name="TechnicalDateofEntry" Type="DateTime" />
                   
                                       
                </InsertParameters>


.I have the attached error...plz let me know wats causing this issue..Am i missing casting anywhere...all I declared is date time..


Thanks a lot..
S
Top achievements
Rank 1
 answered on 20 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?