Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
162 views
I have a radGrid that has about 5 columns.  The RadGrid is setup to me in inplace edit mode when doing an insert.  I have subscribed to the OnCommand client event to capture the insert client side before it is sent to the server.  The event IS firing but I cannot figure out for the life of me of how to get the inplace data that the user is trying to insert.

Any help would be GREATLY appreciated.

-Jason
Shinu
Top achievements
Rank 2
 answered on 12 Jul 2011
1 answer
97 views
Hi,

Was just wondering if there's a simple way of re-arranging the Update/Cancel buttons when in In-line Edit Mode?

I'm using two images for my update (check mark) and cancel (red x). Is there a way to place my Update Button on the far left side of the Grid, and have my Cancel Button on the far right side of the grid when in edit mode?

Best Regards,

Landon
Princy
Top achievements
Rank 2
 answered on 12 Jul 2011
1 answer
53 views
For the TreeView, i am trying to set up through a datasoure.
I have the following code within my .aspx file but I do not see the RadTreeView.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadTreeView.aspx.cs"   %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
  
    protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
    {
  
    }
</script>
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
      
        <telerik:RadTreeView ID="RadTreeView1" Runat="server" DataFieldID="id_num" 
            DataFieldParentID="manager" DataSourceID="SqlDataSource1" DataTextField="fname" 
            DataValueField="fname">
        </telerik:RadTreeView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:nayan_alphametrixConnectionString2 %>" 
            SelectCommand="SELECT [id_num], [fname], [manager] FROM [TreeView]" 
            onselecting="SqlDataSource1_Selecting">
        </asp:SqlDataSource>
      
        <telerik:RadButton ID="RadButton1" runat="server">
        </telerik:RadButton>
      
    </div>
    </form>
</body>
</html>


I am not sure what I am doing wrong. I am basically using the wizard for the datasource. Thank you.
Shinu
Top achievements
Rank 2
 answered on 12 Jul 2011
4 answers
163 views

 Problem: after put rgDataRetrieval.MasterTableView.FilterExpression=... on grid PreRender makes grid all the column filter function not work. Please help!

 

I have a radgrid, has allow filter for all the columns turn to true.
I also need to have a date manually filtered by a search button click to filter the datagrid manually by start and end date.

I put the following code on PreRender, the serach button manually filter works fine, but after put  rgDataRetrieval.MasterTableView.FilterExpression=... in PreRender, the grid column auto filter for all the columns does not work right- not work at all

protected
void rgDataRetrieval_PreRender(object sender, EventArgs e)

 

{

 

 

DateTime startDate =Convert.ToDateTime("1/1/1900");

 

 

 

DateTime endDate = Convert.ToDateTime("1/1/2900");

 

 

 

if (rdpFrom.SelectedDate!=null)

 

startDate=rdpFrom.SelectedDate.Value;

 

 

if (rdpTo.SelectedDate!=null)

 

endDate=rdpTo.SelectedDate.Value.AddDays(1);

 

 

if (rdpFrom.SelectedDate != null || rdpTo.SelectedDate != null)

 

{

rgDataRetrieval.MasterTableView.FilterExpression =

 

null;

 

rgDataRetrieval.MasterTableView.FilterExpression =

 

"(([DownloadEnd] >= '" + startDate +

 

 

 

"') AND ([DownloadEnd] <= '" + endDate + "')) ";

 

rgDataRetrieval.MasterTableView.Rebind();

}

}


Shinu
Top achievements
Rank 2
 answered on 12 Jul 2011
0 answers
79 views
Can not execute button click even when set  autopostback of RadDatePicker properties  is true.
Telerik version: 2011.1.315.40
Help me. please!
hai
Top achievements
Rank 1
 asked on 12 Jul 2011
3 answers
258 views
I have a RadGrid setup so that double clicking a row opens a form under the row to allow editing. The form itself lives in a web user control.

On this form one of the fields is a CheckBox. It looks like this.

<td><asp:CheckBox ID="chkIsActive" runat="server" Checked='<%# DataBinder.Eval( Container, "DataItem.con_Is_Active") %>' /></td>
 
The code in the 'Checked=' bit sees that on edit the Checked property gets set to True or False. Perfect.

However, when I hit the Add New Record button, this line gets a problem.

Specified cast is not valid.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Specified cast is not valid.

Source Error:

Line 24:          <tr>
Line 25:          <td align="right">Active:</td>
Line 26:          <td><asp:CheckBox ID="chkIsActive" runat="server" Checked='<%# DataBinder.Eval( Container, "DataItem.con_Is_Active") %>' /></td>
Line 27:          <td></td>
Line 28:         <td></td>

Source File: c:\Dev\RadGrid\RadGrid\Controls\ContactDetails.ascx    Line: 26



It's pretty easy to understand why.  DataItem.con_Is_Active has no value on an Add New Record insert.

My question is, were do I intercept this to prevent this error on Adding a new Record?

I've looked for but have been unable to find the InitInsertButtons click event if any such event exists..

I'm sure this is simple I just don't know where to put such a check.  I suppose what I'd like to do is set the  DataItem.con_Is_Active property some default value (like 'False') before the it gets to this point.

Brad
Top achievements
Rank 1
 answered on 12 Jul 2011
2 answers
116 views
The splitter is similar to the webmail demo (fulscreen)

However when the page loads you can clearly see the splitter be small, then "POP" into fullscreen. 

Is there any way around that??  at least somehow set a default height so the popping isn't so in your face.
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 11 Jul 2011
2 answers
337 views
Hi,

I was wondering how can I get the index of row in the UpdateCommand events of a TreeList. In a RadGrid, it would be like this :

Guid uniqueIdentifer= Guid.Parse((RadGrid1.Items[e.Item.ItemIndex] as GridDataItem)["UniqueIdentifier"].Text);

But if doesn't work with a treeList. In fact, the proprety e.Item.ItemIndex doesn't seem to exist. So, I look around to found something, but I had no luck. So, may someone tell me how to retrieve the index of the selected row via a updateCommand.

Thank you
David
Top achievements
Rank 1
 answered on 11 Jul 2011
3 answers
462 views
I tried following to export to pdf in Landscape page orientation:

 

RadGridResult.ExportSettings.Pdf.PageHeight = Unit.Parse("215mm")

 

RadGridResult.ExportSettings.Pdf.PageWidth = Unit.Parse("260mm");

But it didn't work, and I have no idea on how to export to Word in Landscape orientation.
But I can do it with Excel just fine. Is there anyway to "convert" Excel to PDF or Word format on the fly?

THanks

LamK.

 

 

 

 

Daniel
Telerik team
 answered on 11 Jul 2011
1 answer
246 views
By default, when we export from RadGrid to  MS Word, it automatically has 1 inches page margin, I would like to programmatically change it to 0.5.

Would you please show me how to do that?

Thanks

LamK
Daniel
Telerik team
 answered on 11 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?