Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
199 views
I am implimenting the clickability of rows on my radgrid, which I got working, but as soon as I tried to change the color or the highlighted row everything stopped working, so no clue at this point.  What i am trying to do is impliment clicking on a row which will then pull open a panel and hide grid, had this working but I need the row highlighted a brighter color and on mouse out it should go back to my alternating grid colors.

<asp:Panel ID="pnlGrid" runat="server" CssClass="dvGridWrapper">
        <telerik:RadGrid ID="myRadGrid" runat="server" Width="75%" Skin="Web20" CssClass="dvGridWrapper">
               <ClientSettings EnablePostBackOnRowClick="true" Selecting-AllowRowSelect="true" EnableRowHoverStyle="true" >
                   <ClientEvents OnRowMouseOver="GridRowOver_Web20" />
               </ClientSettings>
               <MasterTableView AutoGenerateColumns="false" Font-Size="10" DataKeyNames="RecId">
                   <HeaderStyle ForeColor="White" Font-Bold="true" HorizontalAlign="Center" />
                   <ItemStyle HorizontalAlign="Center"/>
                   <AlternatingItemStyle BackColor="#B0C4DE"  HorizontalAlign="Center" />
                       <Columns>
                           <telerik:GridBoundColumn DataField="LName" HeaderText="LAST NAME" />
                           <telerik:GridBoundColumn DataField="FName" HeaderText="FIRST NAME" />
                           <telerik:GridBoundColumn DataField="Mname" HeaderText="MIDDLE NAME" />
                           <telerik:GridBoundColumn DataField="Recruiter" HeaderText="RECRUITER" />
                           <telerik:GridBoundColumn DataField="dtProcessing" HeaderText="DT PROCESSING" />
                           <telerik:GridBoundColumn DataField="status" HeaderText="ENLISTMENT STATUS" />
                       </Columns>
               </MasterTableView>
           </telerik:RadGrid>
   </asp:Panel>


<style type="text/css">
     
    .GridRowOver_Web20
    {
        background-color: orange !important;
        cursor:pointer;
    } 
 
   </style>

Protected Sub myRadGrid_SelectedIndexChanged(sender As Object, e As EventArgs) Handles myRadGrid.SelectedIndexChanged
       pnlGrid.Visible = False
   End Sub

























Kevin
Top achievements
Rank 1
 answered on 27 Jun 2013
4 answers
182 views

Hello.

I am developing a web application whose pages make use of the RadScheduler component. The interaction with the database relies on a WCF web service, hosted by IIS.

Occasionally, during testing, the following error message is displayed: The server method 'GetAppointments' failed.
Although it rarely happens, I would like to customize the error message in order to display a more user-friendly one.
Is there a way to do it?

Thank you in advance.
Paulo

Gaurav
Top achievements
Rank 1
 answered on 27 Jun 2013
1 answer
71 views
I followed the instructions on this thread
http://www.telerik.com/community/forums/aspnet-ajax/gauge/how-to-use-gauge-inside-the-grid.aspx

But the find control line does not find the control and turns up with nothing.

'here is my aspx

 

<telerik:RadGrid ID="rgCARS" runat="server" ClientSettings-Scrolling-AllowScroll="true" AllowSorting="true" ShowFooter="true"

 

 

OnSortCommand="RadGrid1_SortCommand" AutoGenerateColumns=False height="400px" EnableViewState="true" > <
MasterTableView>

 

 

<Columns >

 

 

<telerik:GridTemplateColumn UniqueName="Progress" AllowFiltering="false" HeaderText="Progress" DataField="Progress">

 

 

<ItemTemplate>

 

 

<telerik:RadRadialGauge ID="RadRadialGauge1" Width="100" Height="100" runat="server" Min="0" Max="100">

 

 

</telerik:RadRadialGauge>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<ClientSettings EnablePostBackOnRowClick="true">

 

 

<Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" AllowResizeToFit="true" />

 

 

<Selecting AllowRowSelect= "true"/>

 

 

</ClientSettings>

 

 

</telerik:RadGrid>

note that I am coding the rest of the columns in the code behind to save viewstate:

 

 

Me.rgCARS.MasterTableView.Columns.Clear()

 

 

Dim column1 As New GridBoundColumn

 

 

 

 

 

Dim column2 As New GridDateTimeColumn

 

 

 

 

 

Dim column3 As New GridBoundColumn

 

 

 

 

 

Dim column4 As New GridBoundColumn

 

 

 

 

 

Dim column5 As New GridBoundColumn

 

 

 

 

 

Dim column6 As New GridNumericColumn

 

 

 

 

 

Dim column7 As New GridBoundColumn

 

 

 

 

 

Dim column8 As New GridBoundColumn

 

 

 

 

 

 

 

 

 

 

 

Me.rgCARS.MasterTableView.Columns.Add(column1)

 

 

Me.rgCARS.MasterTableView.Columns.Add(column2)

 

 

Me.rgCARS.MasterTableView.Columns.Add(column3)

 

 

Me.rgCARS.MasterTableView.Columns.Add(column4)

 

 

