Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
84 views
I have gridview that i programatically bind to a data-table. one of my column is an hyperlink column that is manually set to show the text "Update" on each row.
I created the following code in the page load event to disable the hyperlink for the appropriate columns:

'Carry out steps to figure if a each report is invoiced or not.

 

'If invoiced, the update hyperlink is disabled

 

 

Dim number_of_reports As Integer = RadGrid1.Items.Count

 

 

For i = 0 To number_of_reports - 1

 

 

If RadGrid1.Items(i)("status_column").Text = "Not Invoice" Then

 

RadGrid1.Items(i)(

"update_column").Enabled = False

 

RadGrid1.Items(i)(

"update_column").Text = "No"

 

 

End If

 

 

Next

 


At the page load event the code is handled well. But when i change pages, a postback occurs and the hyperlinks are all reset to the text "update".

I tried putting the code in the radgrid1.page_index_change event but it still does not work.
Arnaud
Top achievements
Rank 1
 answered on 07 Dec 2010
2 answers
97 views
I want to have a button such that user clicks to delete, then they button changes to some sort of confirmation (click again to delete or something)...then when they click that the second time, postback happens.

Can the RadButton do something like this?
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 07 Dec 2010
3 answers
256 views
Hi,

I am using RadChart as user control and need to use the control to load different Chart Types.I am able to load the Chart Types but unable to display them as loaded.

<telerik:RadChart ID="rcTrendGraph" runat="server"></telerik:RadChart>

this is my aspx page and in the code behind I am using the following code to Build the Graph.

for (int i = 0; i < strContentIds.Length; i++){
strDashContId = strContentIds[i].ToString();
if (strDashContId == "TGI1002"){
//Bar Graph
rcTrendGraph.ChartTitle.TextBlock.Text = "Bar Graph";
rcTrendGraph.ChartTitle.Appearance.Position.AlignedPosition=Telerik.Charting.Styles.AlignedPositions.Top;
rcTrendGraph.AddChartSeries(legend);
legend.Type = Telerik.Charting.ChartSeriesType.Bar;
rcTrendGraph.DataSource =ds;
rcTrendGraph.DataBind();
}
else if (strDashContId == "TGI1003"){
//Pie Graph
rcTrendGraph.ChartTitle.TextBlock.Text = "Pie Graph";
rcTrendGraph.ChartTitle.Appearance.Position.AlignedPosition=Telerik.Charting.Styles.AlignedPositions.Top;
rcTrendGraph.AddChartSeries(legend);
legend.Type = Telerik.Charting.ChartSeriesType.Pie;
legend.AddItem(10,"A");
legend.AddItem(20,"B");
legend.AddItem(30,"C");
legend.AddItem(40,"D");
}
else if (strDashContId == "TGI1001")
{//Line Graph
rcTrendGraph.ChartTitle.TextBlock.Text = "Line Graph";
rcTrendGraph.ChartTitle.Appearance.Position.AlignedPosition=Telerik.Charting.Styles.AlignedPositions.Top;
rcTrendGraph.AddChartSeries(legend);
legend.Type = Telerik.Charting.ChartSeriesType.Line;
legend.AddItem(10,"A");
legend.AddItem(20,"B");
legend.AddItem(30,"C");
legend.AddItem(40,"D");
}
}

I am able to get the chart generated but getting the same chart type at the end..
For Suppose strContentIds.Length=2
and for i=0 strDashContId =TGI1001
and for i=1 strDashContId =TGI1003
I need the chart as pie Graph and Line Graph to be displayed in my page.But I am able to dispaly only one of the chart type i.e, for strDashContId =TGI1003 and strDashContId =TGI1001 I am getting Pie as strContentIds[1]=TGI1003  after strDashContId =TGI1001 and getting both the charts as Pie Charts only.

Please help me out with your suggestions.

Thanks In Advance,
h@r!
Ves
Telerik team
 answered on 07 Dec 2010
2 answers
71 views
Sorry if I've missed something obvious, but this seems like it should be very simple. I just want to have an image button that executes some javascript when I click it.

function FBLogin(sender, args) {
    FB.login(fb_loggedin, { perms: 'email,publish_stream,offline_access' });
}

<telerik:RadButton ID="RadButton1" runat="server" Text="Login" Height="55px" Width="225px" AutoPostBack="false" OnClientClicked="FBLogin">
        <Image ImageUrl="~/Images/fb_btn.png" />
</telerik:RadButton>

Absolutely nothing happens when I click the button. If I make the image a "background" image and add some text then it works, but only if I click on the text. As you can see the button is quite large and the user should be able to click anywhere on the button, not just on the text. Also, I really don't want text (the image already has the text on it).
Scott R
Top achievements
Rank 1
 answered on 07 Dec 2010
1 answer
100 views
Hello All,

           I have RadContexMenu on page which will bind dynamically, all things well, but i have problem with design while expanding drop down menu,

expanded node not come to the exact on line to My RadContextMenu header, as simple in our MSword when user click on file than menu will get drop down vertically parallel to File Menu...in my case my expanded menu will get display around 15px right side from My Main Tag.

