Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
114 views

I want to have GridBinaryImageColumn that presents image from database. Can this image be inside hyperlink like

<a href="http://.../Product.aspx?Id=1"><img /></a> ?

Or any other approach that make image clickable and links to that row details?

Paul Desormeaux
Top achievements
Rank 1
 answered on 29 Sep 2010
1 answer
95 views
I would like to have a loading panel with out the animated image being shown, how can I do this
Daniel
Telerik team
 answered on 28 Sep 2010
1 answer
96 views
I need to export excel from Radgrid, but the date time column on the Excel is always right indented.  My user requests it left indent.  How I make this happened?

I tried to make the grid item left indent, but the column on the exported excel still right indented.

Please help!

Thanks
Daniel
Telerik team
 answered on 28 Sep 2010
1 answer
122 views
Hey all.

I am dynamically creating the various columns in a grid.  It is a Key value column (not visible), a simple bound column, and a number of Template columns that are dynamically added.
I am able to set the data without any problem.  However, I cannot retrieve che checkboxes in a save button click handler.

Any ideas are GREATLY appreciated.

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="JobTitleEditor.ascx.cs" Inherits="LiaisonApp.Controls.JobTitleEditor" %>
<div id="JobTitleEditor">
    <asp:Button ID="btn_Save" runat="server" Text="Save" onclick="btn_Save_Click" />
    <telerik:RadGrid ID="grid_Data" runat="server" AutoGenerateColumns="False" GridLines="None" OnNeedDataSource="grid_Data_NeedDataSource">
        <ClientSettings EnableRowHoverStyle="True">
            <Scrolling AllowScroll="True" ScrollHeight="550px" UseStaticHeaders="True" />
            <Resizing AllowColumnResize="True" />
        </ClientSettings>
        <MasterTableView DataKeyNames="JobTitleID">
            <RowIndicatorColumn Visible="false" />
        </MasterTableView>
        <HeaderContextMenu EnableAutoScroll="True">
        </HeaderContextMenu>
    </telerik:RadGrid>
</div>

protected void btn_Save_Click(object sender, EventArgs args)
{
    foreach (GridDataItem item in grid_Data.MasterTableView.Items)
    {
        var row = GridDataTable.Rows.Find(item.KeyValues.ToInt());
        foreach (var jobFunction in JobFunctions)
        {
            var columnName = GetJobFunctionColumnName(jobFunction.ListEnumID);
            var checkbox = (CheckBox)item.FindControl( "chk_" + jobFunction.ListEnumID.ToString());
            row[columnName] = checkbox.Checked;
        }
    }
}

private class CheckboxColumnTemplate : ITemplate
{
    int _jobFunctionID = 0;

    public void InstantiateIn(Control container)
    {
        var checkbox = new CheckBox();
        checkbox.ID = "chk_" + _jobFunctionID.ToString();
        checkbox.DataBinding += new EventHandler(Checkbox_DataBinding);
        container.Controls.Add(checkbox);
    }

    void Checkbox_DataBinding(object sender, EventArgs args)
    {
        var checkbox = sender as CheckBox;
        var dataRow = (checkbox.NamingContainer as GridDataItem).DataItem as DataRowView;
        checkbox.Checked = dataRow.Row[GetJobFunctionColumnName(_jobFunctionID)].ToBool();
    }

    public CheckboxColumnTemplate(int jobFunctionID)
    {
        this._jobFunctionID = jobFunctionID;
    }
}

private void BuildGrid()
{
    var gridColumn = new GridBoundColumn();
    gridColumn.DataField = "JobTitleID";
    gridColumn.Visible = false;
    gridColumn.UniqueName = "JobTitleID";
    grid_Data.Columns.Add(gridColumn);

    gridColumn = new GridBoundColumn();
    gridColumn.DataField = "JobTitle";
    gridColumn.HeaderText = "Job Title";
    gridColumn.HeaderStyle.Width = new Unit(180, UnitType.Pixel);
    gridColumn.FooterStyle.Width = new Unit(180, UnitType.Pixel);
    gridColumn.ItemStyle.Width = new Unit(180, UnitType.Pixel);
    grid_Data.Columns.Add(gridColumn);

    foreach (var jobFunction in JobFunctions)
    {
        var newColumn = new GridTemplateColumn();
        newColumn.HeaderText = jobFunction.StringValue;
        newColumn.ItemTemplate = new CheckboxColumnTemplate(jobFunction.ListEnumID);
        newColumn.HeaderStyle.Width = new Unit(80, UnitType.Pixel);
        newColumn.FooterStyle.Width = new Unit(80, UnitType.Pixel);
        newColumn.ItemStyle.Width = new Unit(80, UnitType.Pixel);
        newColumn.UniqueName = GetJobFunctionColumnName(jobFunction.ListEnumID);
        newColumn.DataField = newColumn.UniqueName;

        grid_Data.Columns.Add(newColumn);
    }
}
Thomas
Top achievements
Rank 1
 answered on 28 Sep 2010
