Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
76 views

hello,
we are using q3 2009 version with the hotfix.
the last item in the menu has sub items but somehow the user gets this error while mouseovering the item and waiting for the subitems to appear.
if i move the last item to another location in the menu,the error does not appear.

if the last item in the menu does not have sub items,the error does not appear.

regards

Peter
Telerik team
 answered on 23 Feb 2010
4 answers
778 views

Hi,
I use the following code to retrieve data from RadGrid's cells:

Dim i as integer = 1  
Dim CellValue as New String 
CellValue = RadGrid1.MasterTableView.Items(i).Item("ColumnUniqueName").Text 

It works well as long as the column type is GridBoundColumn.  But, when convert the column to GridTemplateColumn the above code returns blank value.
How can I retrieve data from a RadGrid when the RadGrid's column is a GridTemplateColumn?

Thanks,
Al

Princy
Top achievements
Rank 2
 answered on 23 Feb 2010
3 answers
83 views
Hi I am programatically binding a list to a radgrid. It works fine if I use GridBoundColumn controls ertc.. but when I want to add my own formatting I do it like this:
<telerik:RadGrid  ShowGroupPanel="true" AllowPaging="true" PageSize="10" AutoGenerateColumns="false" Width="700" ID="RadGrid1" runat="server"> 
 
<MasterTableView TableLayout="Fixed" > 
       
     <ItemTemplate> 
      
      
       <%# Eval("Subject")  %> 
       <%# Eval("PostDate")%> 
       <%# Eval("Body")%> 
       <%# Eval("TotalViews")%> 
    
       
      
      
     </ItemTemplate> 
       
   
     
      </MasterTableView> 
 
 
</telerik:RadGrid> 
It tells me there are no records to display - I know there are records there as I can see them when I step into my code. Why does the above not display my records?
Thanks
Princy
Top achievements
Rank 2
 answered on 23 Feb 2010
1 answer
107 views
Hello,

Could you please take a look at it for this pic.
http://i47.tinypic.com/5by4b6.jpg
If i remove minimized , looks fine but start from minimized to refresh/pin ,, any addational adding looks like that one.
Please any idea.

regards,
Georgi Tunev
Telerik team
 answered on 23 Feb 2010
1 answer
103 views
I am wanting to do something like the following but not really sure how.
<mastertableview>
<columns>
column 1
column 2
column 3
</columns>
</mastertableview>

i like the formating of the above but i have one column that has a whole bunch of text so I would like to create a second row and have it span all columns
<mastertableview>
    <row>
        <columns>
            column 1
            column 2
            column 3
        </columns>
    </row>
    <row>
        <columns>
            long column
        </columns>
    </row>
</mastertableview>

how can something like this be done and still keep the column headers from the first set of columns and not have to stick it all in a template column
Princy
Top achievements
Rank 2
 answered on 23 Feb 2010
1 answer
76 views
I want to check if the grid is in editmode on the client side.  I want to be able to prompt a message asking the user to save the changes on the grid before hitting the save button on the form.




Princy
Top achievements
Rank 2
 answered on 23 Feb 2010
2 answers
91 views
Dear Telerik Team,

I am using a RadScheduler control in a RadTabStrip of a user control which is po pout from a RadGrid when clicking New/Edit button in RadGrid. But the RadScheduler control is unable to show it's styles. I am attaching an image of scheduler which exactly showing in tab-strip. Can you please give me a reply as soon as possible.
Pandu
Top achievements
Rank 2
 answered on 23 Feb 2010
3 answers
104 views
Hi all

I have 2 grids on my page, grid1 and grid2. I have a row delete button in grid1. When I click on this delete button I delete the row in grid1 and in my stored proc I also delete any associated data in another table which is grid2.

I am calling the delete button in code behind from the _ItemCommand event of grid1.

 

Protected Sub rgListingWithImages_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgListingWithImages.ItemCommand

 

 

'1. Check which alpha character was selected and then rebind the data to the grid

 

 

'2. Redirect to another page when SalesID, Email, Notes or PwdReset is selected

 

 

Dim value As String = Nothing

 

 

Select Case e.CommandName

 

 

Case ("DeleteRow")

 

 

Dim myItem As GridDataItem = DirectCast(e.Item, GridDataItem)

 

 

Dim CustID As TableCell = myItem("CustomerID")

 

 

Dim OrdID As TableCell = myItem("OrderID")

 

 

Dim ListNo As TableCell = myItem("BusinessListingNumber")

 

 

'Delete specific listing row with slides WS = with slides

 

 

Dim BusList As New BusinessListingsPlanAndPricing

 

