This is a migrated thread and some comments may be shown as answers.

GridDataItem's property Text contains only  

2 Answers 38 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andreja Zitnik
Top achievements
Rank 1
Andreja Zitnik asked on 26 Jul 2010, 12:26 PM
Hi,

I have two RadGrids. The first grid presents a list of items and with a push of a button selected items are transferred to the second grid (in addition to whatever might already be in the second grid). So on button's Click event (server side) I go through all items in the second grid to see what has already been added. However, the value of GridDataItem.Text is wrong (contains only  ):

foreach (GridDataItem dataItem in rgTaskDevice.Items)

 

{

 

 

 

 

Device device = new Device();

 

device.Id =

 

Convert.ToInt64(dataItem["Id"].Text); // this causes Exception because .Text = " "
//same for all other columns
...
}


Does anyone have an idea of what went wrong?

Kind regards,
Andreja

 

 


 

2 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 29 Jul 2010, 11:45 AM
Hello Andreja,

Based on your code it is hard to determine what the cause of the issue might be. Would you mind posting you destination grid declaration as well its binding logic? If you find it more appropriate you can open a formal support ticket and send me a stripped runnable demo that I could debug locally. This way I will be able to provide you with more to the point resolution.

Regards,
Martin
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Andreja Zitnik
Top achievements
Rank 1
answered on 29 Jul 2010, 12:51 PM
Hi Martin,

when I created a simple example it worked as expected. In fact, the whole thing (user control which contains two grids) works as expected if it is included directly on a page. But when I include it in my application (where it gets included dynamically depending on what is selected on the main page), this problem appears.
Because of time crunch I couldn't investigate this further and had to implement a workaround.

Kind regards,
Andreja
Tags
Grid
Asked by
Andreja Zitnik
Top achievements
Rank 1
Answers by
Martin
Telerik team
Andreja Zitnik
Top achievements
Rank 1
Share this question
or