.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

How to access Telerik Grid's rows and cells?

Posted By:      Posted Date: October 20, 2010    Points: 0   Category :ASP.Net


I have the following telerik grid:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                        <telerik:RadGrid ID="GrdDynamic" runat="server" AutoGenerateColumns="false"
                                      <telerik:GridBoundColumn AllowFiltering="false" HeaderText="MovieID" UniqueName="MovieID" HeaderStyle-Wrap="false"
                                    <telerik:GridTemplateColumn AllowFiltering="false" D HeaderText="Channel Number" UniqueName="Channel Number" ItemStyle-HorizontalAlign="Center">
                                            <asp:TextBox ID="txtChannelNo" runat="server" Text='<%# 

View Complete Post

More Related Resource Links

Split Grid Cells dynamically into multiple rows : WPF


How can i achive this table structure GUI using available WPF controls dynamically?


Col 1

Col 2

Col 3

Col 4

Row 1


Expand rows in a data grid to show details in the same page

<asp:templatecolumn headertext="Purchase Order"> <headerstyle horizontalalign="center"></headerstyle> <itemstyle horizontalalign="center"></itemstyle> <itemtemplate> <%# DataBinder.Eval(Container.DataItem, "PurchaseOrder") %> </itemtemplate> </asp:templatecolumn> <asp:templatecolumn headertext="Order"> <headerstyle horizontalalign="center"></headerstyle> <itemstyle horizontalalign="center"></itemstyle> <itemtemplate> <a href="OrderDetail.aspx?Order=<%# DataBinder.Eval(Container.DataItem, "OrderNumber")%>"> <%# DataBinder.Eval(Container.DataItem, "OrderNumber") %> </a> </itemtemplate> </asp:templatecolumn> <asp:templatecolumn headertext="Ack Date"> <headerstyle horizontalalign="center"></headerstyle> <itemstyle horizontalalign="center"></itemstyle> <itemtemplate> <%# DataBinder.Eval(Container.DataItem, "AcknowledgeDate") %> </itemtemplate> </asp:templ

displaying error message - Telerik MVC grid - AJAX mode

I want a common solution for handling error messages ON telerik mvc grid in ajax inline and popup edit modes. I am not talking about error messages that are related to single input field. These are business error messages that come back to grid from DB upon clicking grid edit or insert buttons. I want to dispaly error message and not loose data in input fields, bcaz in some cases we are talking about more than 20 fields. 1) I want to know the best way to handle error messges received from backend while using telerik mvc grid. 2) Is it possbile to display error message in a message dialog box?

Regarding Use Of Rad Grid Telerik control

I am using Telerik Rad Grid Control in my Sharepoint While creating Custom field type . I downloaded Telerik Rad Controls for ASP.Net AJAX Q2 2010 SP1.and put my telerik.web.config.UI in GAC .I added in web.configthe safe controls < SafeControl Assembly="Telerik.Web.UI, Version=2009.2.701.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TypeName="*" Safe="True" /> < SafeControl Assembly="Telerik.Web.UI, Version=2010.2.826.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.Design" TypeName="*" Safe="True" /> and in my .ascx file I added this thing: <% @ Register assembly="Telerik.Web.UI, Version=2010.1.309.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4"   namespace="Telerik.Web.UI" tagprefix="telerik" %> and I am getting this error please tell me where is tha problem .   File Not Found.   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)    at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark

How to edit multiple rows in a grid



I have a gridview on a web form and it is working, but the users find it too slow for data entry with them having to click on the edit and update buttons.  I would like to allow them to edit all the rows and then when the form's overall save button is pressed then I save the changes.  I found this: http://csharpdotnetfreak.blogspot.com/2009/05/edit-multiple-records-gridview-checkbox.html which does something similar, but I don't want to use the check box to indicate which row is being edited.  I've got close based on that code, but one of the controls in the column needs to control how the rest of the columns are displayed and I can't work out how to refer to the other columns and control on the current row from some code that is called by the OnTextChanged associated with a control.

I hope I've managed to state clearly what my problem is, if not let me know and I'll try again.

Thanks for any help 

ASP.NET Grid - Merge cells or hide borders



I am working on ASP.NET 4.0 application.I want to bind the data in a datatable to a grid control and i want to do some formatting.

I want to merge the cells or hide the cell border in the first three columns (Merge every 5 cells in a column). And Vertical align the text to center.

Also i need row border at the end of every 5 rows.

For example, If i am binding 10 rows to the Grid i need row border only at the end of 5th and 10th row. And merge every five cells only in the first three columns. All the other columns should not be changed.

I also want to change the background color of the cells in all rows based on the value in that cell.

How to achieve this in ASP.NET 4.0 and which control can be used to display in this format?



Create a group from selected rows of grid




Let me see if I can explain what I am trying to do...


From a gridview a user would be able to select as many rows as they wanted and create a "custom group" ... that user group would then be available from a dropdown list for future selection. So next time they would just select the "custom group" from a dropdown list and the resulting datagrid would only have those rows that were originally selected.

So if I had a datagrid which had: empoyeeID, name, address, phone#, etc...

