8 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 14 Nov 2008, 05:34 AM
Hi Myriam,
Try the following work arround.
CS:
Thanks
Shinu.
Try the following work arround.
CS:
| protected void RadGrid2_PreRender(object sender, EventArgs e) |
| { |
| foreach (GridDataItem dataItem in RadGrid2.Items) |
| { |
| foreach (GridColumn col in RadGrid2.Columns) |
| { |
| if (dataItem[col.UniqueName].Text == string.Empty) |
| dataItem[col.UniqueName].Text += " "; |
| } |
| } |
| } |
Thanks
Shinu.
0
Hello Myriam,
I suggest you another approach:
Regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I suggest you another approach:
| <telerik:GridBoundColumn |
| DataField="CategoryID" |
| DataType="System.Int32" |
| EmptyDataText="&nbsp;" |
| HeaderText ... |
Regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Myriam
Top achievements
Rank 1
answered on 14 Nov 2008, 01:33 PM
Hello
I'm REALLY REALLY sorry, but I just saw that my problem is only with templatecolumns....
And it doesn't have a EmptyDataText property....
Does it have another property who does the same thing for a templatecolumn...
Thanks in advance
and sorry for that mistake, my fault
0
Accepted
Hello Myriam,
Just add tag in your ItemTemplate/EditItemTemplate.
Kind regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Just add tag in your ItemTemplate/EditItemTemplate.
| <ItemTemplate> |
| <asp:TextBox ID="TextBox1" ... /> |
| </ItemTemplate> |
Kind regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jason Lee
Top achievements
Rank 1
answered on 01 Dec 2009, 04:07 AM
Dear Daniel,
I have try EmptyDataText function.
However, it only works when data is null.
The datatype is empty string ( String.Empty ), it won't work.
so, is it possible to support when data equal to empty string, emptydatatext function will work ?
thank you
I have try EmptyDataText function.
However, it only works when data is null.
The datatype is empty string ( String.Empty ), it won't work.
so, is it possible to support when data equal to empty string, emptydatatext function will work ?
thank you
0
Jason Lee
Top achievements
Rank 1
answered on 02 Dec 2009, 02:42 PM
In other words, when the data type is string and data is null or empty, it shows " "
0
Hello Jason,
You could add the non-breaking space tags manually on ItemDataBound as shown below:
Best regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
You could add the non-breaking space tags manually on ItemDataBound as shown below:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e){ if (e.Item is GridDataItem) { foreach (TableCell cell in e.Item.Cells) { if (String.IsNullOrEmpty(cell.Text.Trim())) cell.Text = " "; } }}Best regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Jason Lee
Top achievements
Rank 1
answered on 04 Dec 2009, 01:47 AM
Dear Daniel,
Yes, I know it.
If the function would built in RadGrid, that will be great.
Yes, I know it.
If the function would built in RadGrid, that will be great.