Me.rgCARS.MasterTableView.Columns.Add(column5)

 

 

Me.rgCARS.MasterTableView.Columns.Add(column6)

 

 

Me.rgCARS.MasterTableView.Columns.Add(column7)

 

 

Me.rgCARS.MasterTableView.Columns.Add(column8)

 

 

'Me.rgCARS.MasterTableView.Columns.Add(column9)

 

 

 

 

 

'Then set properties

 

 

 

 

column1.DataField =

"Project #"

 

 

 

 

column1.HeaderText =

"Project #"

 

 

 

 

column2.DataField =

"Date Initiated"

 

 

 

 

column2.HeaderText =

"Date Initiated"

 

 

 

 

column2.UniqueName =

"DateInitiated"

 

 

 

 

column3.DataField =

"Title"

 

 

 

 

column3.HeaderText =

"Title"

 

 

 

 

column4.DataField =

"Main Type"

 

 

 

 

column4.HeaderText =

"Main Type"

 

 

 

 

column5.DataField =

"Type"

 

 

 

 

column5.HeaderText =

"Type"

 

 

 

 

column6.DataField =

"Total"

 

 

 

 

column6.HeaderText =

"Total"

 

 

 

 

column7.DataField =

"Waiting on"

 

 

 

 

column7.HeaderText =

"Waiting on"

 

 

 

 

column8.DataField =

"Waiting on 2"

 

 

 

 

column8.HeaderText =

""

 

 

 


'then in my itemdatabound I am trying to set the pointer value

 

 

Private Sub rgCARS_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles rgCARS.ItemDataBound

 

 


 

 

If e.Item.ItemType = GridItemType.Item Or e.Item.ItemType = GridItemType.AlternatingItem Then

 

 

Dim item As GridDataItem = CType(e.Item, GridDataItem)

 

 

Dim currentRow As DataRowView = CType(item.DataItem, DataRowView)

 

 

Dim currValue As Decimal = Decimal.Parse(currentRow.Row("Progress").ToString())

 

 

Dim radialGauge1 As RadRadialGauge = CType(item.FindControl("RadRadialGauge1"), RadRadialGauge)

 

 

Dim value As Integer

 

 

If currValue = 0 Then

 

value = 0

 

Else

 

value = currValue / 2

 

End If

 

 

'RaidalGuage is nothing and throws an error

 

radialGauge1.Pointer.Value =

Math.Ceiling(value)

 

 

 

End If

Any ideas?

 

 

 


Misho
Telerik team
 answered on 27 Jun 2013
1 answer
115 views
Hi,

I'm having a problem with the Rebind() function in VB to clear the search content. Everytime I tried to step through the code, it showed that VB did run through the Rebind() function but returned nothing. Here's my code:

In HTML:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="PickCarrierRG" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</telerik:RadAjaxManager>


In Javascript:

function clearsearchvalues(fromRWyesno)

document.getElementById(
"<%= HiddenTB_SearchPartyID.ClientID %>").value = "0";
document.getElementById("<%= HiddenTB_SearchFree.ClientID %>").value = "0";
 
document.getElementById("<%= HiddenTB_SearchRadius.ClientID %>").value = "0";
document.getElementById("<%= HiddenTB_SearchCityID.ClientID %>").value = "0";
var PickCarrierRSB = $find("<%= PickCarrierRSB.ClientID %>");
PickCarrierRSB.clear();
var CityRCB = $find("<%=CityRCB.ClientID%>");
CityRCB.get_items().clear();
CityRCB.set_value("");
CityRCB.set_text("");

if
( fromRWyesno == "yes" ) {
 
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("rebindPickCarrierRG");
 
}
 
}
 
function onJobRWClose() {

document.getElementById(
"<%= HiddenTB_HistoryID.ClientID %>").value = "0";
clearsearchvalues("yes");
 
}

In VB:

Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest
Dim myArg As String = e.Argument
Dim myAction As String = CustGenClass.f_Split_ByComma(myArg, 1)
Dim my1st As String = CustGenClass.f_Split_ByComma(myArg, 2)
Dim myPartyID As String = Me.HiddenTB_PartyID.Text
If myArg = "rebindPickCarrierRG" Then
PickCarrierRG.Rebind()
End If
End Sub


Like I said, I tried to step through the code thoroughly but couldn't find anything. I'm still learning all this so any help would be greatly appreciated. Thank you!
Maria Ilieva
Telerik team
 answered on 27 Jun 2013
4 answers
253 views
How do I uncheck a checkbox in the header of a template column on the client side from the RowDeselected event? Nothing I try seems to be able to access it correctly.
Shawn
Top achievements
Rank 1
 answered on 27 Jun 2013
3 answers
365 views
Hi there,
I am creating a radgrid dynamically in page load. i have added autogenerated delete column as guided by Princy and is working great. my new issue with that grid is that i am adding two more columns to that radgrid as below(in page load itself).  
Dim updateColumn As New GridButtonColumn()
    radGdItems.MasterTableView.Columns.Add(updateColumn)
            updateColumn.CommandName = "Update"
            updateColumn.Text = "Update"
            updateColumn.UniqueName = "Update"
            updateColumn.Visible = False

