Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
187 views
Hi
I am using a GridDateTimeColumn and would like to be able to set the calander properties, namely the ShowRowHeaders property to false.

I have tried setting it in the ItemCreated & ItemDataBound events of the grid, but to no avail ... The code is below:

    <telerik:RadGrid ID="MyRadGrid" runat="server" AllowPaging="True" AllowMultiRowSelection="true" 
        AutoGenerateColumns="False" AllowAutomaticDeletes="True" AllowMultiRowEdit="true" 
        AllowAutomaticInserts="False" AllowAutomaticUpdates="False" GridLines="None" 
        AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="false"
        <ClientSettings Selecting-AllowRowSelect="true"
        </ClientSettings> 
        <MasterTableView DataKeyNames="MyId" EditMode="EditForms" CommandItemDisplay="Top"
            <RowIndicatorColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </ExpandCollapseColumn> 
 
            <Columns> 
                
                <telerik:GridDateTimeColumn DataField="date" HeaderText="date" UniqueName="date" 
                    PickerType="DateTimePicker" > 
                     
                </telerik:GridDateTimeColumn> 
                 
            </Columns> 
        </MasterTableView> 
        <FilterMenu EnableTheming="True"
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
        </FilterMenu> 
    </telerik:RadGrid> 


 void MyRadGrid_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridEditableItem && e.Item.IsInEditMode) 
        { 
            GridEditableItem item = e.Item as GridEditableItem; 
             
            RadDateTimePicker date = item["date"].Controls[0] as RadDateTimePicker; 
            if (date != null
                date.Calendar.ShowRowHeaders = false
        } 
I can confirm that the above code is excuted, however the changes are not displayed. The radgrid is set to update itself in the radajax manager.


Shinu
Top achievements
Rank 2
 answered on 10 Jun 2009
2 answers
180 views
hello,,
The radgrid indent is not working..
Plz help me
Thanks
Tervel
Telerik team
 answered on 10 Jun 2009
2 answers
234 views
I have a RadGrid that has a GridDateTimeColumn in it that has the PickerType set to TimePicker so that the user can only select the time portion.  I need to be able to set the Date portion programaticlly so that when I do the insert/edit to the DB the date is set properly.  I'm using the Automatic Datasource Operations of the grid.

I'm sure there is a way to do this but I can't figure it out.  I've tried accessing the value of the column in the _ItemCommand event but can't get to that level.

Thanks
Curtis
Nikolay Rusev
Telerik team
 answered on 10 Jun 2009
1 answer
350 views
Hi folks !

Iam using the  RAD GRID from ASP.NET AJAX UI Controls.

I want to have an up/down arrow to be marked on to my grid header so that I will be availabe to sort the column of the grid.

Iam using GRAY skin for my RAD GRID.

Please help me sort out my problem.
Princy
Top achievements
Rank 2
 answered on 10 Jun 2009
1 answer
117 views
I got a radcombobox and I use autocomplete features it works for single item well but when I set Autocompleteseperator property it didnt work. radcombobox and the server code which I used for autocomplete features given below all help will be appreciated.

 

<telerik:RadComboBox ID="cmbUnvan" Runat="server" AllowCustomText="True"   
AutoPostBack="True" EnableLoadOnDemand="True"   
onitemsrequested="cmbUnvan_ItemsRequested" Height="73px" Width="230px"   
AutoCompleteSeparator=";" MarkFirstMatch="True">   
<CollapseAnimation Duration="200" Type="OutQuint" />   
</telerik:RadComboBox> 
 
 
protected void cmbUnvan_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)    
{  
 
RadComboBox combo = (RadComboBox)o;   
combo.Items.Clear();  
SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Personelcon"].ConnectionString;   
string text = e.Text;   
string sql = "SELECT * from Unvan WHERE Uname LIKE '" + text.Replace("'", "''") + "%'";   
SqlCommand selectCommand = new SqlCommand(sql, connection);   
SqlDataAdapter adapter = new SqlDataAdapter(selectCommand);   
DataTable dt = new DataTable();   
adapter.Fill(dt);  
foreach (DataRow row in dt.Rows)   
{  
RadComboBoxItem item = new RadComboBoxItem(row["Uname"].ToString());   
item.Value = row["Uid"].ToString();   
//item.Text = Convert.ToString(row["Uname"]);   
combo.Items.Add(item);  
}  
Shinu
Top achievements
Rank 2
 answered on 10 Jun 2009
1 answer
223 views
How would I go about having a RadMenu expand when a user mouses over another control (ex: LinkButton)? 
Princy
Top achievements
Rank 2
 answered on 10 Jun 2009
3 answers
147 views

I have a radgrid which has a OnItemCommand (server event) , when I put in the clienevent OnCommand

 

the server event is not being fired  - any ideas why ? If I remove the clientevent - OnCommand="OnGridCommand"  then everything works fine.

 

 

 

 

  <telerik:RadGrid ID="gridInvLines" AllowPaging="False" Skin="Office2007"   
        runat="server" AutoGenerateColumns="False" DataSourceID="odsInvLines"   
        GridLines="None"  OnItemEvent="gridInvLines_ItemEvent"   OnItemCommand="gridInvLines_ItemCommand" OnItemDataBound="gridInvLines_ItemDataBound" ShowFooter="True">  
        <ClientSettings >  
         <ClientEvents OnKeyPress="disableEnterKey" OnCommand="OnGridCommand"  OnPopUpShowing="PopUpShowing" />  
        </ClientSettings>  
        <MasterTableView DataKeyNames="LINE_NUMBER" DataSourceID="odsInvLines" EditMode="PopUp" InsertItemDisplay="Top"  AllowAutomaticInserts="true" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true"  CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add New Line">  
   </telerik:RadGrid>  
 

 

Princy
Top achievements
Rank 2
 answered on 10 Jun 2009
20 answers
306 views
Hi,
I have a grid with a commanditemtemplate created server-side on page_load.
Within this template is a linkbutton to export the grid contents.
The grid is ajaxified through ajaxmanager.

From the code library, i have used OnRequestStart of the ajaxmanager and a javascript function to export the grid.
This works fine, however, i am then losing all my grid settings which i set server-side within the page_load. ie; commanditemtemplate , filterbars, Itemtemplate columns, paging layout etc.
It seems to reset to the grid layout set within the aspx, but i have functions from page_load which sets all this based upon user.

Here is my javascript code...

 

function gridRequestStart(grid, eventArgs)

 

{

 

if((eventArgs.EventTarget.indexOf("exportButton") != -1))

 

{

eventArgs.EnableAjax =

false;

 

ExportGrid()

}

}

 

function ExportGrid()

 

{

 

var masterTable = $find("<%=grdPO.ClientID %>").get_masterTableView();

 

masterTable.exportToExcel();

}

Can you provide any ideas on how to use my page_load functions to set the grid layout once this script has executed ?

Many Thanks
Mark

Shinu
Top achievements
Rank 2
 answered on 10 Jun 2009
6 answers
196 views
Dear Telerik,

I am using build 2009.1.311.35.  I have a RadGrid with a UserControl edit form.  The edit form is a bit unconventional as it manually performs database updates instead of invoking the RadGrid's "Update" command.  For us, it is desirable to keep the edit form open as it does other things in addition to updating an item.  To close the edit form, I have a linkbutton with the "Cancel" command.

The RadGrid contains filters so that at any given time only filtered items are shown.  When the user makes certain changes to an item's attributes in the edit form, the RadGrid's Rebind() method is called.  If the item's attributes no longer satisfy the filter's criteria, it is no longer shown.  The edit form is now automatically opened for the next item in the view.  In a sense, this behavior is desirable as it is convenient for a user to make changes to multiple items without having to manually edit each one.

However, a problem is that when the edit form is automatically opened, the OnItemCommand or OnEditCommand events are NOT fired.  We must rely on these events to perform initialization when a new item is edited.  Unfortunately we cannot use the UserControl's DataBinding or PreRender events as these also get invoked when the UserControl does postbacks (yes, we're probably using the UserControl Edit Form in ways you didn't intend :)

Ideally for us, the edit form should not be open automatically once the RadGrid is re-bound.  Do you have any suggestions or alternatives? 

Any help is greatly appreciated. Thanks,

Yen
Yen
Top achievements
Rank 1
 answered on 09 Jun 2009
3 answers
87 views
We just updated our Telerik assemblies and are getting RadDock errors.

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Method 'get_Zones' does not have an implementation.

If we revert to the previous version of the assembly, this message goes away.  Has anyone else encountered this?



Mark
Top achievements
Rank 2
 answered on 09 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?