1. I select what ever rows I want
2. Create a name for the new custom group
3. Click a "save group" button ... this would save all the employeeID's from selected rows.
4. A dropdown list would then be updated with the new custom group ... ie, MIKE's GROUP
5. User could then select MIKE's GROUP from a dropdown list and work only with rows that were added to it.


Hope that makes sense.

Thanks in advance.


Urgent:Create/Update Winforms grid columns and rows with config file values


I have legacy winforms datagrid , I have to add/replace columns with new values, My new column names and row values are changes as per new requirements , so I am looking to update datagrid form any config file , so in future for any new requirements , If I update my config file , it hast update existing datagrid.

Please suggest me the code; I am trying from 4 days and its urgent now.



Urgent:Create/Update Winforms grid columns and rows with config file values


I have legacy winforms datagrid , I have to add/replace columns with new values, My new column names and row values are changes as per new requirements , so I am looking to update datagrid form any config file , so in future for any new requirements , If I update my config file , it hast update existing datagrid.

Please suggest me the code; I am trying from 4 days and its urgent now.




columns and rows of grid generate dynamically



i am developing the applicaton, from which i have a grid and that grid i want to use for the insert data,

i have a page default.aspx page, in this i have a dropdownlist, according to selection of the dropdownlist, grid's cols and rows created dynamically in insert.aspx. so in page load of the insert.aspx the grid will automatically have that much of cols and rows and that all cell contain the textbox.

how can i set that dynamically....

please help me....

thanks in advance

waiting for the reply.....

Help with selecting rows from a grid view



How do you select value from a gridview? I would like to pass values of rows selected to a query with the code below, but the grid seems to be frozen and I can't find a property for the grid that allows me to select rows.



Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles GridView1.SelectedIndexChanged

Dim DB As New AOP29DBDataContext

If GridView1.SelectedValue = "Receiver" Then

Dim Query = From p In DB.Receivers

Select p

GridView2.DataSource = Query


End If

If GridView1.SelectedValue = "Donor" Then

Dim Query = From p In DB.Donors

Select p

GridView2.DataSource = Query


End If

End Sub

DateTime picker in dynamically created Rows in Grid View


Hi thanx's for checking the problem.

Problem: How to implement datetimepicker(jquery) in dynamically created rows' in gridview.

I have created a Gridview,that add' rows dynamically.I have a Year column in gridview where i want to implement the datetimepicker.But failed to do so.

Help will be highly appriciated. I am attaching the code : below codes are working perfectly and rendering the datetimepicker for only ist row.but for dynamically row's its not working. If any one have done such kind please help me out.


.aspx page

<asp:GridView ID="GridViewDiploma" runat=

AJAX/Telerik - Access Denied Javascript error


Hi all,

I have an app which loads a popup of a different app - ie cross domain browsing.  In the popup I also have telerik AJAX controls. 

When the user clicks on the close button on the page, using  :

RegisterCloseScript(Page, 1)

A javascipt error then appears, claiming Access Denied - line: 5959, which is:  

var offsetL = w.screenLeft - top.screenLeft - top.document.documentElement.scrollLeft + 2;
 I previously had issues with AJAX and telerik and have modified the MicrosoftAjax.js files as described in the links:
..and changed the script manager to:
<asp:ScriptManager ID="ScriptManager1" runat="server"><Scripts><asp:ScriptReference Name="MicrosoftAjax.js" ScriptMode="Auto" Path="~/P

How to select all rows in grid from a click event?



I'm using the code below to select multiple rows in a gridview using a checkbox, how do I modify the code in a "select all" button click event to select all the rows by checking the checkboxes in all the rows? How do I also clear all the checkboxes using sa "Clear" button click event?

<asp:GridView ID="GridView2" runat="server" Height="211px" Width="16px">


<asp:TemplateField HeaderText="SomeText" >


<asp:CheckBox ID="CheckBox1" runat="server" Text="" />





Thank You.


How to access multiple header rows of the gridview in Render method


I have extended a gridview to add an additional header with following two hyperlink controls "Select All" and "Clear All". These will operate on checkboxes in the data rows of the grid. I hide the column headers as I only want to show one column with checkboxes and "Select/Clear All" links. Everything is working as expected. 

Now, I wanted to add a scrollbar to my grid control, I did add the scroll bar using div but what it does is, it includes the "Select All and Clear All" links aswell. I only need to add the scrollbar to datarows and not to the header.

I am trying to extend my control to include hte scrollbar by adding div during Render function. But how will I determine or loop through header rows? How will i get the header row with hyperlinks that I created above?? In Render if I do this.HeaderRow, it gets the original column header and not the custom header. Please help!!!

Getting multiple rows from oracle stored procedure and binding it to grid view



To  get this stuff you need to create a Ref Cursor to return recordset.

             create or replace PACKAGE Types AS

            TYPE cursor_type IS REF CURSOR;

            END Types;

Now create a stored procedure to return multiple rows .

           create or replace

           PROCEDURE getAllCity(p_recordset OUT types.cursor_type) AS


           OPEN p_recordset FOR


Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend