Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
433 views
Hi,

I'm having a problem at the moment dynamically changing the datasource ID of a grid. I have 2 SQLDataSource controls on the web page. I want to change the grid to point to a each one dependant on certain conditions.

I've tried setting the "DatasourceID" and doing "Databind" in the form init/load events, but the grid always looks like the data from the original dataource.

Has anyone any suggestions?

thx in advance

Bobby
James
Top achievements
Rank 1
 answered on 23 Jan 2009
1 answer
92 views
Hi All,

I have taken a telerik grid. In markup i don't have any columns. I want to create columns runtime based on data whose i want to bind.
Apply sorting on selected columns, paging and take some action on itemcommand event.

I have added columns at runtime in grid. But problem is that, Every time when page postbacks, it creates columns and binds grid again. It will be very combersome and slowdown to response. I want that when page load then grid columns has been created and
after that grid state should be maintained.

Does anybody know, please tell me how to do this?
I will be highly greatful to yours...


Thanks & Regards
Brijendra pandey



Yavor
Telerik team
 answered on 23 Jan 2009
3 answers
243 views
Hi,

I am creating a menu for one of our client using telerik control redMenu...
I could not find any menu sample with icons with each main menu item... for example...

+ Add    - Delete

in above example (+) and (-) could be icons I'm using in my menu...
can anyone help???
Sachin
Top achievements
Rank 1
 answered on 23 Jan 2009
3 answers
260 views

Hello!

I have below grid

ID    Name       Observations

1     Child1     offense type 1
1     Child1     offense type 2
1     Child1     offense type 3
2     Child2     offense type 1
2     Child2     offense type 2
2     Child2     offense type 3

And I like to suppress repeating column values to have below.  Are there any telerik grid properties already to do that?

ID    Name       Observations

1     Child1     offense type 1
                      offense type 2
                      offense type 3
2     Child2     offense type 1
                      offense type 2
                      offense type 3

Thanks in advance

Yavor
Telerik team
 answered on 23 Jan 2009
1 answer
221 views
in my itemdatabound event handler, I want to populate an edited item dropdownlist based on the value of a grid dataitem, the reference to the dataitem (Points) fails like so:

 

 

if (e.Item is GridEditFormItem && e.Item.IsInEditMode)  
 
{  
 
GridEditFormItem item = (GridEditFormItem)e.Item;  
 
GridEditableItem eeditedItem = e.Item as GridEditableItem;  
 
DropDownList list = item.FindControl("NumericGrade") as DropDownList;  
 
 
 
 
 
GridDataItem dataItem = e.Item as GridDataItem;  
 
String sPoints = dataitem["Points"].Text;  
int iPoints = Convert.ToInt16(sPoints);  
 
for (int j = 0; j < iPoints + 1; j++)  
 
{  
 
list.Items.Add(j.ToString());  
 
}  
 

I guess I could create a GridTemplateColumn for the Points field and then it would be accessible in GridEditFormItem(?) but I don't really want to through extra fields into the edit form?

Princy
Top achievements
Rank 2
 answered on 23 Jan 2009
1 answer
117 views
I got what I wanted working very quickly because the control works well but got stuck on the last feature. I had a tree that the user could click on but they wanted edit|delete|view option and I added that easily. But I wanted a confirmation on the delete. I tried to catch the OnClientContextMenuItemClicked but then there is no functionality on the tree at all and it looks like I have to handle it all myself. The only other option is going through the postback to raise a new dialog to ask for confirmation.

Anyone have a quicker way to do this? All I want to do is confirm the delete option.

Stephen

Updated: ok, I must have done something wrong because I can call the clientside function and it still acts properly. Is there a way I can change what happens after I return from the client side function. What I'd like it to be able to affect or cancel the server side post under certain conditions.

Updated: ok, never mind, this was as simple as I had hoped it would be

function TestIt(sender, eventArgs) {
  var item = eventArgs.get_menuItem();
  if (item.get_text() == "Delete") {
    if (!confirm("Do you really want to delete that item")) {
      eventArgs.set_cancel(true);
    }
  }



Shinu
Top achievements
Rank 2
 answered on 23 Jan 2009
1 answer
99 views
I saw a demo where the grid was configured to look/act like Outlook (with multi-line column for From/Subject), and that's <i>very</i> similar to what I want to do.  I'm new to these controls, but I did install the trainer and downloaded courseware, etc...  but, I haven't located a sample or info directly related to that.  Can someone point me in the right direction?
Shinu
Top achievements
Rank 2
 answered on 23 Jan 2009
1 answer
151 views
I am using the "Form template edit form" with EditMode="PopUp" to edit rows in my grid (it uses my ascx for a custom "edit" popup). Normally the user clicks the "Update" button to save the data (with a CommandName of Update). But when the user clicks the "OK" button on the main page, I want to save the values in the current edit popup (if there is one open). How do I invoke the "Update" for the open popup when someone hits just a button on the main page?

Thanks!
Shinu
Top achievements
Rank 2
 answered on 23 Jan 2009
2 answers
230 views
I love the quick Month/Year picker on the calendar but would really like to put this somewhere by itself. Baring that is there a way that I can fire the Month/Year picker with javascript and control the position of the popup.
Stephen
Top achievements
Rank 2
 answered on 22 Jan 2009
1 answer
83 views
When using the RadGrid within a table, under IE 6 & 7 the table expands to the width of the grid columns even when they are hidden by the grid's horizontal scroll bar.  For example:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="Cetero.StudyViewer.UserInterface.Web.test"%> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head id="Head1" runat="server"
    <title>Untitled Page</title>  
</head> 
<body> 
    <form  runat="server" > 
     
    <table cellspacing="0" border="1"
    <tr> 
    <td> 
            <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 
    <telerik:RadGrid ID="RadGrid1" runat="server" Width="700px" BorderColor="Red" BorderStyle="Solid" BorderWidth="1px" EnableAjaxSkinRendering="False" EnableViewState="False" GroupingEnabled="False" Skin="Default2006"
        <HeaderContextMenu EnableAjaxSkinRendering="False"
            <CollapseAnimation Duration="200" Type="OutQuint" /> 
        </HeaderContextMenu> 
        <ClientSettings AllowExpandCollapse="False" AllowGroupExpandCollapse="False"
            <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
        </ClientSettings> 
        <FilterMenu EnableAjaxSkinRendering="False"
            <CollapseAnimation Duration="200" Type="OutQuint" /> 
        </FilterMenu> 
        <ItemStyle Wrap="False" /> 
        <MasterTableView Width="700px" EnableViewState="False"
        </MasterTableView> 
    </telerik:RadGrid>  
    </td> 
    </tr> 
    </table>     
     
    </form> 
 
</body> 
</html> 

This shows the grid is 700px wide (red border), but the hidden content forces the containing table to the width of the contents (gray border) which is like 5000px.  Any way to overcome this in IE?



Joshua
Top achievements
Rank 1
 answered on 22 Jan 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?