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

Hi,

I have one textbox with multiline TextMode on my page. I have set MaxLength to 500 characters.

<Telerik:RadTextBox id="radtb1" runat="server" TextMode="MultiLine"

width="400px" Height="80px" MaxLength="500" ></telerik:RadTextBox>

If I type in this textbox, it does not allow to type more then 500 chars but if I directly paste more than 1000 chars then it allows me to paste.

I don’t want to allow anyone to paste more than MaxLength characters.

Is there any way or any property to fix this problem?

Thanks,
Tarulatta Patel.



Dimo
Telerik team
 answered on 07 Jan 2009
1 answer
144 views
I want to save the the selected date from the RadDataPicker within the datalist to the database here is the code I have

from aspx side

 

<asp:DataList ID="someid" runat="server" RepeatLayout="Table" ItemStyle-Width="300px"

 

 

RepeatColumns="2" RepeatDirection="Vertical"

 

 

DataKeyField="somekeydata" >

 

 

<HeaderTemplate>

 

 

<table>

 

 

<tr>

 

 

<td class="label" colspan="8">

 

some info

 

</td>

 

 

</tr>

 

 

</table>

 

 

</HeaderTemplate>

 

 

<ItemStyle />

 

 

 

<ItemTemplate>

 

 

<asp:Label ID="someid2" runat="server" Text=<%#Eval("somedata")%>></asp:Label>

 

 

<asp:Label ID="someid3" runat="server" Text=<%#Eval("somedata")%> ></asp:Label>:

 

 

 

<img id="someid4" runat="server" src="images/someimage.gif" alt="some alt." align="absmiddle"

 

 

border="0" height="10" />

 

 

<telerik:RadDatePicker ID="RadDate1" Runat="server" DbSelectedDate='<%#Bind("dates")%>' >

 

 

</telerik:RadDatePicker>

 

 

</ItemTemplate>

 

 

</asp:DataList>

Cs file

 

 

private RadDatePicker getdate= new RadDatePicker();

 

 

 

protected

 

void Save_Click(object sender, EventArgs e)

 

{

 

 

 

 

foreach (DataListItem ls in someid.Items)

 

{

 

int key= (int)someid.DataKeys[ls.ItemIndex];

 

getdate= (

RadDatePicker)ls.FindControl("RadDate1");

 

 

object somevariable = Convert.ToDateTime(getdate.SelectedDate); //each time the date is null

 

 

 

 

 

 

 

}

 

 

}

I really appreciate for your help.

Thanks

Yavor
Telerik team
 answered on 07 Jan 2009
1 answer
169 views
Hi,
I have a RadGrid with a NestedViewTemplate. To avoid multiple rows expanded at once, I have implemented a function wich expands a row if it is selected. This works just as expected. My problem is, when  I click the expand/collapse button I can still expand other rows. To avoid this, I tried to use the "OnHierarchyExpanding" client event. Unfortunately the event handler is never called.
What could be a reason for that?

Best regards,
Robert
Shinu
Top achievements
Rank 2
 answered on 07 Jan 2009
0 answers
92 views
when is the OnAppointmentClick event of radscheduler fired?
Indranik
Top achievements
Rank 1
 asked on 07 Jan 2009
1 answer
213 views
Hi -

What is the proper way to bind a datasource to RadGrid in the codebehind using a value retrieved from a combobox on the client? 

<

telerik:RadComboBox ID="comboManagers"

 

 

Runat="server"

 

 

Height="115px"

 

Width="250px"

 

 

Skin="Sunset"

 

 

 

EnableLoadOnDemand="true"

 

 

 

AllowCustomText="True"

 

 

 

OnClientSelectedIndexChanged="LoadGrid"

 

 

 

>

 

 

 

<

 

 

CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

</telerik:RadComboBox>

 

 

 

<telerik:RadGrid ID="RadGrid1"

 

 

 

runat="server" AllowPaging="True"

 

 

 

AllowSorting="True"

 

 

 

GridLines="None"

 

 

 

ShowGroupPanel="True"

 

 

 

OnNeedDataSource="RadGrid1_NeedDataSource"

 

 

 

>

 

 

 

...
function

 

 

LoadGrid(combo, eventargs) { 

 

var grid = $find("RadGrid1");

 

 

 

if (grid != null)

 

 

{

 

      var item = eventarqs.get_item();

 

 

       ???

 

  }

}

 


I have a routine in the codebehind which requires the data in item.get_value() for generating the datasource.

Thanks in advance for your help.
Shinu
Top achievements
Rank 2
 answered on 07 Jan 2009
2 answers
122 views
Hello,

We are using 2008.3.1125.35 version RadScheduler. Problem occurs in month view for showing number of appointments per day.
We have set MonthView.VisibleAppointmentsPerDay property default to 4 at design time. And our appointments are span across multiple days. There is a scenario where there are more then 4 appointments on a given day, where it shows additional appointments in the "More"  option, but does not render any appointments for its subsequent days and left it blank.

