Find Control In CommandItemTemplate For RadGrid?

Sep 9 10 at 21:51

I'm using RadGrid from Telerik with three LinkButton controls in CommandItem , and i want to hide or show them using switch statement at code behind.

<LinkButton runat="server" ID="approveAllLink" Text="Approve All" >
<LinkButton runat="server" ID="approveLink" Text="Approve" >
<LinkButton runat="server" ID="rejectLink" Text="Reject" >


Find Html Anchor Control In Telerik:radgrid ?

Sep 22 10 at 12:02

how to find html anchor control in telerik:radgrid ?

View 1 Replies View Related

Add An Image To The Control Collection Of The Header Of RadGrid?

Aug 27 10 at 20:19

I would like to add and Image along with the HeaderText in RadGrid. I can able to do this in ItemBound event. But is there any possible ways to do the same in page prerender event?

View 2 Replies View Related

Javascript - Getting ClientID Of Control In RadGrid Edit Form

Aug 16 10 at 13:52

I have Telerik RadGrid with a custom edit form. In my edit form there is a RadDatePicker to which I have added a custom footer template containing a 'Today' button. In the OnClick event of the button I call a Javascript function which takes the control ID to set the selected date. However, because the control is inside the edit form there is no variable created for it and the compiler throws an error when I try getting the client ID. The RadDatePicker is declared with:

<telerik:RadDatePicker ID="ControlName" runat="server" SelectedDate='<%# Bind("Field") %>'>
<Calendar ID="Calendar1" runat="server">
<div style="width: 100%; text-align: center; background-color: Gray;">
<input id="Button1" type="button" value="Today" class="button"
onclick="GoToToday('<%= ControlName.ClientID %>')" />

The error I get is CS0103: The name 'ControlName' does not exist in the current context on the line referencing the ClientID. Is there another way in which to get the ID to pass to the Javascript function?

View 3 Replies View Related

Web Forms :: Find Control In LoginView / Find The Controls In Code Behind?

Mar 08, 2011 08:11 AM

I want to change the text of the user name text box which is inside a log in view on selected index chaged event of a drop down list.

this is my code:


but both ddl and tb are null

Anyone knows how can I find the controls in code behind?

View 1 Replies View Related

AJAX :: Control Canot Be Created Because Visual Studio Cannot Find The Control's Type In The Control?

Apr 15, 2010 02:03 PM

i have problem in using ajax control , till morning it everything was file , now when i add any new ajax control it shows the error Control canot be created because visual studio cannot find the control's type in the control assembly then if i press OK it says The operation could not be completed . invalid FORMATETC structure

View 5 Replies View Related

Web Forms :: Find A Control Inside Nested Master Page And Another Control Container?

Dec 01, 2010 03:31 PM

