Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
103 views
Hi,
I am using a grid button that's code is given below tell in which plzce i will write code for that operation??
this button is inside grid it has not property like onclientclick like asp:button??
Thanks
 </telerik:GridTemplateColumn>
                    <telerik:GridButtonColumn ButtonType="PushButton" Text="Save" UniqueName="Save">
                    <FooterStyle Font-Bold="true" Font-Size="Medium" />
 </telerik:GridButtonColumn>
Princy
Top achievements
Rank 2
 answered on 12 Nov 2010
1 answer
105 views
Hi,

I am working on a RadGrid which is not allowed multiple row selection.The issue i found is i can not uncchek the check box in  a row which is already selected when click on it again.Is there anyway to overcome this?

Thank you!
Shinu
Top achievements
Rank 2
 answered on 12 Nov 2010
2 answers
276 views
Hi

I am using the demo here to create a grid where the user can do batch updates with double-click inplace editing. Is there some way to remove the extra padding when the textbox is displayed? The problem is the textbox for editing is 19px high, while the label for display is 15px high and this 4px difference causes the row to "bounce" when going into/out of edit mode. This behaviour is also in the demo.

I have tried removing the padding at runtime with jquery in the ShowColumnEditor() function and re-adding it in the HideColumnEditor() function without luck. I can get rid of the bounce by setting the ItemStyle to 29px, but this makes the grid too spaced out and not as attractive.

I am using Internet Explorer 8 and the Vista skin.

Thanks!
Jeremy
Top achievements
Rank 1
 answered on 12 Nov 2010
3 answers
238 views
Hi. I've used the RadTabStrip for some time now but never used multi-row. I've noticed when I've tried to use it, that in my first line off tabs, the end of the tab gets cut off. The tabstrip is sitting inside an HTML table cell, if that's any help.

<telerik:RadTabStrip runat="server" ID="rtsDetails" Skin="Default" Orientation="HorizontalTop"
                                SelectedIndex="0" MultiPageID="rmpDetails" CausesValidation="false" Width="100%"
                                     OnClientTabSelected="OnClientTabSelected">
                                <Tabs>
                                    <telerik:RadTab Text="My Details" Value="0">
                                    </telerik:RadTab>
                                    <telerik:RadTab Text="IT Assets" Value="1">
                                    </telerik:RadTab>
                                    <telerik:RadTab Text="Action Requests" Value="2" IsBreak="true">
                                    </telerik:RadTab>
                                    <telerik:RadTab Text="Correspondence" Value="3">
                                    </telerik:RadTab>
                                    <telerik:RadTab Text="Purchase Orders" Value="4" >
                                    </telerik:RadTab>
                                    <telerik:RadTab Text="Support Calls" Value="5">
                                    </telerik:RadTab>
                                </Tabs>
                            </telerik:RadTabStrip>


Daniel
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 11 Nov 2010
3 answers
183 views
Below I have an image of my running page.

I have my Update button in Edit.ascx
  
<td align="right">
             <asp:Button ID="btnUpdate" Text="Update" runat="server" 
                 CommandName="Update" 
                 Visible='<%# Not (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) %>'>
            </asp:Button>
  
    
            <asp:button id="btnCancel" text="Cancel" runat="server" causesvalidation="False" commandname="Cancel"></asp:button>
            </td>
  
And I have my server side code: in exit.ascx.vb
  
Protected Sub btnUpdate_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnUpdate.Click
        'Set Varibles
.
.
.
End Sub
  
Telerick grid in view.ascx
.
.
.
<telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
                    </telerik:GridEditCommandColumn>
  
    </Columns>
    <EditFormSettings UserControlName="desktopModules/AAUMembershipHist01/Edit.ascx" EditFormType="WebUserControl">
        <EditColumn UniqueName="EditCommandColumn1">
        </EditColumn>
    </EditFormSettings>
.
.
.
  
Running my trace I find that the Server side code never gets executed.
  
Doing something wrong.  Can someone point my in the right direction?
Kris
Top achievements
Rank 1
 answered on 11 Nov 2010
2 answers
117 views
I'm creating a page not completely unlike this demo. Like the demo I have a RadCalendar displayed that the user uses for quick navigation in the RadScheduler.

I've got things set up so when they change the view in the Calendar, the Scheduler updates. I want to do the reverse, so that when the user navigates directly in the Scheduler, the Calendar view updates.

I've got this in my code-behind ...
protected void RadScheduler1_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e)
{
    RadCalendar1.SelectedDate = RadScheduler1.SelectedDate;
}

and the AjaxSettings on the page include this ...
<telerik:AjaxSetting AjaxControlID="RadScheduler1">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="RadScheduler1"
                                    LoadingPanelID="RadAjaxLoadingPanel1"/>
        <telerik:AjaxUpdatedControl ControlID="RadCalendar1"
                                    LoadingPanelID="RadAjaxLoadingPanel1"/>
    </UpdatedControls>
</telerik:AjaxSetting>