If we set MonthView.VisibleAppointmentsPerDay property at runtime, we are getting "Microsoft JScript runtime error: 'null' is null or not an object" error in OnDataBound event.

Following is a code:

eg.

  protected void FiscalScheduler_DataBound(object sender, EventArgs e)
  {   
      FiscalSchedular.MonthView.VisibleAppointmentsPerDay = 3;
  }

The javascript error will be raised if a user is hovering the rendered appointments.

Thanks,
Venu
Venu Krishnamoorthy
Top achievements
Rank 1
 answered on 07 Jan 2009
1 answer
107 views

Currently we are using the Rad Grid in our application and we need to set the first column as seleted with the dropdown image. We set the sort expression and while clicking on the hear only it is getting selected and the direction arrow image is showing. While loading the page itself, how can we set this property with the direction (asending/descending) images?

Shinu
Top achievements
Rank 2
 answered on 07 Jan 2009
3 answers
242 views
Hello,

I have a hierachial RadGrid and would like to be able to set the DataSource for the nested tables at runtime on the server based on criteria in the parent grid.  Currently, it looks a little bit like this:

<telerik:RadGrid ID="grid1" Skin="Default" runat="server" Visible="False" AutoGenerateColumns="False" 
    ShowHeader="False" Width="400px" OnItemDataBound="grid1_ItemDataBound" AllowMultiRowSelection="True" 
    OnRowDrop="grid1_RowDrop" OnDeleteCommand="grid1_DeleteCommand" OnPreRender="grid1_PreRender"
    <MasterTableView DataKeyNames="AnswerID"
    <DetailTables>  
        <telerik:GridTableView Name="grid2">         
            <Columns> 
            <telerik:GridBoundColumn AllowFiltering="False" AllowSorting="False" DataField="AnswerLabel" 
                ReadOnly="True" Reorderable="False" Resizable="False" ShowSortIcon="False" UniqueName="colAnswerLabel"
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="QuestionID" UniqueName="colQuestionID" Visible="False"
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="AnswerID" UniqueName="colAnswerID" Visible="False"
            </telerik:GridBoundColumn> 
            </Columns> 
            <RowIndicatorColumn> 
            <HeaderStyle Width="20px" /> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
            <HeaderStyle Width="20px" /> 
            </ExpandCollapseColumn> 
        </telerik:GridTableView>  
    </DetailTables> 
    <Columns> 
        <telerik:GridBoundColumn AllowFiltering="False" AllowSorting="False" DataField="AnswerLabel" 
        ReadOnly="True" Reorderable="False" Resizable="False" ShowSortIcon="False" UniqueName="colAnswerLabel"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="QuestionID" UniqueName="colQuestionID" Visible="False"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="AnswerID" UniqueName="colAnswerID" Visible="False"
        </telerik:GridBoundColumn> 
    </Columns> 
    <RowIndicatorColumn> 
        <HeaderStyle Width="20px" /> 
    </RowIndicatorColumn> 
    <ExpandCollapseColumn> 
        <HeaderStyle Width="20px" /> 
    </ExpandCollapseColumn> 
    </MasterTableView> 
    <ClientSettings AllowRowsDragDrop="True"
    <Selecting AllowRowSelect="True" /> 
    </ClientSettings> 
</telerik:RadGrid> 
 
 


During the course of the app, I can easily bind to grid1, but how can I bind DataTables to grid2 that are not in a relational database relationship to grid1? Is there a way to bind one or two of the nested grids at runtime based on information contained in the corresponding row in grid1 and provided by the user?
Princy
Top achievements
Rank 2
 answered on 07 Jan 2009
4 answers
213 views
Hello,

I'll appreciate you help, since I'm trying to perform this action for a couple of hours without success.

I have a button , let's call it "ADD NEW ROW IN GRID"
Additionally , I have 3 link buttons placed on top of grid : add new record  , update record,  delete record

for some reason I need my WebUserControl form to be opened not from the link of the grid itself, but using
the button  "ADD NEW ROW IN GRID"

I tried to make ON CLICK event and from it I call another event  

 

protected void btnAddNewRow_OnClick(object sender, ImageClickEventArgs e)

 

{

 

       if (Page.IsValid)

 

 

            this.btnAdd_OnClick(sender, e);

 

}
I get an error in this case.....
What am I missing ?

When I press the link on the grid itself , it works just fine , so what is the difference ?

Shinu
Top achievements
Rank 2
 answered on 07 Jan 2009
1 answer
67 views

 

 

I'm seeing some odd behaviour on a master page. The ajaxmanager and the control being updated are on the master page itself - not inside contentplaceholders. 

var
ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
alert(ajaxManager); // This prints "object" on first call but "null" on all subsequent calls.
ajaxManager.ajaxRequest(
"nodeclick");

Seems I can't get a reference to ajaxmanager conistsnetly - does this make sense at all?

Cheers,
Andles.

 

Andy
Top achievements
Rank 1
 answered on 07 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?