4 answers
84 views
Hi,
I am using telerik rad grid in web page with update panel and updae progress.
I also implemented pagination and it works finely.
But i got stuck when Filteration is not working.
I did following things
allowFilteringbycolumn = "true" in rad grid and master table view.
but i didn't working so far.
I didn't change any of the event of rad grid like need data source etc.
Please help!!!
I have to do it by tomorrow.!!!

Thanks in advance.
Pu






pu
Top achievements
Rank 1
 answered on 28 Sep 2010
2 answers
57 views
Hi, I have a problem with the image manager.

In my project I have used a file browser content provider to integrate the editor with my database.

I have just updated the reference from 2010.2.713.35 to 2010.2.826.35 and with the old one everythings work well, but after I have updated the dll I have an issue:

when the image manager is loaded everything go well, but when I select one directory, the list of the image are not updated.
I have seen that the ResolveDirectory in my file browser content provider class is not called, like was before the upgrade.

Thank you
fforna
Top achievements
Rank 2
 answered on 28 Sep 2010
1 answer
147 views

hi guys,

 please help me out!

I have a master page that contains a RadMenu:

on Masterpage.master:

01.<div id="menuDiv">        
02.   <telerik:RadMenu  ID="RadMenu1" runat="server" BorderColor="black">  
03.   </telerik:RadMenu>  
04.lt;/div>

on Masterpage.master.cs there are a banch of menuitems like this:
01.protected void BuildDisplayMenu()  
02.{  
03.    RadMenuItem item1_3 = new RadMenuItem();  
04.    item1_3.Text = "Display";  
05.    item1_3.ToolTip = "Display Setting";  
06.      
07.    item1_3.NavigateUrl = "~/traders/Preference/Display.aspx";  
08.    RadMenu1.Items.Add(item1_3);  
09.}

 
Then,
I have a content page called Preference.aspx, which has an Radio functioning the show or hide
of the "Display" item clicked by clients:

01.<tr><td>Show Display:</td><td>  
02.<asp:RadioButtonList ID="si_enable_Display" runat="server" RepeatLayout="Flow" RepeatDirection="horizontal" AutoPostBack="true">  
03.    <asp:ListItem Text="Yes" Value="enable" onclick="javascript:DisplayStat(value);"></asp:ListItem>  
04.    <asp:ListItem Text="No" Selected="true" Value="disable" onclick="javascript:DisplayStat(value);"></asp:ListItem>  
05.</asp:RadioButtonList></td></tr>
I have tried numerous times, but still failed! 
The DisplayStat() function I have tried this:
01.<script type="text/javascript" language="javascript">  
02.    function DisplayStat(object)  
03.    {  
04.        var menuID = $find('<%=((RadMenu)Master.FindControl("RadMenu1")).ClientID %>');  
05.        var item = menuID.findItemByText("Display");  
06.        if(object=="enable"){  
07.         item.Enable();  
08.         }  
09.         else{  
10.            item.disable();  
11.         }  
12.    }  
13. 
14.</script>
The 'menuID' is not functioning..by some reason. I have also tried
var menuID = document.getElementById('<%=((RadMenu)Master.FindControl("RadMenu1")).ClientID %>');

And the problem still exists.

Please Help me out !!!thanks A lot!!!

Veronica
Telerik team
 answered on 28 Sep 2010
1 answer
76 views
Hai,

Im trying to use two new telerik themes. When we started our project we had been using Q1 release, then we updated it to Q2(2010.2.826.35). Im facing CSS issue with Window7 and Sitefinity themes, it happens only with IE not in Firefox.In firefox its working exactly fine. But other themes are working fine in IE. Please give me the solution... (*We are really near to project deadline)...
Dimo
Telerik team
 answered on 28 Sep 2010
1 answer
70 views
Hi,

I am using a RadGrid with form based editing on my page. I have defined my own template for the form that is used for editing purpose. In the template i have a table with some fields in one of my <td> I have used a Rad Datepicker, By functionality it is working fine but the datepicker that is opening on clicking the Rad DatePicker does not opens right at the picker image rather it opens at any random position in the UI. Please suggest for any solutions.

Smita.
Dimo
Telerik team
 answered on 28 Sep 2010
2 answers
45 views
hi,

I want to do something in javascript while the node is animating, actually, I have html div which contains vertical line, now, I want to increase the height of that line while the height of treeview is increasing, so it will looks like the line animating with tree too (decreasing is same)

I found onclientnodeanimationend, which is triggered only after the finish of animation, so, is there an event looks like onclientnodeanimating or how can I solve this problem?
Yana
Telerik team
 answered on 28 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?