Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
64 views
If i comment out the selectvalue portion it works and i am able to ADD NEW Item.
If TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then
            Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
 
            Dim Manufacturers As RadComboBox = CType(editedItem.FindControl("ManufacturerEdit"), RadComboBox)
            ProductsAccess.BindManufacturers(Manufacturers)
            'Dim Manufacturer As Integer = DataBinder.Eval(editedItem.DataItem, "Manufacturer").ToString
            'Manufacturers.SelectedValue = Manufacturer
 
            Dim Categories As RadComboBox = CType(editedItem.FindControl("CategoryEdit"), RadComboBox)
            ProductsAccess.BindCategories(Categories)
            'Dim Category As Integer = DataBinder.Eval(editedItem.DataItem, "Category").ToString
            'Categories.SelectedValue = Category

If i un-comment those lines i am only able to EDIT the items but when i click add new button it does nothing.
If TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then
            Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
 
            Dim Manufacturers As RadComboBox = CType(editedItem.FindControl("ManufacturerEdit"), RadComboBox)
            ProductsAccess.BindManufacturers(Manufacturers)
            Dim Manufacturer As Integer = DataBinder.Eval(editedItem.DataItem, "Manufacturer").ToString
            Manufacturers.SelectedValue = Manufacturer
 
            Dim Categories As RadComboBox = CType(editedItem.FindControl("CategoryEdit"), RadComboBox)
            ProductsAccess.BindCategories(Categories)
            Dim Category As Integer = DataBinder.Eval(editedItem.DataItem, "Category").ToString
            Categories.SelectedValue = Category

