Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
209 views
I wired up an event to update a linq data guy. linq is simple or sorta cause I'm just learning it. Everything works really cool with auto updates, deletes, and inserts however catching an edited value and in this case I want to encrypt and decrypt the ssn.
 
I can't seem to get the blankety blank edited values out of the Rad Grid. Some code I been working on and of course all the stuff that is commented out I couldn't get to work.

Isn't there an easy way to get the value from an edited textbox. You know the stuff someone types in a textbox when they clicked on edit. Sheesh!
UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);
(userControl.FindControl("admissionID") as TextBox).Text I keep getting errors on this guy. Null Reference and Object not set to an instance etc.

protected

void Update_Command(object source, Telerik.WebControls.GridCommandEventArgs e)

{

//GridEditableItem editedItem = e.Item as GridEditableItem;

//UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);

This is what I'd like to do is get the blankety blank row ID of the row I'm editing
//string admissionID = (userControl.FindControl("admissionID") as TextBox).Text;  I get error with object not set to....null reference etc. when code above is uncommented out for userControl


This is what I'd like to do is get the blankety blank edited stuff
//string ssn = (userControl.FindControl("ssn") as TextBox).Text; I get error with object not set to....null  reference when code above is uncommented out for userControl

//UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);

//Hashtable newValues = new Hashtable();

//newValues["admissionID"] = (userControl.FindControl("admissionID") as TextBox).Text;

//newValues["ssn"] = (userControl.FindControl("ssn") as TextBox).Text;

//TextBox admissionIDTxBx = (TextBox)userControl.FindControl("admissionID");

//TextBox ssnIDTxBx = (TextBox)userControl.FindControl("ssn");

var db = new admissions_appsDataContext();

var query = from s in db.admission_app2s

where s.admissionID == "randysolutions@hotmail.com" would like to put admissionID grabed as edited row field identifier

select s;

foreach (var thisItem in query)

{

//foreach (DictionaryEntry entry in newValues)

//{

//if (thisItem.admissionID == admissionIDTxBx.Text)

thisItem.ssn =

"123456789"; would like to put ssn The stuff entered in the editable textbox as this code with everything commented out simply updates this row in the database. 

//}

//if (thisItem.admissionID == (userControl.FindControl("admissionID") as TextBox).Text)

//{

// thisItem.ssn = "12345";//(userControl.FindControl("ssn") as TextBox).Text;

//}

}

db.SubmitChanges();

//var db = new admissions_appsDataContext();

//db.SubmitChanges(

var dbRefresh = new admissions_appsDataContext();

var queryRefresh = db.admission_app2s;

RadGrid1.DataSource = queryRefresh;

RadGrid1.DataBind();

Randy
Top achievements
Rank 1
 answered on 19 Apr 2008
4 answers
243 views
Hello,
In the Radgrid i have a string field that must stay a string. Like '0011'.
When i export to excel this becomes a numeric value 11.

I hope someone can show me a way how to export the datatype also to Excel.
I have search the documentation but didn't found it.

thanks


Marco
Top achievements
Rank 1
 answered on 19 Apr 2008
1 answer
160 views
Hi

I am currently evaluating Editor Control(RADControl for aspnet ajax). I have following issue using the controls.

I have multiple divs on the page. The html body tag has scroll set to no. And my users scroll using div scrollbar. But when i put the editor in that div, i cant scroll down to bottom of the div. It considers browser screen size as height and it doesnt go beyond that. I think there is some issue with absolute and relative positioning.
I am attaching an image file so that you can show to your technical team to send me workaround.

I have an image but i dont find a place to upload in the forum. 

The div tag is as below

<asp:Panel ID="divFixPanel" runat="server">

x.. header controls in this panel than remain static on the page..

</asp:Panel>

<asp:Panel ID="divScroll" runat="server" Style="overflow-y: scroll; overflow-x: auto;

width: 100%; height: expression(screen.height-document.getElementById('ctl00_ContentPlaceHolder1_divFixPanel').offsetHeight-(window.screenTop+60) + 'px');">

x

x

x editor1

x editor 2

x editor 3

</asp:Panel>

Rumen
Telerik team
 answered on 19 Apr 2008
3 answers
248 views
How do I access CustomAttributeNames on the client ?  

I have CustomAttributeNames defined.   I would like to get access to these attributes when an appointment is double clicked.  How is this done using javascript?

Thanks for any direction,
Stephen Sjostrom
Jim
Top achievements
Rank 1
 answered on 19 Apr 2008
1 answer
96 views
Is there an eligant way to store the users preference (column size, column filters, grouping..(whatever the user has changed client side)..that when he revisits the site the next day, the grid will re-use this preference)
Larkin Young
Top achievements
Rank 2
 answered on 19 Apr 2008
2 answers
230 views
I have a combobox in the templatecolumn in my grid.

<

telerik:GridTemplateColumn HeaderText="Device Type" SortExpression="DeviceDisplayValue"

UniqueName="DeviceTemplateColumn" EditFormColumnIndex="1">

<ItemTemplate>

<asp:Label runat="server" ID="lblDevice" Text='<%# Bind("DeviceDisplayValue") %>'></asp:Label>

</ItemTemplate>

<EditItemTemplate>

<telerik:RadComboBox ID="ddlDeviceAW" runat="server"  EnableLoadOnDemand="true"

LoadingMessage="Loading Device..." MarkFirstMatch="True" ToolTip="Select a Device"

OnItemsRequested="ddlDeviceAW_ItemsRequested" EnableVirtualScrolling="true">

</telerik:RadComboBox>

</EditItemTemplate>

</telerik:GridTemplateColumn>

I want to populate the dropdown from code behind on runtime.
How do i find the combo box in the grid in my ItemsRequested event?

newbie
Top achievements
Rank 1
 answered on 18 Apr 2008
1 answer
92 views
I'm using the latest version of RadControls (2008), and I'm working with RadScheduler.  I'm also in the Eastern time zone.

I've added a handler for the OnClientAppointmentInserting and I'm noticing that eventArgs.get_startTime() is retrieving a time 4 hours behind the time the user double clicked on the scheduler.  So if the user double clicks on the 5 AM spot (Wed Apr 16 05:00:00 EDT 2008), eventArgs.get_startTime() returns "Wed Apr 16 01:00:00 EDT 2008". 

How do I fix this problem?

Thanks,
Alvaro
Dimitar Milushev
Telerik team
 answered on 18 Apr 2008
5 answers
375 views
Hi,

I have a fresh Server 2008 running as a workstation, with VS 2008, .NET 3.5, ASP Ajax and RAD controls "Prometheus" installed. When I try to launch the Prometheus examples I get a dialogue stating that the WebDev.WebServer.exe has stopped working.

Another machine I have here, same configuration does not display the error but I cannot open the examples either.

Any help ?

Regards

Graeme
Timothy Lee Russell
Top achievements
Rank 2
 answered on 18 Apr 2008
2 answers
135 views
Hello,

I have been using the calendar controls for a few years and am now using this version.  One problem I have always had is the ability to style it the way I would like due to the calendar using the same style for different items.

For instance:
- Row and column headers use the same style.  If you want to underline your column headers, you also have to underline your row headers.
- Months in MultiView mode cannot be seperated with padding without also causing the heading to be separated as well as adding padding other places. 

Many other controls in the suite have much finer stylesheet control.  When is this scheduled to be addressed in RadCalendar?

Regards,
Mark
Mark Griebling
Top achievements
Rank 1
 answered on 18 Apr 2008
1 answer
181 views
Hi,

I am creating a dropdown in a grid with a three-level hierarchy. In my first level I am adding a dropdown box using the following code:

<radG:GridDropDownColumn DataField="SectionCategory" DataSourceID="SqlDataSource_SectionsCategory" HeaderText="SectionCategory" ListTextField="Name" ListValueField="ID" UniqueName="SectionCategoryID">
</radG:GridDropDownColumn>

Using the following datasource:

<asp:SqlDataSource ID="SqlDataSource_SectionsCategory" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"SelectCommand="SELECT ID, Name FROM Sections"></asp:SqlDataSource>

This is fine, but what I need to do is add an extra value to the dropdown that isn't in the database. I'm assuming this needs to be done in the code behind, but not sure how to go about doing it. Could you please give me some idea of how to go about doing this?

Thanks in advance.

Konstantin Petkov
Telerik team
 answered on 18 Apr 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?