<telerik:RadContextMenu ID="Menu" runat="server" Flow="Vertical" OnItemClick="Menu_ItemClick"
                            Skin="Office2007">
                            <Items>
                                <telerik:RadMenuItem DisabledImageUrl="DImages1.png"
                                    ImageUrl="EImages1.png" Text="SubMenu1" Value="SubMenu1">
                                </telerik:RadMenuItem>
                                
                                <telerik:RadMenuItem DisabledImageUrl="DImages2.png"
                                    ImageUrl="EImages2.png" Text="SubMenu2"
                                    Value="SubMenu2">
                                </telerik:RadMenuItem>

                            </Items>
                            <ExpandAnimation Type="None" />
                            <CollapseAnimation Type="None" />
                            
                        </telerik:RadContextMenu>

My current layout looks like
     
                                     Menu
                                                
                                                   
SubMenu1
                                                   
SubMenu2

Actual should be look like

                                    Menu
                                   
SubMenu1
                                   
SubMenu2

do i need to set manually css or any other build in property to set proper layout of menu?

Please help me.

Thanks
Dimitar Terziev
Telerik team
 answered on 07 Dec 2010
1 answer
209 views
Hello,

We're around to develop a web application targeted at mobile phones like the Iphone or Android. I just tried your latest version (2010.3.1109.35), particularly the RadMenu and Radpanelbar. They both didn't work with Dolphin Browser on Android (e.g. no drop down items in the menu, while it perfectly worked in IE 8). This confuses me since I read in another arcticle (http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/radcontrols-for-mobile.aspx) that mobile support should be functional with the 2010 Q3 release.

I would like to know
- what controls are mobile compatible
- what settings (regarding your controls) we have to apply to ensure mobile compatibility

Sorry for that comprehensive question but you have to understand that this is a critical architectual issue since there seems to be no alternative from Telerik to create mobile phone web applications (as old Webcontrols w/o Ajax are legacy and MVC currently is too basic).

Regards,
Conrad
Kamen Bundev
Telerik team
 answered on 07 Dec 2010
2 answers
165 views
Hello,

I have a problem with the DoubleClick on a RadGrid. When I double click on my grid, my javascript function doesn't want to give me my first column data unless it is visible. Is it possible to do it with my column invisible ?

I use the following javascript function
function OnRowDblClick(sender, eventArgs) 
    
        var dataItem = $get(eventArgs.get_id()); 
        var grid = sender; 
        var MasterTable = grid.get_masterTableView(); 
        var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()]; 
        var cell = MasterTable.getCellByColumnUniqueName(row, "NO_SERVEUR"); 
        var value = cell.innerHTML 
        window.location.href='FEN_INFO_SERVEUR.aspx?No_Serveur='+value; // Redirect the page         
        return;

Thanks

Keven
Keven
Top achievements
Rank 1
 answered on 07 Dec 2010
4 answers
98 views
In my OnClientClose client event of the RadWindowManager, I have codes that opens up another form using
var w = window.open(.....);
w.focus();

the window opens as it should, however, the focus is always returned to the calling form  (i.e.: the window opens, but is immediately minimized).  This only happens if window.open is called from the RadWindowManager's OnClientClose event.  If I use the same code (var w = window.open(....); w.focus();) elsewhere, it works as it should.  Is there something with RadWindowManager that forces focus back to the main form at the end of OnClientClose event?  If so, how can I overcome that?

Thanks!
JustinWong
Top achievements
Rank 1
 answered on 07 Dec 2010
19 answers
869 views
Hi All,

I am bind the RadGrid using client side binding. It works fine but when i tried to implement paging for client side binding, i am not able to acheive this. Not sure whether i missed something in my code (either HTML or Javascript). What actully happens is that, even though I use the set_virtualItemCount method, the page actually fills with all the rows. Meaning, if i set the PageSize="5" and if the record count received is more than 5 then it displays all the rows.

If any body provide me some pointer on the sample code with client side paging and sorting will be apreciated. I would need to look at the HTML code as well as the javascript code.

I have attached my code below
//HTML
<telerik:RadGrid ID="rgrdUsers" runat="server" PageSize="5"
AllowPaging="true" AllowSorting="True" AllowFilteringByColumn="false" GridLines="Horizontal" Width="100%" Height="500px" >
....
<MasterTableView AllowMultiColumnSorting="True" AutoGenerateColumns="False" PageSize="5" AllowPaging="true">
        ....
</MasterTableView>
</telerik:RadGrid>

//Javascript
    function OnSuccess(result, context)
    {
            masterTableView.set_virtualItemCount(5);
            masterTableView.set_dataSource(result)
            masterTableView.dataBind();
    }

Thanks in advance
Sundar
Maria Ilieva
Telerik team
 answered on 07 Dec 2010
8 answers
640 views
I've seen a lot of posts about ItemCommand events not firing, but no solution in any of the topics. My problem is simple and shouldn't require a complete code sample or whatever: I have a RadGrid within a UserControl, dynamicaly being loaded on a page, within a PlaceHolder using LoadControl. I use inline editing for the grid, using my own code to update the underlying database. The UpdateCommand fired after clicking the update button in de editcommand column should be the place to do so. Going into edit mode works fine, but when clicking either the cancel button or the update button, doen's fire any event.

The page structure is like this: Master > Content > RadSplitter > RadPane > RadAjaxPanel > PlaceHolder > UserControl > RadAjaxPanel > RadGrid.

Please give me a solution for this problem. FYI:'the grid has the OnUpdateCommand property set with my event handlers name and the AllowAutomatedUpdates property is set to true. Everything SHOULD work fine.... but it doesn't.
Maria Ilieva
Telerik team
 answered on 07 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?