Now I know that you have made no provision for this update in your demo, but when I run my code, I can see the selected date in the Calendar being updated (I've got EnableMultiSelect="False" BTW) but the Calendar display simply refuses to change. I can also see that the Ajax update is working 'cos the LoadingPanel displays.

I suppose I'm looking for an equivalent to Rebind() or somesuch to get the Calendar to redraw. 

What am I missing?

-- 
Stuart


Stuart Hemming
Top achievements
Rank 2
 answered on 11 Nov 2010
4 answers
1.3K+ views
Hi,

For displaying datetime values in a RadGrid column I am using a GridBoundColumn with DataType="System.DateTime" and DataFormatString="{0:M/d/yyyy}".  This works fine except in cases where the bound value is null (DateTime.MinVal) - the date value is displayed as "1/1/0001". 

I could define the column as a string and emit a blank string when the date field is set to DateTime.MinVal, but then I loose the capability of sorting on the date column (unless the date format is "yyyy/MM/dd".

Is there a way to leave the data type of the column as "DateTime" and also display an empty cell if the value of the date is DateTime.MinVal?
Rich
Top achievements
Rank 1
 answered on 11 Nov 2010
2 answers
90 views
i am using the megadropdown menu, it works fine in IE 6.0,7.0,8.0 but not in firefox, please help.

just below the menu, there is a flash object, in firefox when we mouse over the megadropdown it automatically disappears as though there is a timeout., the strange thing is if the megadropdown extends in height beyond the height of the flash object(height:233px), if you mouse over quickly on the lowest part of the megadrop down, it stays intact without disappearing, but when we mouse over the upper part of the megadropdown (where you can see the flash object in the background), the menu disappears.

the z:index of the flash object is '0' and the z-index of the menu is 7000, again it works fine in IE, but not in firefox.
http://208.109.170.81/Create/Adults/Classes/Drawing---Painting.aspx

thanks in advance
Tanuj
Top achievements
Rank 1
 answered on 11 Nov 2010
2 answers
239 views
Hello,

Does anyone know which event on the RadGrid I can dynamically add RequiredFieldValidators and have them fire client side?  Physically placing the Validators inside of the <EditTemplate> works like a champ.

Right now we are using the ItemDataBound, and also have tried the ItemCreated event.  Those seem to be the only places to inject validators when the update button is clicked...

The .AddValidator method is an extension method tied to controls to determine which validation message to assign to the validator and then dynamically add the validator.  This code works on the rest of the site, just not for InPlace editing of grids so far.

Code to add the validator to the page.  Maybe I'm adding the validator to the wrong place, but I'd think that control.Parent would represent the "cell" the control lives in.
// control is the Control validation is being added to
control.Parent.Controls.Add(requiredFieldValidator);

Sample ItemDataBound method
protected void rgPmpDetails_ItemDataBound(object sender, GridItemEventArgs e)
{
    const string valGroup = "vgEditPmpDetails";
 
    GridHelper.AddEditValidator(e, "rntbCreditPercentGrid", valGroup, "Premium Credit");
    GridHelper.SetFocusToFirstControlWhenInEditMode(e, "rntbCreditPercentGrid");
}

And the GridHelper function does this:
public static void AddEditValidator(GridItemEventArgs e, string controlId, string validationGroup, string fieldName, bool isMultiSelect = false)
{
    if ((e.Item is GridEditableItem) && e.Item.IsInEditMode)
    {
        Control control = e.Item.FindControl(controlId);
        if (control != null)
        {
 
            if (control is TextBox)
            {
                (control as TextBox).ValidationGroup = validationGroup;
                (control as TextBox).AddValidator(fieldName);
            }
            else if (control is DropDownList)
            {
                (control as DropDownList).ValidationGroup = validationGroup;
                (control as DropDownList).AddValidator(fieldName);
            }
            else if (control is RadNumericTextBox)
            {
                (control as RadNumericTextBox).ValidationGroup = validationGroup;
                (control as RadNumericTextBox).AddValidator(fieldName);
            }
            else if (control is RadComboBox)
            {
                (control as RadComboBox).ValidationGroup = validationGroup;
                (control as RadComboBox).AddValidator(fieldName, isMultiSelect);
            }
            else if (control is RadDatePicker)
            {
                (control as RadDatePicker).DateInput.ValidationGroup = validationGroup;
                (control as RadDatePicker).AddValidator(fieldName);
            }
            else
            {
                throw new NotImplementedException("Controls of type [" + control.GetType() + "] have not been implemented in GridHelper.AddEditValidator.");
            }
        }
 
        ImageButton imageButton = e.Item.FindControl("UpdateButton") as ImageButton;
        if (imageButton != null)
        {
            imageButton.ValidationGroup = validationGroup;
        }
    }
}
Thad
Top achievements
Rank 2
 answered on 11 Nov 2010
1 answer
59 views
For this code:

http://demos.telerik.com/aspnet-ajax/filter/examples/integration/defaultcs.aspx?product=filter

Is it possible to have the RadFilter control set to a default filter (e.g. "ShipVia" EqualTo "3"), when the page is first displayed?

Thanks,

Richard.
Richard
Top achievements
Rank 1
 answered on 11 Nov 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?