BusList.DeleteOneRowInBusinessListings(CustID.Text, OrdID.Text,

CInt(ListNo.Text), "WS")

 

 

'Display listings

 

LoadListingsGridWithSlides()

 

'Price

 

CalculateBusinessCostAndDisplay()

LoadSlidesGrid()

 

Exit Select

 

 

Case ("Select")

 

 

 

Exit Select

 

 

End Select

 

 

End Sub

 



Heres my issue: The data is deleted from the database but grid2 is still displaying the data. I have call a subroutine to refresh the grid datasource but this does not work. It only clears when I click on a delete button in grid2.

How do I call the delete event in grid2 from grid1 to refresh grid2?

many thanks
Chom
Top achievements
Rank 1
 answered on 22 Feb 2010
4 answers
208 views
Hi,

I've come across a few issues when using client-side sorting. I'm managing to work around them all, but just wanted to highlight them, as it would have been ideal if it "just worked like it does server-side" (although perhaps wishful thinking!). I'm working with a grid that has already been in use using server-side binding/sorting, and the query behind the datasource is not 'simple', so for lots of the columns we were using the SortExpression property of columns in markup to get around the fact that it wasn't correct to sort by simply the bound field.
Examples:
-Datafield "ID"; SortExpression "Table.ID" (because of many joins in the actual query)
-DataField "NTextField"; SortExpression "cast(NTextField as nvarchar(3999))" (can't order by an ntext field)
-DataField "Sum"; SortExpression "isnull(number1,0) + isnull(number2,0)"

The issues I've noticed are:
1. The client-side javascript for sorting seems to assume the first space in a sort expression follows a single fieldname to sort on, and that directly afterwards you get the direction if one is present. This isn't the case with some of our sort expressions.
2. It assumes that the fieldname (or maybe it's the columnname) is the same as the first part of the expression up to the space (similar to point 1) which means that when it looks for the sorting buttons it doesn't find them correctly. So using my first example the button might have an id of "gridID__ID__sortAsc" but the sorting functionality looks for "gridID__Table.ID__sortAsc".
3. If there are single quotes in the sort expression (used by sql to indicate strings) then you get javascript errors when the grid first loads, and clicking on the header to sort will cause a postback as it doesn't then call the oncommand event which would normally cancel it in my scenario. Escaping the single quotes (\') did fix the load errors, but then the sortexpression that gets passed to the select is wrong.
4. AllowNaturalSort setting server-side does not carry over to client-side and there doesn't appear to be an equivalent available to set.
5. '+' seems to get removed from the expression altogether (e.g. you might have a field returned that is the sum of 2 underlying numbers).

It would also perhaps be nice to have an OnSort event available?

I've worked around these by removing all our sort expressions from the grid markup and then in the select method swapping out the datafields for the desired sort expression, and hooking into the client-side oncommand event as follows to mimic allownaturalsorting (using telerik RadGridScripts.js as a basis):

    switch (args.get_commandName()) { 
        case 'Sort': // this is to replicate 'allownaturalsorting=false' 
            if (sender.get_masterTableView().get_sortExpressions().toString() == '' && args.get_commandArgument() != '') { 
                var exp = new Telerik.Web.UI.GridSortExpression(); 
                exp.set_sortOrder(Telerik.Web.UI.GridSortOrder.Ascending); 
                exp.set_fieldName(args.get_commandArgument()); 
                var id1 = String.format("{0}__{1}__SortAsc", sender.get_masterTableView().get_id(), args.get_commandArgument()); 
                var id2 = String.format("{0}__{1}__SortDesc", sender.get_masterTableView().get_id(), args.get_commandArgument()); 
                if ($get(id1)) { $get(id1).style.display = ""; } 
                if ($get(id2)) { $get(id2).style.display = "none"; } 
                sender.get_masterTableView().get_sortExpressions().add(exp); 
            } 
            break; 
    } 
    bindSearchData(sender); 

Of course, I may just be using it in an unexpected way.

Kind regards,

Zoë

Sameer Alibhai
Top achievements
Rank 1
 answered on 22 Feb 2010
9 answers
185 views
I've been working with RadControls for about 6 months now using VB.NET.  I just started a new project and decided to use C# because I'm an old Java programmer and I miss it.  My issue is that the event handlers (e.g., [radcontrol1]_Load()) are not firing in the code-behind.  The only examples I've seen from Telerik put everything in the Page_Load(), which is very lazy programming. Can someone clue me in?  Is there a different syntax for event handling in C# than in VB (besides the obvious brackets, semicolons, case-sensitivity, etc.)?

Thanks,
Mark
Mark Galbreath
Top achievements
Rank 2
 answered on 22 Feb 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?