PDA

View Full Version : کمک componentArt grid



morteza_1234m
شنبه 25 اردیبهشت 1389, 11:05 صبح
سلام دوستان من در پروژه ام دارم از ابزار ComponentArt Grid استفاده می کنم که در ASP این طوری تعریفش کردم

<ComponentArt:Grid ID="Grid1" runat="server" Width="720px" CssClass="Grid"
EnableViewState="true" AutoFocusSearchBox="true" SearchTextCssClass="GridHeaderText"
CallbackCachingEnabled="true" SearchOnKeyPress="true" SearchBoxCssClass="GridFooterText"
ShowFooter="false" ShowSearchBox="false" ShowHeader="false" HeaderCssClass="GridHeader"
AllowPaging="false" FooterCssClass="GridFooter"
AllowMultipleSelect="false" GroupByCssClass="GroupByCell"
GroupByTextCssClass="GroupByText" PagerStyle="Slider" PagerTextCssClass="GridFooterText"
PagerButtonWidth="41" PagerButtonHeight="22" SliderHeight="20" SliderWidth="150"
HeaderHeight="27" SliderGripWidth="9" SliderPopupOffsetX="20" SliderPopupClientTemplateId="SliderTemplate"
AllowHorizontalScrolling="True" GroupingPageSize="5" PreExpandOnGroup="true"
ImagesBaseUrl="../App_Themes/Default/images/ArtImage/" PagerImagesFolderUrl="../App_Themes/Default/images/ArtImage/pager/"
TreeLineImagesFolderUrl="../App_Themes/Default/images/ArtImage/lines/" TreeLineImageWidth="22"
TreeLineImageHeight="19" IndentCellWidth="22" LoadingPanelClientTemplateId="LoadingFeedbackTemplate"
LoadingPanelPosition="MiddleCenter" GroupingNotificationText="" AllowColumnResizing="true"
AllowTextSelection="false" FillContainer="True" SearchText="جستجو:" Height="200px"
>
<Levels>
<ComponentArt:GridLevel DataKeyField="HomeAddress_Id" ShowTableHeading="false" ShowSelectorCells="false"
RowCssClass="Row" ColumnReorderIndicatorImageUrl="reorder.gif" DataCellCssClass="DataCell"
HeadingCellCssClass="HeadingCell" HeadingCellHoverCssClass="HeadingCellHover"
HeadingCellActiveCssClass="HeadingCellActive" HeadingRowCssClass="HeadingRow"
HeadingTextCssClass="HeadingCellText" SelectedRowCssClass="SelectedRow" GroupHeadingCssClass="GroupHeading"
SortAscendingImageUrl="asc.gif" SortDescendingImageUrl="desc.gif" SortImageWidth="10"
SortImageHeight="19">
<Columns>
<ComponentArt:GridColumn DataField="HomeAddress_Id" Visible="false" />
<ComponentArt:GridColumn DataField="PersonInfo_Id" Visible="false" />
<ComponentArt:GridColumn DataField="HomeAddress_Country" HeadingText="آدرس-تلفن-مخصات حساب بلند مدت" Align="Right" Width="70"
FixedWidth="true" AllowGrouping="false" />

</Columns>
</ComponentArt:GridLevel>
</Levels>
<ClientTemplates>
<ComponentArt:ClientTemplate ID="ClientTemplate1">
<table cellspacing="0" cellpadding="0" border="1" style="background: #ECE9D8">
<tr>
<td style="font-size: 14px; font-family: Tahoma">
در حال بارگذاری اطلاعات...&nbsp;
</td>
<td>
<img src="App_Themes/Default/images/ArtImage/spinner.gif" width="16" height="16"
alt="Image" />
</td>
</tr>
</table>
</ComponentArt:ClientTemplate>
</ClientTemplates>
</ComponentArt:Grid>

و کدی نوشتم که توسط یک رویه ذخیره شده باید اطلاعات رو درون این شی نشون بده که به شرح زیره :


string strcon = "Data Source=.;Initial Catalog=Bank;Integrated Security=True";
SqlConnection con = new SqlConnection(strcon);
con.Open();


DataSet ds = new DataSet();
SqlDataAdapter SqlDataAdapter1 = new SqlDataAdapter();
SqlDataAdapter1.SelectCommand = new SqlCommand();
SqlDataAdapter1.SelectCommand.Connection = con;
SqlDataAdapter1.SelectCommand.CommandText = "Select-Customer-Info";
SqlDataAdapter1.SelectCommand.CommandType = CommandType.StoredProcedure;
SqlDataAdapter1.SelectCommand.Parameters.AddWithVa lue("@ShMeli", txtShMeli.Text).DbType = DbType.String;
SqlDataAdapter1.SelectCommand.ExecuteNonQuery();
SqlDataAdapter1.Fill(ds,"Cinfo");
Grid1.DataSource = ds.Tables[0].Rows[0][0];
Grid1.DataBind();



con.Close();

ولی در صورتی که شماره ملی که وارد می کنم موجود هست ولی هیچی رو نشون نمیده و تنها تغییری که می کنه یک ردیف خالی نشون میده
دوستان باید چه کار کنم
در ضمن کد بالا رو به صورتهای زیر هم تکرار کردم ولی فوقش چند خط خالی اضافه نشون میده
چه کار باید بکنم

Grid1.DataSource = ds;


Grid1.DataSource = ds.Tables[0].Rows[0][1];

Grid1.DataSource = ds.Tables[0];

morteza_1234m
یک شنبه 26 اردیبهشت 1389, 17:33 عصر
دوستان هیچ کس نیست سر در بیاره که چه کار باید بکنم
خیلی فوریه تورا به خدا کمک کنید

morteza_1234m
یک شنبه 26 اردیبهشت 1389, 19:10 عصر
ببخشید که پشت سر هم پست زدم ولی چیزی که به نظرم جالب اومد اینه که تمام مطالبی که تو پست اول زدم تو این سایت هم زده شده
کسی علتش رو میدونه
لینک (http://weblog.silverdownload.com/%DA%A9%D9%85%DA%A9-componentart-grid.html)

majid325
یک شنبه 26 اردیبهشت 1389, 23:24 عصر
سایت برنامه نویس دراین کار دخیل نیست ، احتمالا یکی یا یه نرم افزاری داره از مطالب تخصصی این سایت و سایتهای مشابه به امید اینکه به واسطه سرچ انجین ها بازدید کننده داشته باشه این کار رو میکنه.

mahdyeh
چهارشنبه 02 تیر 1389, 11:42 صبح
سلام
آقا مرتضی

راه مشکل شما اینه :
که visible هارو true کنید


<ComponentArt:GridColumn DataField="HomeAddress_Id" Visible="true" />
<ComponentArt:GridColumn DataField="PersonInfo_Id" Visible="true" />
<ComponentArt:GridColumn DataField="HomeAddress_Country" HeadingText="آدرس-تلفن-مخصات حساب بلند مدت" Align="Right" Width="70"
FixedWidth="true" AllowGrouping="false" />