ProductsAccess.BindManufacturers(Manufacturers) is a pretty simple Sub that bind combobox to datatable. I even tried with iterating DataRows in the DataTable.Rows collection and populating the combo one by one. The problem persisted :(
THanks
Jugoslav
Top achievements
Rank 1
 answered on 01 Aug 2011
1 answer
79 views
I have a grid inside a JQuery accordian control.  The grid is using the windows7 skin.
Alternate rows in the grid have white borders around vertcal edgaes of cells and bottom edges of cells.
Im assuming something is 'interfering' with the css of the grid.  How can I force the grid to not show these borders ?

Ive attached a screenshot to show whats happening
Pavlina
Telerik team
 answered on 01 Aug 2011
2 answers
219 views
Group,
Not sure there is an easy way to explain this, but basically I have an HTML table containing 4 columns with a bunch of RadTextBox controls.  What I am trying to do is iterate through each row of the HTML table and grab the the value of the RadTextBox based off of the cell index.

Below is a snippet of the code which appears to work for a regular asp textbox but not a radtextbox.  I get the error:
Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'Telerik.Web.UI.RadTextBox'.

foreach (HtmlTableRow row in uc.RecommendationTable.Rows)
{
 var rec1 = (RadTextBox)row.Cells[1].Controls[0];
}

 

i basically want to avoid having to use any find controls or anything because there are like 20 rows of 4 columns.  I want to iterate through each row and give me the value of the control located in each column of the HTML table.

Jon
Top achievements
Rank 1
 answered on 01 Aug 2011
1 answer
59 views
we update the data on the client and then process all changes on the server with a Grid /Client  Edit with single batch update .   
we are using this link  http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx
we have one problem,how to persist focus on grid pager when we update record on  one page ie pager index 1 and move to second page ie pager index  2,when we again go back to previous record ie on page 1 in grid it will go to page 1 but pager index is not updated it still focus on pager index 2. How to persist focus to pager index to previous page .



Jayesh Goyani
Top achievements
Rank 2
 answered on 01 Aug 2011
3 answers
195 views

In the following extracted code, column 'Id' is not visible at all times.  Column 'AE' should be invisible, too.  However, column 'AE' appears in the EditForm despite event ItemDataBound event which sets both columns Visible = False.

How can I hide column AE?


<
telerik:RadGrid ID="rgHeader" runat="server" CellSpacing="0" DataSourceID="sdsHeader">

<MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" DataSourceID="sdsHeader">

<CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordImageUrl="Images/new.png" AddNewRecordText="Add Header"></CommandItemSettings>

<Columns>

<telerik:GridButtonColumn Text="Select" CommandName="Select" UniqueName="Select" ItemStyle-Width="30px"></telerik:GridButtonColumn>

<telerik:GridEditCommandColumn></telerik:GridEditCommandColumn>

<telerik:GridBoundColumn DataField="AE" HeaderText="AE" SortExpression="AE" UniqueName="AE"></telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Total" DataType="System.Int32" HeaderText="Total"

SortExpression="Total" UniqueName="Total">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Id" DataType="System.Int32" HeaderText="Id" ReadOnly="True"

SortExpression="Id" UniqueName="Id">

</telerik:GridBoundColumn>

</Columns>

<EditFormSettings>

<EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>

</EditFormSettings>

</MasterTableView>

<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>

</telerik:RadGrid>


Protected Sub rgHeader_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles rgHeader.ItemDataBound

  rgHeader.MasterTableView.GetColumn(

"Id").Visible = False

  rgHeader.MasterTableView.GetColumn(

"AE").Visible = False

 

End Sub

 

Rick
Top achievements
Rank 1
 answered on 01 Aug 2011
2 answers
81 views
Hi,

We have a standalone Image manager and we are using RadDialogOpener to handle this. After uploading a image if we go to image property the CSS Class dropdown has the styles listed from custom styles. But these styles are displayed as a  regular text instead of applying the styles to have a preview of it in the dropdown. This works fine in image manager inside Editor, only the stand alone image manager styles have issue.  I have populated the style based on this thread
http://www.telerik.com/community/forums/aspnet/editor/raddialogopener-and-stand-alone-image-manager-property-custom-style-and-color-issue.aspx

can some one help to fix this?

Thanks,
Akila.
Akila Kumarasamy
Top achievements
Rank 1
 answered on 01 Aug 2011
5 answers
1.1K+ views
Hi,
i have aone terelik grid having Gridtable view and i want to fetch the value of Grid bound column and on basic of that want to set the navigate URL of Gridhyperlinkcolumn.

please help.

below is the code of grid..how to get the value of column and set navigate url in code behind .
please help.

<

 

telerik:RadGrid runat="server"

 

 

ID="grdActions"

 

 

AllowPaging="false"

 

 

Width="750px"

 

 

AutoGenerateColumns="false"

 

 

Skin="Office2007"

 

 

DataSourceID="TaskActionsDataSource"

 

 

OnPreRender="grdActions_PreRender"

 

 

OnItemCommand="grdActions_ItemCommand"

 

 

OnRowDrop="grdActions_RowDrop"

 

 

OnItemDataBound="grdActions_ItemDataBound"

 

 

 

 

>

 

 

 

<ClientSettings EnableAlternatingItems="true"

 

 

EnableRowHoverStyle="true"

 

 

AllowExpandCollapse="false"

 

 

AllowRowsDragDrop="true"

 

 

>

 

 

<Selecting AllowRowSelect="True" />

 

 

</ClientSettings>

 

 

 

<MasterTableView DataKeyNames="Id" TableLayout="Fixed"

 

 

AllowMultiColumnSorting="false"

 

 

AllowFilteringByColumn="false"

 

 

AlternatingItemStyle-BackColor="#F2F3F5"

 

 

>

 

 

 

<DetailTables>

 

 

 

<telerik:GridTableView HeaderStyle-BackColor="Beige" CommandItemStyle-BackColor="Beige"

 

 

Name="DetailsTable"

 

 

DataSourceID="ActionModuleCollectionDataSource"

 

 

DataKeyNames="Id"

 

 

AutoGenerateColumns="false"

 

 

CommandItemDisplay="Top"

 

 

TableLayout="Fixed"

 

 

HeaderStyle-CssClass="hideGridHeader"

 

 

NoDetailRecordsText="There is no training, meeting or procurement attached to the action above"

 

 

CssClass="detailGridMargin"

 

 

 

>

 

 

<CommandItemTemplate>

 

 

<div style="padding: 5px 5px;">

 

 

<asp:LinkButton ID="btnAddTraining" runat="server" CommandName="AddTraining" Font-Names="Tahoma" Font-Size="11px"><img style="border:0px; width: 25px; height: 17px; vertical-align:middle;" alt="" src="../Images/add_training.png" />Add Training</asp:LinkButton>&nbsp;&nbsp;

 

 

<asp:LinkButton ID="btnAddMeeting" runat="server" CommandName="AddMeeting" Font-Names="Tahoma" Font-Size="11px"><img style="border:0px; width: 25px; height: 17px; vertical-align:middle;" alt="" src="../Images/add_meeting.png" />Add Meeting</asp:LinkButton>&nbsp;&nbsp;

 

 

<asp:LinkButton ID="btnAddProcurement" runat="server" CommandName="AddProcurement" Font-Names="Tahoma" Font-Size="11px"><img style="border:0px; width: 25px; height: 17px; vertical-align:middle;" alt="" src="../Images/add_procurement.png" />Add Procurement</asp:LinkButton>&nbsp;&nbsp;

 

 

</div>

 

 

</CommandItemTemplate>

 

 

 

<ParentTableRelation>

 

 

<telerik:GridRelationFields DetailKeyField="Id" MasterKeyField="Id" />

 

 

</ParentTableRelation>

 

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn UniqueName="ModuleType" DataField="ModuleType" HeaderStyle-Width="100px"></telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridHyperLinkColumn UniqueName="meetingurl"

 

 

DataTextField="Title" DataNavigateUrlFields="Id" DataNavigateUrlFormatString="../Meeting/Meeting.aspx?actionId={0}&ViewMode=ReadOnly"

 

 

>

 

 

</telerik:GridHyperLinkColumn>

 

 

</Columns>

 

 

 

</telerik:GridTableView>

 

 

 

</DetailTables>

 

 

 

<Columns>

 

 

<telerik:GridBoundColumn

 

 

DataField="SortCode"

 

 

Visible="true"

 

 

HeaderText="#"

 

 

HeaderStyle-Width = "30"

 

 

ItemStyle-Font-Bold="true"

 

 

ItemStyle-Font-Names="Tahoma"

 

 

>

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridTemplateColumn UniqueName="TemplateColumn" InitializeTemplatesFirst="false">

 

 

<HeaderTemplate>

 

 

<table id="Table1" cellspacing="0" cellpadding="0" border="0">

 

 

<tr>

 

 

<td colspan="0">

 

 

<b>Action Details</b>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</HeaderTemplate>

 

 

<ItemTemplate>

 

 

 

<table cellpadding="0" cellspacing="0" width="100%">

 

 

 

<tr>

 

 

<td style="border-width: 0px;"><input type="hidden" id="hiddenActionId" value="<%# Eval("Id") %>" /></td>

 

 

</tr>

 

 

 

<tr>

 

 

<td colspan="6" style="width: 200px; font-size: 12px; font-family: Tahoma;">

 

 

<b>Name:&nbsp;</b><%# Eval("Description") %> (<%# Eval("TypeName") %>) <%# Convert.ToBoolean(Eval("Location").Equals("")) ? "" : ":: " + Eval("Location")%>

 

 

</td>

 

 

<td align="right">

 

 

<img src="../images/status_<%# Eval("StatusName")%>.png" alt="<%# Eval("StatusName")%>" />

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td colspan="4" style="width: 250px; font-size: 12px; font-family: Tahoma;">

 

 

<b>Output:&nbsp;</b> <%# Eval("Output") %>

 

 

</td>

 

 

<td rowspan="3" style="width: 50px; font-size: 12px; font-family: Tahoma;" align="center">

 

 

<img src="../images/status_<%# Convert.ToBoolean(Eval("NoBudgetFlag")) ? "nobudget" : "budget" %>.png"

 

 

alt='<%# Convert.ToBoolean(Eval("NoBudgetFlag")) ? "No budget required for this action" : "Budget estimation required for this action" %>' />

 

 

</td>

 

 

 

<td colspan="2" rowspan="3" style="width: auto; font-size: 12px; font-family: Tahoma;" align="center">

 

$ <%

# Eval("TotalEstimationInDollar") %> &nbsp;&nbsp;&nbsp;&nbsp; <%# Eval("TotalEstimationInEuro") %>

 

 

 

<br />

 

<%

if (iViewBudget == 0)

 

{ %>

 

<a href="#" onclick="openRadWindowEstimation('<%# DataBinder.Eval(Container.DataItem, "Id") %>'); return false;" id="linkEstimation" class="smallFont" style="font-size: 9px; font-weight:bold; font-family: Tahoma; color: #0099FF;">[VIEW/MODIFY BUDGET]</a><% } %>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td colspan="4" style="font-size: 12px; font-family: Tahoma;">

 

 

<b>Date:&nbsp;</b> <%# Eval("StartDate") %> <%# Convert.ToBoolean(Eval("CompletionDate").Equals("")) ? "" : " to " + Eval("CompletionDate") %>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td colspan="4" style="font-size: 12px; font-family: Tahoma;">

 

 

<b>Comment:&nbsp;</b> <%# Eval("Comment") %>

 

 

</td>

 

 

</tr>

 

 

 

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

<script language="javascript" type="text/javascript">

 

 

function RefreshFinancialRelatedGrids(RadWindow) {

 

$find(

'<%=this.RadAjaxManager1.ClientID%>').ajaxRequest("Rebind");

 

}

 

function openRadWindowEstimation(actionId) {

 

 

 

// var lnkProbisWindow = document.getElementById("ctl00_messagePanelsContent_contentPlaceHolder_fvTaskDetail_linkEstimation");

 

 

// var hdnViewmodifyBudget = document.getElementById("ctl00_messagePanelsContent_contentPlaceHolder_fvTaskDetail_hdnViewmodifyBudget");

 

 

//

 

 

// if (hdnViewmodifyBudget.value == "1")

 

 

// lnkProbisWindow.enabled = false;

 

 

// else {

 

 

var oWnd = radopen("Task_Estimation.aspx?actionid=" + actionId + "&disableMaster=1", "RadWindowTaskEstimation");

 

oWnd.Center();

 

//}

 

}

 

 

</script>

 

 

</telerik:RadCodeBlock>

 

 

<telerik:RadWindowManager ID="RadWindowManagerTaskEstimation" runat="server" Modal="true">

 

 

<Windows>

 

 

<telerik:RadWindow ID="RadWindowTaskEstimation" runat="server"

 

 

DestroyOnClose="true" Modal="true"

 

 

Skin="Vista" Animation="None" ShowContentDuringLoad="false" VisibleStatusbar="false"

 

 

KeepInScreenBounds="true" Width="1000px" Height="750px" Behavior="Close" />

 

 

</Windows>

 

 

</telerik:RadWindowManager>

 

 

</table>

 

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

Jayesh Goyani
Top achievements
Rank 2
 answered on 01 Aug 2011
8 answers
223 views
Hello,
I have a captcha control on a form with the refresh image link enabled. If the page name is not in the url the refresh image throws an error (listed below) but if the page name is in the url it works fine.
So
http://www.nirvanawebworks.com/company/contact/ throws an error
and
http://www.nirvanawebworks.com/company/contact/default.aspx does not.

Is there a way to make it work without the page name?

Thanks,
Brian

Webpage error details
 
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6.6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 1.1.4322; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Timestamp: Wed, 13 Jul 2011 16:42:09 UTC
 
 
Message: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 405
Line: 6
Char: 84093
Code: 0
URI: http://www.nirvanawebworks.com/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a1f68db6e-ab92-4c56-8744-13e09bf43565%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2011.1.519.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a911e11b9-43a3-4153-a0e1-a8dd325e7573%3a16e4e7cd%3af7645509%3a24ee1bba%3af46195d3%3a1e771326%3aaa288e2d%3ab7778d6c%3a11e117d7%3a7165f74
Brian Goldman
Top achievements
Rank 2
 answered on 01 Aug 2011
1 answer
96 views
Hello,

I am new to Telerik RadGrid.How can I show or hide filtering item based on some conditions?Can you provid any working sample?
Jayesh Goyani
Top achievements
Rank 2
 answered on 01 Aug 2011
16 answers
260 views
Hi,

I'm having an issue with IE9, when I select item it does postback, site changes state accordingly, but cursor keeps blinking in the end in the selected item, if I try to click any postback controls of the page - nothing happens, I click somewhere nearby combobox (not all places help) and it loses focus, then I can click everything as normal, I've attached screenshot

Thx!

<telerik:RadComboBox ID="ddlOwnProjects" runat="server" DataTextField="Name" MarkFirstMatch="true"
                AutoPostBack="true" Width="180px" EnableEmbeddedSkins="false" Skin="DefaultGBT"
                DataValueField="Id" LoadingMessage="<%$ Resources:PGC, General_LoadingText %>"
                EmptyMessage="<%$ Resources:PGC, General_DdlPleaseSelectTitle %>" OnSelectedIndexChanged="ddlOwnProjects_SelectedIndexChanged"
                AppendDataBoundItems="true" Visible="true">
                <Items>
                    <telerik:RadComboBoxItem Text="<%$ Resources:PGC, General_DdlPleaseSelectTitle %>" Value="None" Selected="true" Enabled="false" />
                </Items>
            </telerik:RadComboBox>
Dimitar Terziev
Telerik team
 answered on 01 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?