Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
414 views
I have a radgrid with a GridImageColumn. I display a thumbnail image in the image column form a data base.  I have set the Grid's onrowdblclick to instantiate some java to popup a radwindow with a larger version of the image.

Everything works great... EXCEPT, if the user double clicks the actual thumbnail image. Nothing happens. Is there a way to either make the GridImageColumn or the thumbnail image also call the java script like the onrowdblclick event?


 

                        <script type="text/javascript">  
                            function RowClick(sender, eventArgs) {  
                                var MasterTableView = eventArgs.get_tableView();  
                                var cell = MasterTableView.getCellByColumnUniqueName(MasterTableView.get_dataItems()[eventArgs.get_itemIndexHierarchical()], "IDImages");  
                                var oWnd = radopen("../../imagemanager/imagedisplay.aspx?IDImages=" + cell.innerHTML);  
                            }  
        </script>   
                  
                    <telerik:RadGrid ID="rg_VehicleImages" runat="server"   
                        AllowAutomaticDeletes="True" AutoGenerateDeleteColumn="True" CssClass="radgrid"   
                        DataSourceID="sds_ImagesVehicle" GridLines="None" Width="220px">  
                        <mastertableview autogeneratecolumns="False" datakeynames="IDImages"   
                        datasourceid="sds_ImagesVehicle">  
                            <rowindicatorcolumn> 
                                <HeaderStyle Width="20px" /> 
                            </rowindicatorcolumn> 
                            <expandcollapsecolumn> 
                                <HeaderStyle Width="20px" /> 
                            </expandcollapsecolumn> 
                            <Columns> 
                                <telerik:GridBoundColumn DataField="IDimages" DefaultInsertValue=""   
                                    HeaderText="" ItemStyle-ForeColor="White" ItemStyle-Width="2px"   
                                    SortExpression="True">  
                                    <HeaderStyle Width="2px" /> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridImageColumn AlternateText="Thumbnail"   
                                    DataImageUrlFields="FilePath, ThumbnailName" DataImageUrlFormatString="{0}/{1}"   
                                    DataType="System.String" FooterText="ImageColumn footer" HeaderText=""   
                                    ImageAlign="Middle">  
                                    <HeaderStyle Width="75px" /> 
                                </telerik:GridImageColumn> 
                                <telerik:GridBoundColumn DataField="ThumbnailName" DefaultInsertValue=""   
                                    HeaderText="ThumbnailName" SortExpression="ThumbnailName"   
                                    UniqueName="ThumbnailName" Visible="False">  
                                </telerik:GridBoundColumn> 
                            </Columns> 
                        </mastertableview> 
                        <clientsettings> 
                            <clientevents onrowdblclick="RowClick"/>  
                        </clientsettings> 
                    </telerik:RadGrid> 



 

Tsvetina
Telerik team
 answered on 15 Jun 2010
1 answer
88 views
I am using RadControls for ASP.NET AJAX Q1 2010 SP2  v2010.1.519.35.

The aspx file includes:
[.aspx begin]
<telerik:RadTreeView ID="RadTreeView1" Runat="server" onnodecreated="RadTreeView1_NodeCreated">
</telerik:RadTreeView>

<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="AddNode" />
<asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="Other" />
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
         <telerik:AjaxSetting AjaxControlID="Button1">
             <UpdatedControls>
                 <telerik:AjaxUpdatedControl ControlID="RadTreeView1" />
             </UpdatedControls>
         </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadScriptManager ID="RadScriptManager1" Runat="server"></telerik:RadScriptManager>
[.aspx end]

the c# codes behind are:
[c# begin]
private static int i = 0;

protected void Page_Load(object sender, EventArgs e)
{
}

protected void Button1_Click(object sender, EventArgs e)
{
    RadTreeNode node = new RadTreeNode();
    node.Value = i.ToString();
    RadTreeView1.Nodes.Add(node);
}

protected void RadTreeView1_NodeCreated(object sender, RadTreeNodeEventArgs e)
{
    if( e.Node.Level == 0)
    {
        e.Node.Text = "No." + i.ToString();
        i++;
    }
}

protected void Button2_Click(object sender, EventArgs e)
{
    int j = 0;
    j++;
}
[c# end]

My intention is:
        add RadTreeView nodes by pressing button1 ,control the nods by NodeCreated event;
        do something else by pressing button2.

My problem is:
        when pressing the "Button2", the NodeCreated event for RadTreeView1 is also fired . We can see it from the changing of "i" variable.

Why? Or how to avoid it?

Thanks.
Simon
Telerik team
 answered on 15 Jun 2010
4 answers
235 views
Hi,
      I have a template column for ProductId which is of type "int". I defined it as  <telerik:GridTemplateColumn>  I have some limitation ths why i can not make it <telerik:GridNumericColumn>.How can i validate the data type(so that user can not enter any character in that) while user will type in Filter text box like its happening for <telerik:GridNumericColumn> columns.

Regards,
Dheeraj
Dheeraj
Top achievements
Rank 1
 answered on 15 Jun 2010
3 answers
288 views
Hi..

Is it possible to have multiple instances of RadWindowManager at one page? I know it was not possible in old radcontrols, but maybe in prometheus it is? .. I ask becouse I need to use radwindowmanager in my DNN skin, and in some modules with multiple instances at one page.

Regards
Petio Petkov
Telerik team
 answered on 15 Jun 2010
3 answers
56 views
Hi,
      I have a HeaderContextMenu in grid which is showing unexpected behaviour in IE6 and Safari browser. When I am seeing the columns in menu, even though they are in grid the  columns checkboxes are unchecked in HeaderContextMenu  and sometimes even the column is not in grid the also it showing as checked.

Note- I am saving the grid settings in database.

but in IE8 I am getting every thing fine means the columns which are in grid those are only comning as checked rest are unchecked in context menu.

Please suggest me regarding this problem.

Regards,
Dheeru
Radoslav
Telerik team
 answered on 15 Jun 2010
1 answer
63 views
Dear Telerik Team,

   How can I add an javascript function to set the max length to the radEidtor Version 2009?


thanks
Rumen
Telerik team
 answered on 15 Jun 2010
1 answer
65 views
Hello everyone,

in my current project (aps.net page) I need a chart that can be edited in real time by the user while moving the cursor . Instead of using TextBoxes to modify the data, the user wants to move the cursor through the x-axis or y-axis in order to redraw the line chart in real time.

Any idea if this is currently supported, or how could I get it done?

Thanks in advance
Ves
Telerik team
 answered on 15 Jun 2010
3 answers
107 views
I'm using 2010 1 309

Some of  my bar charts are showing with the bars not filled in - just dashed lines around border.
(See file)

Anyone else seen this?
Ves
Telerik team
 answered on 15 Jun 2010
13 answers
223 views
i just wanna to make method that creates new window and passes a paramter of Control.ascx path

then the window loades it in ContentTemplate?????
Fiko
Telerik team
 answered on 15 Jun 2010
2 answers
137 views
hi

how can i set the witdh of my textbox in edit mode?

i want to get the full witdh of my column as the width of my boundcoloumn auto editor textbox?
Webster Velasco
Top achievements
Rank 2
 answered on 15 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?