I'm trying to find a TextBox in the code-behind page, it's inside a nested master page and also then inside another control container (it's inside ctrlCheckoutShippingAddress also) .

I've tried this:



View 2 Replies View Related

Web Forms :: How To Find Textbox Control Inside DetailsView Control Using Javascript

Mar 23, 2010 03:00 PM

how to find Textbox Control inside DetailsView Control Using Javascript, I tried below but gives an error OBject reference not found


View 3 Replies View Related

AJAX :: Reorderlist Control Item Template Dropdownlist Control Id Can't Find?

Nov 05, 2009 07:44 PM

I got a QQ on AJAX Reorderlist Itemtemplate. I am using two reorderlist controls with in a page. Reorderlis1 contains pending records. I just load the pending records. the records can be moved from Reorderlist 1 to Reordrlist 2 with add button. In this table I am not doing reordering .

Reorderlist2 contains Queued records. In this I will do the reordering, the records which are there in Reorderlist 2 , transfer the records into the tasktable. In this table I have the cancel button also. If user don't want to update some records they can moved back those records from Recorder list 2 to Recorderlist 1. I am done with this part.

My 1st QQ:

Now I added Dropdownlist control to the Reorderlist 1 Item tamplate. Item template dropddownlist is my user control.My dropdown list contains the list of years. So I am calling my Usercontrol method with the Itrmtamplate dropdownlist ID. Here I got below error. 'ddlbeginyod1' is my Reorderlist Item template dropdownlist ID Text. Why?

Error:The name 'ddlbeginyod1' does not exist in the current context.

I tried adding the dropdownlist in insertitem template also. There also I got the same issue.

I never worked with Ajax Reorderlist control. I am very confused with this control.

I can add Dropdown list to the Reordrlist Itemtamplate right ? I

f I can add the dropdownlist into the item template I have 2nd QQ?

- If I can load the dropdownlist. For each row I will be having the year dropdownlist right. When user selects first row and moved from the reorderlist1 to reorderlist 2 with add button. he has to select the year of that row.

I need to send year value by each row to task table. Can I do that with reorderlist item template.How can I store the year value.If so, how can I do that? Please any one know the answer ,

I am coying my Reorderlist1 Code below,


View 2 Replies View Related

Forms Data Controls :: Testing A Control For A Null Value In Gridview - Find Control Problems?

Nov 24, 2009 11:24 PM

I have a gridview containing template columns that have databound labels in them. I would like to check if one of the labels has a null value returned from the database, and if it has I would like to hide a different label in the row. (So in basic terms: If, in this row, Label A is Null Then Label B isn't visible.)

However, I can't find the controls in the gridview row to check the value as I would like. (I get object not set error). I'm using VB.

View 2 Replies View Related

Forms Data Controls :: How To Find Control Problem In Gridview While Adding Checkbox Control Dynamically

Mar 15, 2010 12:02 PM

i have a gridview control i added checkbox contrl dynamically but i am not getiing the reference of checkbox in button clilck event here is my code Gridvew


.vb code


View 6 Replies View Related

Web Forms :: How To Find Control Inside User Control From Page

Nov 10, 2010 09:36 AM

I have on dropdown that show hide user control. In the user control i have Ok and Cancel button.

When the dropdown change i want to apply ValidationGroup on the Ok button that is inside UserControl.

View 2 Replies View Related

Forms Data Controls :: How To Control Validation Does Not Find Control

Dec 08, 2009 08:14 AM

Still can't find the control

Unable to find control id 'ctl00$ContentPlaceHolder1$GridView2$ctl02$TextBox1' referenced by the 'ControlToValidate' property of 'CustomValidator1'.

protected void GridView2_RowDataBound(object sender, GridViewRowEventArgs e)

if (e.Row.RowType == DataControlRowType.DataRow)
if (e.Row.RowState == DataControlRowState.Edit)
TextBox txtBox = (TextBox)e.Row.FindControl("TextBox1");
CustomValidator customValidator = new CustomValidator();
customValidator.ID = "CustomValidator1";
//customValidator.ControlToValidate = txtBox.ClientID;
customValidator.ControlToValidate = txtBox.UniqueID;
customValidator.ErrorMessage = "Please enter some text";
customValidator.SetFocusOnError = true;
customValidator.ValidateEmptyText = true;
customValidator.ClientValidationFunction = "jsFn-Textbox1";

//// as you can see Textbox1 does exist

<asp:GridView ID="GridView2" runat="server" AllowSorting="True" AutoGenerateColumns="False"
CellPadding="4" DataSourceID="SqlDataSource4" ForeColor="#333333" GridLines="None"
Style="position: static" DataKeyNames="AutoItemDetailsRef,FKAutoOrderRef" Font-Names="Arial"
Font-Size="Small" OnRowDataBound="GridView2_RowDataBound">
<RowStyle BackColor="#EFF3FB" />
<asp:CommandField ShowEditButton="True" />
<asp:BoundField DataField="col_ItemRef" HeaderText="Item Ref" SortExpression="col_ItemRef" />
<asp:BoundField DataField="col_ItemDescription" HeaderText="Description" SortExpression="col_ItemDescription" />
<asp:TemplateField HeaderText="Item Price" SortExpression="col_ItemPrice">
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("col_ItemPrice") %>'></asp:TextBox>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("col_ItemPrice", "{0:c}") %>'></asp:Label>
<asp:TemplateField HeaderText="Quantity" SortExpression="col_ItemQuantity">
<asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("col_ItemQuantity") %>'></asp:TextBox>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("col_ItemQuantity", "{0:f2}") %>'></asp:Label>

View 5 Replies View Related

Web Forms :: How To Find Control For A GridView Inside Panel Control

Apr 23, 2010 12:26 PM

I am developing a asp database that is linked with SQL Database. When I am tryind to Find Control (GridView2) inside of another control (Panel2) that sits in Item Template for DetailsView, I got an error message:

Object reference not set to an instance of an object.
<asp:DetailsView ID="DetailsView1" HeaderText="Details" HeaderStyle-CssClass="labelheadRight" runat="server" AutoGenerateRows="False" DataKeyNames="pk_BackupDriveSerial"
DataSourceID="SqlDataSource1" GridLines="None"
CssClass="Detailsview" AllowPaging="True"
<asp:BoundField DataField="pk_BackupDriveSerial" ControlStyle-CssClass="dropdownsize"
HeaderText="Serial No" ReadOnly="True"
SortExpression="pk_BackupDriveSerial" >
<ControlStyle CssClass="dropdownsize"></ControlStyle>
<asp:BoundField DataField="BackupDriveMake" HeaderText="Make" ControlStyle-CssClass="dropdownsize"
SortExpression="BackupDriveMake" >
<ControlStyle CssClass="dropdownsize"></ControlStyle>
<asp:BoundField DataField="BackupDriveModel" HeaderText="Model" ControlStyle-CssClass="dropdownsize"
SortExpression="BackupDriveModel" >
<ControlStyle CssClass="dropdownsize"></ControlStyle>
<asp:TemplateField HeaderText="Type" SortExpression="fkid_BackupDriveTypes" ControlStyle-CssClass="dropdownsize"
<asp:Label ID="Label6" runat="server" Text='<%# Bind("BackupDriveMake") %>' Width="145px"></asp:Label>
<br />
<asp:TextBox CssClass="dropdownsize" AutoPostBack="true" ID="DropDownList5" runat="server" Text='<%# Bind("BackupDriveModel") %>' ></asp:TextBox>
<br />
<asp:Panel ID="Panel2" runat="server" CssClass="dropdownpanel" >
<asp:GridView CssClass="dropdowngrid" ID="GridView2" runat="server" AutoGenerateColumns="False"
CellPadding="4" DataKeyNames="pkid_BackupDriveTypes" SelectedValue='<%# Bind("fkid_BackupDriveTypes") %>'
DataSourceID="SqlDataSource3" ForeColor="#333333" GridLines="None" OnSelectedIndexChanged="GridView2_OnChange">
<RowStyle BackColor="#EFF3FB" />
<asp:BoundField DataField="pkid_BackupDriveTypes"
HeaderText="pkid_BackupDriveTypes" InsertVisible="False" ReadOnly="True"
SortExpression="pkid_BackupDriveTypes" Visible="False" />
<asp:BoundField DataField="BackupDriveMake" HeaderText="Make"
SortExpression="Make" />
<asp:BoundField DataField="BackupDriveModel" HeaderText="Model"
SortExpression="Model" />
<asp:CommandField ShowSelectButton="True" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<AlternatingRowStyle BackColor="White" />
<asp:DropDownExtender ID="DropDownExtender2" runat="server" DropDownControlID="Panel2" TargetControlID="DropDownList5">


I also tried


View 5 Replies View Related

Security :: How To Find Control Inside Login View Control

Nov 17, 2010 06:54 AM

may i know how to find control inside Login View Control

i m usng following way

HyperLink lnktest = (HyperLink)loginView.FindControl("test");

but its giving me error that lnktest is null i.e object reference is not set to instance of object

View 3 Replies View Related

AJAX :: How To Find A Control Which Is Specific To The User Control

Dec 01, 2009 03:32 PM

I have created a user control where i implemented "ModalPopupExtender",which works fine when implement statically(drag and drop control on page).But am calling user control dynamically(Codebehind) and my page can have multiple instances of same user control.My question is how to find a control which is specific to the user control.

View 2 Replies View Related

C# - Add A RadGrid To A NestedViewTemplate?

Nov 17 10 at 14:10

I am currently using Visual Studio 2008 to develop a hierarchical grid that displays records, its got 3 levels. The code looks roughly like this.

<telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0" RenderSelectedPageOnly="false">
<telerik:RadPageView ID="RadPageView1" runat="server">
<telerik:RadGrid ID="radGrd1">


I have ommited all the code and just provided the skeleton.

The problem i am having is that when i add the Radgrid, the intellisense does not seem to pick it up and visual studio does not add it to the designer class either.

I have tried viewing it in design view and forcing it to sync and even manually added it to the designer class myself. These solutions have not solved my problem as although the intellisense does pick up the control after adding it manually, the control itself is set to null during run time.

So basically is it possible to add a rad grid in the first place and if so what am i doing wrong.

View 1 Replies View Related

Unable To Find Control In Repeater Control?

Aug 23 10 at 17:52

This has got me stumped. I am trying to find a checkbox in a dynamically loaded Repeater template. The template works fine and the databinding is fine and everything displays fine but I can't find the control!

This is the repeater code (I have a similar one for the alternate template with a different style):


View 4 Replies View Related

Find Control Inside The DataList Control?

Jan 7 at 16:50

how i can find a DataList which is inside the DataList control? Its giving the Error Object not set to an Instance. i am finding the control this way :

DataList dl =((DataList) (DataList1.FindControl("DataList2")));

View 2 Replies View Related

C# - Find A Control Or Page A Control Is Embedded In?

Jan 9 at 0:22

I've written a web user control which I want to be able to drop into the markup for either aspx pages or other web user controls.I need my user control to be able to easily and efficiently work out if its inside another user control or an aspx page. My initial idea is to do it recursively with checks on the Parent property - continue looking up the nesting hierarchy until I find either a web form or a user control - but I'm not sure this the best way of going about this.

View 3 Replies View Related

Alternative To Telerik RadGrid?

Jan 14 at 15:46

Is anyone able to offer any decent alternatives to the telerik ASP.Net controls.

I'm in the market for a decent grid control with all singing all dancing extensions... bt I'm finding the telerik grid really hard work to deal with.

The telerik controls do look good, but after a day of hard work with them I'm just looking to see if there are any other 3rd party offerings?

View 3 Replies View Related

Telerik RadGrid - How To Add A New Row From Code Behind

Feb 5 10 at 17:50

What's the simplest way to add a new row to a Telerik RadGrid in ASP.NET from code behind?

View 2 Replies View Related

Only Allow One Edit Or Insert In A RadGrid?

Jul 22 10 at 17:30

I'm using the Telerik rad grid and I'm allow the user to enter data directly to the grid.

I am using the "EditForms" edit mode and I also allow inserts using the same.

If the user edits a row, then I don't want to allow any other edits or inserts until the current one is complete or cancelled.

View 1 Replies View Related

C# - Use OnMouseOver To Select A Radgrid Row?

Jun 9 10 at 22:38

I am currently highlighting a row in a radgrid using OnMouseOver. I would like to know if it is possible to use OnMouseOver to select the row rather than highlight it.

Alternatively, I would like the highlighted row to remain highlighted if the radgrid loses focus, such as when a confirmation box pops up.

View 2 Replies View Related

C# - Filtering On RadGrid Not Working?

Jan 15 10 at 4:51

I created a RadGrid with a couple of fields for filtering and I can't seem to get the filtering to work. I can see it clearly posting back (the ajax spinny circle thing) after typing something in the filter box, however my results are always the same. I am using the following definition in the aspx file:

<telerik:RadGrid PageSize="4" ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" OnNeedDataSource="RadGrid1_NeedDataSource"
OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged" Skin="Black" ShowFooter="True"
ShowStatusBar="True" AllowFilteringByColumn="True"


View 2 Replies View Related

How To Display Data Using Radgrid Getting Error

Jun 11 10 at 20:36

When I am trying to display data using radgrid I am getting error like "Index was out of range. Must be non-negative and less than the size of the collection. Parameter: Index".

Here is my code


View 1 Replies View Related

Forms Data Controls :: Can't Get A Value From A RadGrid

Aug 23, 2010 09:31 PM

All I want to do, is to get a values from a grid when it is not in edit mode. Note that I'm able to get two of the values (both the int32 fields), but I cannot get a reference to the "IsActive" Checkbox or the string "Delimiter" field.

let me know how I can accomplish this. Below is my code-behind. Notice the boldfaced fields I can't get...


View 2 Replies View Related

C# - Any Pointers To How To Use Telerik RADGrid In C Sharp

Mar 24 at 13:26

give me any pointers for free tutorial on RADGRID or give me a simple example on how to create a RADGRID and bind it to data source.

View 2 Replies View Related

Finding Values In A Telerik Radgrid?

Nov 26 10 at 21:54

I've tried to find the answer, but am not having any luck and am wasting to much time trying to figure it out. Using RadGrid from Telerik, latest version of their Ajax Controls, I've added a Select to each row, and can't figure out how to get the value of the selected row. Prefer to get the value of the ID column (from ID field in my database) or other specific columns. C# or VB example will work, VB preferred.

View 2 Replies View Related

Iterate Over Rows/checkboxes In A RadGrid

Apr 5 10 at 23:21

I have a Telerik RadGrid with a GridTemplateColumn that contains a checkbox, as follows:

<telerik:GridTemplateColumn HeaderText="MINE" UniqueName="MyTemplateColumn">
<asp:CheckBox id="MyCheckBox" runat="server"></asp:CheckBox>

I want to set the box to be "checked" based on a value read from the database. I could handle the ItemDataBound event and read the database when each row is bound, but that results in n lookups. Instead, I want to handle DataBound, and then set all the values at once. So, in that method, I want code like this:


View 2 Replies View Related

Pass Record Id Into Hyperlink In Radgrid?

Feb 22 at 8:14

I've a radgrid and rendering a hyperlink column. I want to pass the id of the record into the url for the hyperlink. How can I do this?

I have this

<telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Edit" UniqueName="Edit">
<asp:HyperLink ID="HyperLink1" runat="server" Target="_blank" NavigateUrl="~/Edit.aspx?Id=need_to_bind_id_here">Edit Details</asp:HyperLink>

There is an ID column which is generated too.

View 1 Replies View Related

Insert Item Button From Within A Radgrid Row?

Mar 30 at 18:52

I want to take an already existing row in a RadGrid and instead of open an edit template I want to open the Insert template with that data.

I have a requirement to allow the user to make edits to the rows on their "key" values, the result being a new row that they didnt have to type everything over again.

My guess is to put an insert button on the row, but I'm not sure how to open the insert template and still have it bind that rows data to it.

View 1 Replies View Related

C# - Truncate Text In RadGrid Column?

Jan 19 10 at 15:21

using Telerik RadGrid* in a LINQ context, with ASP.NET/C#, how to truncate text to a maximum length when displaying in columns? By maximum, I mean if original string's length is shorter than the specified maximum length, no errors will raise.I have seen many examples of this on the net, but it seems that the Container.DataItem used to achieve this is different when using LINQ. Sometimes we see DataItem as a method, sometimes not. Examples are usually using a DataSet.Here's an example found (source) :

<asp:TemplateField HeaderText="Description">
<%# ValidateString(Container.DataItem("Description")) %>


View 2 Replies View Related

Radgrid Edit / Update Not Working?

Oct 26 10 at 23:48

I'm having a wired problem with Radgrid.. Im using a Radgrid to display some results where the user can edit/update/delete them. I'm using a single SQL Server 2000 table to fetch the results... Not sure why the events are not firing in radgrid. But I am able to do it successfully using the Gridview control... Im using .NET framework 4

Radgrid code

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" AutoGenerateDeleteColumn="True"
AutoGenerateEditColumn="True" DataSourceID="SSDS" GridLines="None" Width="844px"

View 1 Replies View Related

Forms Data Controls :: How To Print RadGrid

Apr 19, 2010 05:11 PM

I have a RadGrid on my UserControl which i wanted to print. I dont know how to print it.

View 2 Replies View Related

How To Refresh Telerik:radgrid Contorl Using Javascript

Oct 5 10 at 12:00

How to refresh Telerik:radgrid contorl using Javascript ?

View 2 Replies View Related

How To Remove Filter Button On Telerik RadGrid

Jan 14 at 7:38

I'm really new to and Telerik...

I have a RadGrid with filtering. I set AutoPostBackOnFilter="true" and CurrentFilterFunction="Contains" on my columns. Ok it works fine, user don't have to open drop-down list to select type of filter. But now, I want to hide filter buttons.

View 1 Replies View Related

C# - Add Textbox To Telerik Radgrid Confirmation Dialog?

Dec 3 10 at 19:06

I need to collect additional information from the user when they initiate a delete on a radgrid. Right now I am presenting the user with a confirmation dialog box that lets them click "OK" to continue but I need to add an additional textbox to collect a reason.

View 1 Replies View Related

How To Change The Radgrid Case Sensitiveness Using Webconfig

Jun 7 10 at 12:33

since Grid filter is case sensitive , i used the code below RadGrid1.GroupingSettings.CaseSensitive = false;
Can weconfigure the same thing webconfig so that in the whole project case sensitiveness of radfilter will be false.

View 1 Replies View Related

C# - Telerik RadGrid - How To Set The MaxLength For The Insert Textbox

Jul 23 10 at 12:15

I have a radGrid on the page with the "Add New Record" button. When I click the "Add New Record" button, a textbox appears above each column that allows me to enter values. I want to limit the number of characters that can be entered in the textbox. How do I set the MaxLength of those textboxes

View 1 Replies View Related

Copyrights 2005-14, All rights reserved