boundColumn = New GridBoundColumn()
        radGdItems.MasterTableView.Columns.Add(boundColumn)
        boundColumn.UniqueName = "WarningIcon"
        boundColumn.ItemStyle.Width = Unit.Pixel(25)
        boundColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center
also adding detail table like this
Dim tableViewWarnings As New GridTableView(radGdItems)
            tableViewWarnings.Name = "DetalTable1"
            radGdItems.MasterTableView.DetailTables.Add(tableViewWarnings)
            boundColumn = New GridBoundColumn()
            tableViewWarnings.Columns.Add(boundColumn)
            boundColumn.DataField = "Warning"
and am managing the visibility of these three items in prerender as follows

For Each dataItem As GridDataItem In radGdItems.MasterTableView.Items
                    If condition = true Then
                        radGdItems.AllowMultiRowSelection = True
                        radGdItems.Columns.FindByUniqueName("Update").Visible = True
                        dataItem.Selected = True

                        ExpandColumnVisible = True
                        dataItem("WarningIcon").Visible = True
                        dataItem.Item("WarningIcon").Text = "<img src=""../Images/Warning.gif"" />"
                    Else
                        dataItem("Update").Text = "&nbsp;"
                        Dim cell As TableCell = dataItem.Item("ExpandColumn")
                        cell.Controls().Clear()
                        dataItem("WarningIcon").Text = "&nbsp;"
                    End If
                Next

I mean, these columns (the warning icon column and expand collapse column) are visible based on a condition. 
this grid is in one radtab inside a usercontrol and i have another radtab containing a grid in the parent page. An update in the parent page grid row can set the condition for the column visibility to true. 

Suppose,initially the update column, warningIcon column and detail table is not visible for the rows in the dynamically created grid, and when i update a row in the parent page, the condition is set to true,and this entire code works(i mean control flows through this code) setting those columns visible = true. but the initially hidden columns does not become visible. instead the dataItem.Selected = True line only works. that means, the rows, where actually these columns need to be visible become selected, but columns not visible.

i have applied ajax in the parent page grid as
<telerik:AjaxSetting AjaxControlID="radGdVM">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="radGdVM"  LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="UserControl1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
if i do a complete postback in the page, the columns become visible.
what is wrong with my code and what i need to do to make the columns visible?

Expecting some good advice,

Regards

Veena
Andrey
Telerik team
 answered on 27 Jun 2013
1 answer
86 views
Hi,


I have a master page with an asp:ContentPlaceHolder in which i'm loading several pages all containing radgrids.
In master i;ve declared  
<telerik:RadScriptManager ID="RadScriptManager1" Runat="server" ViewStateMode="Enabled" EnableViewState="true"><br>                </telerik:RadScriptManager>
I managed to isolate the problem.If in master page i'm using any telerik control (for example RadCaptcha), the grids called in content are not inserting or updating.If i remove any telerik control from master, they all behave as expected.
Can you please tell me what am i missing?

Correction : Only with radcaptcha grids behave in the way described above.I tried with datepicker and its working.
Konstantin Dikov
Telerik team
 answered on 27 Jun 2013
2 answers
191 views
Hello,
I am using a RadToolbar Control within a page where almost there is no post back.
One of the features that this page has, is multiple themes.

Now, I need to set the skin of the RadToolbar based on my theme. 
I see that the client side API of the RadToolbar object contains a "get_skin" method which correctly returns the name of the server-side assigned skin name. But the object has no "set_skin" method. 

All I am asking is that whether there is a way to change a toolbar's skin which client side code, or not; and if not, what other ways do you suggest.

Thanks
Maziar
Top achievements
Rank 1
 answered on 27 Jun 2013
3 answers
119 views
Good day,

we could use some help in regards to the subject.
We have a web service which replies clientside to radgrid item selections, and which works as intended.
The problem is that, when we try to use the same function call inside of the OnClientItemClicking we've set for the RadMenu, the function call fails for an unknown reason, simply triggering the OnFailed event of the call.

The call context is the expected one, and we can actually debug the c# function call from the javascript event, and even see that our intended  return = "ok" statement is stepped over, but the OnSuccess event of the web service is never called inside of the OnClientItemClicking.
The same OnSuccess event is instead called regularly when the event fires under the radgrid.

Any idea is appreciated.
archimede
Top achievements
Rank 1
 answered on 27 Jun 2013
2 answers
112 views
We are using AsyncUpload with RadProgressArea. We do allow multiple uploads. Using manual upload as well.

I am trying to display a message when all of the files have been uploaded. On larger files there is a delay when the RadProgressArea hides and the files are actually saved. (We do some further processing.)
Is there an event that shows when all files are uploaded or when the RadProgressArea is hidden?

I tried "OnClientProgressBarUpdating" in RadProgressArea  but it does not fire. I also tried OnClientProgressUpdating on the upload but it fires for each file.

I would like a client side event that says all completed.

Thanks, Marty
moegal
Top achievements
Rank 1
 answered on 27 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?